aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar mbaruh <[email protected]>2022-02-24 21:20:37 +0200
committerGravatar mbaruh <[email protected]>2022-07-16 02:08:35 +0300
commit555be653507baeda16f069114dbf5e7a2752d6e3 (patch)
tree8efd9c80d60cf085f63519fe549a3eae21dcdf9b /tests
parentAccept strings in channel scope and change role string interpretation (diff)
Add file extension filtering
This commmit migrates the AntiMalware cog to a new filter list which goes over a message's attachments. Some changes were needed to accomodate the new list, primarily what a filter list returns for a given context: Instead of returning a list of filters, it will return the action itself that should be taken. This adds the flexibility of not needing existing filters to dictate the action. For example, in the case of the extensions list, an action should be taken when filters were *not* triggered. Or more precisely, when not all attachment extensions are whitelisted. Therefore, the action in that case is dictated by the filter list (stored as the list's default actions). Additionally each filter list can now return its own message for the alert embed, instead of the cog formatting it according to the filters raised. Because again, an action might be taken without any deny filters being triggered. This is going to be especially relevant for the invites list. Additionally, the infraction_and_notification action now doesn't redirect the notification to the context channel when the DM fails, since this can be incredibly noisy in cases of spam. If we want this functionality, a more suitable solution should be found.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions