From ac4aee39e3256f9061d2057bb377862def4dd9d9 Mon Sep 17 00:00:00 2001 From: Alexandre GV Date: Thu, 13 May 2021 22:39:25 +0200 Subject: discord: Add AllowMention to restrict allowed mentions (#1462) * Add DisablePingEveryoneHere/DisablePingRoles/DisablePingUsers keys to config * Add basic AllowedMentions behavior to discord webhooks * Initialize b.AllowedMentions on Discord Bridger init * Call b.getAllowedMentions on each webhook to allow config hot reloading * Add AllowedMentions on all Discord webhooks/messages * Add DisablePingEveryoneHere/DisablePingRoles/DisablePingUsers to matterbridge.toml.sample * Change 'Disable' for 'Allow' and revert logic in Discord AllowedMentions * Update Discord AllowedMentions in matterbridge.toml.sample * Fix typo in DisableWebPagePreview * Replace 'AllowPingEveryoneHere' with 'AllowPingEveryone' * Replace 3 AllowPingEveryone/Roles/Users bools with an array * Fix typo --- matterbridge.toml.sample | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'matterbridge.toml.sample') diff --git a/matterbridge.toml.sample b/matterbridge.toml.sample index b44ea2ff..6a5d406f 100644 --- a/matterbridge.toml.sample +++ b/matterbridge.toml.sample @@ -848,6 +848,14 @@ Server="yourservername" ## All settings below can be reloaded by editing the file. ## They are also all optional. +# AllowMention controls which mentions are allowed. If not specified, all mentions are allowed. +# Note that even when a mention is not allowed, it will still be displayed nicely and be clickable. It just prevents the ping/notification. +# +# "everyone" allows @everyone and @here mentions +# "roles" allows @role mentions +# "users" allows @user mentions +AllowMention=["everyone", "roles", "users"] + # ShowEmbeds shows the title, description and URL of embedded messages (sent by other bots) ShowEmbeds=false -- cgit v1.2.3