diff options
author | 2021-08-21 12:47:36 +0300 | |
---|---|---|
committer | 2021-08-21 12:47:36 +0300 | |
commit | ad3d1974b546cd426537b3c1c692af56a3c3dad1 (patch) | |
tree | cace435d171a386696b0223ff57d960a6978f2b8 /tests | |
parent | AntiSpam deletes from all spammed channels (diff) |
Identify DeletionContext by members, not channels
Since the anti-spam now works cross-channels, it makes no sense to identify it by the channel in which it was invoked.
The DeletionContext class was changed to accept a frozenset of members, and the message_deletion_queue dict uses the frozensets as keys.
DeletionContext still accepts a channel on creation, because while it might get added more channels, there's only one channel in which the mute message will be sent.
Using members as the key can run into the issue of one member becoming irrelevant to the filter while others still are, resulting in another log message being sent, but it's an unlikely edge case since the users should be muted almost immediately, and we're currently not using any multi-member filters in the first place.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions