From 5857baf604d750fac34cdecad4eb27c01c186126 Mon Sep 17 00:00:00 2001 From: Teal <git@teal.is> Date: Mon, 27 May 2024 15:41:39 +0200 Subject: [PATCH] add session link to change notifier --- app/subscribers/telegram_bot_subscriber.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/subscribers/telegram_bot_subscriber.rb b/app/subscribers/telegram_bot_subscriber.rb index 32ee35e..271524b 100644 --- a/app/subscribers/telegram_bot_subscriber.rb +++ b/app/subscribers/telegram_bot_subscriber.rb @@ -26,7 +26,7 @@ class TelegramBotSubscriber 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") + changes.map { |attr, (from, to)| "- #{attr}: #{from} -> #{to}" }.join("\n") + "\n#{conference_session_path(record.conference, record)}" TelegramGroupChatNotificationJob.perform_later(target: "-316096320", text: message, parse_mode: 'HTML') # TelegramGroupChatNotificationJob.perform_later(target: "2192297", text: message, parse_mode: 'HTML') @@ -39,7 +39,7 @@ class TelegramBotSubscriber 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'}" + "#{record.speaker.name} #{action == 'destroyed' ? 'removed' : 'added'}" + "\n#{conference_session_path(session.conference, session)}" TelegramGroupChatNotificationJob.perform_later(target: "-316096320", text: message, parse_mode: 'HTML') end -- GitLab