From 7f5ef4f8f5bceae8c1f780dfd3c18be88eee99b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6khan=20Gurbeto=C4=9Flu?= Date: Mon, 15 Mar 2021 18:19:05 +0300 Subject: [PATCH] Add username and fullname for formatting (#65) Added username and fullname to make them usable in the custom formatting for the posts. --- lib/discourse_chat/provider/telegram/telegram_provider.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/discourse_chat/provider/telegram/telegram_provider.rb b/lib/discourse_chat/provider/telegram/telegram_provider.rb index c8d4d7e..bae0666 100644 --- a/lib/discourse_chat/provider/telegram/telegram_provider.rb +++ b/lib/discourse_chat/provider/telegram/telegram_provider.rb @@ -72,6 +72,8 @@ module DiscourseChat I18n.t( "chat_integration.provider.telegram.message", user: display_name, + username: post.user.username, + fullname: full_name, post_url: post.full_url, title: CGI::escapeHTML(topic.title), post_excerpt: post.excerpt(SiteSetting.chat_integration_telegram_excerpt_length, text_entities: true, strip_links: true, remap_emoji: true),