diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 0b05905..b6716bd 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -30,6 +30,7 @@ en: ########## DISCORD SETTINGS ########### ####################################### chat_integration_discord_enabled: "Enable the Discord chat-integration provider" + chat_integration_discord_message_content: "The message to include above the summary when sending a notification to Discord" chat_integration_discord_excerpt_length: "Discord post excerpt length" ####################################### diff --git a/config/settings.yml b/config/settings.yml index fabc62d..3bbfb52 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -46,6 +46,8 @@ plugins: ####################################### chat_integration_discord_enabled: default: false + chat_integration_discord_message_content: + default: "" chat_integration_discord_excerpt_length: default: 400 diff --git a/lib/discourse_chat/provider/discord/discord_provider.rb b/lib/discourse_chat/provider/discord/discord_provider.rb index afa91c7..bb8ff20 100644 --- a/lib/discourse_chat/provider/discord/discord_provider.rb +++ b/lib/discourse_chat/provider/discord/discord_provider.rb @@ -36,6 +36,7 @@ module DiscourseChat end message = { + content: SiteSetting.chat_integration_discord_message_content, embeds: [{ title: post.topic.title, description: post.excerpt(SiteSetting.chat_integration_discord_excerpt_length, text_entities: true, strip_links: true, remap_emoji: true),