| 1 May 2025 |
@emma:rory.gay | https://github.com/matrix-org/mjolnir/blob/main/src/protections/MentionSpam.ts#L49
youre welcome | 15:38:12 |
@emma:rory.gay | tl;dr it splits the string by litteral @ characters, and checks if the result count is above the limit | 15:38:47 |
@joepie91:pixie.town | yes, and that's a terrible way to check this... | 15:38:54 |
@emma:rory.gay | yes, the correct way would be to grab the member list, and count instances of user.displayname ?? user.mxid | 15:39:19 |
@emma:rory.gay | * yes, the correct way would be to grab the member list, and count instances of user.displayname ?? user.mxid | 15:39:22 |
@emma:rory.gay | and well, obviously thats very slow because extra api call | 15:39:36 |