Remove redundant/invalid checks from setup

This commit is contained in:
Cadence Ember 2024-11-25 16:30:10 +13:00
parent 07d6eb3c12
commit a63d173a9a
2 changed files with 2 additions and 15 deletions

View file

@ -30,9 +30,7 @@ const NEWLINE_ELEMENTS = BLOCK_ELEMENTS.concat(["BR"])
*/
function eventSenderIsFromDiscord(sender) {
// If it's from a user in the bridge's namespace, then it originated from discord
// This includes messages sent by the appservice's bot user, because that is what's used for webhooks
// TODO: It would be nice if bridge system messages wouldn't trigger this check and could be bridged from matrix to discord, while webhook reflections would remain ignored...
// TODO that only applies to the above todo: But you'd have to watch out for the /icon command, where the bridge bot would set the room avatar, and that shouldn't be reflected into the room a second time.
// This could include messages sent by the appservice's bot user, because that is what's used for webhooks
if (userRegex.some(x => sender.match(x))) {
return true
}