Skip to content
Snippets Groups Projects
Commit 4a5103b4 authored by Teal's avatar Teal
Browse files

use url instead of path for notifications

parent fe773187
Branches
No related tags found
No related merge requests found
......@@ -25,8 +25,8 @@ class TelegramBotSubscriber
changes.delete("stage_id")
end
message = "<b><a href=\"#{conference_session_path(record.conference, record)}\">Session #{record.title}</a> #{action}</b>\n" +
changes.map { |attr, (from, to)| "- #{attr}: #{from} -> #{to}" }.join("\n") + "\n#{conference_session_path(record.conference, record)}"
message = "<b><a href=\"#{conference_session_url(record.conference, record)}\">Session #{record.title}</a> #{action}</b>\n" +
changes.map { |attr, (from, to)| "- #{attr}: #{from} -> #{to}" }.join("\n") + "\n#{conference_session_url(record.conference, record)}"
TelegramGroupChatNotificationJob.perform_later(target: "-316096320", text: message, parse_mode: 'HTML')
# TelegramGroupChatNotificationJob.perform_later(target: "2192297", text: message, parse_mode: 'HTML')
......@@ -38,8 +38,8 @@ class TelegramBotSubscriber
record = event.payload[:record]
session = record.session
message = "<b><a href=\"#{conference_session_path(session.conference, session)}\">Session #{session.title}</a> Speaker Change</b>\n" +
"#{record.speaker.name} #{action == 'destroyed' ? 'removed' : 'added'}" + "\n#{conference_session_path(session.conference, session)}"
message = "<b><a href=\"#{conference_session_url(session.conference, session)}\">Session #{session.title}</a> Speaker Change</b>\n" +
"#{record.speaker.name} #{action == 'destroyed' ? 'removed' : 'added'}" + "\n#{conference_session_url(session.conference, session)}"
TelegramGroupChatNotificationJob.perform_later(target: "-316096320", text: message, parse_mode: 'HTML')
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment