matrix-org / mjolnir

A moderation tool for Matrix
Apache License 2.0
313 stars 54 forks source link

ACL banlist doesn't get applied in rooms only set as protected in the config, not through !mjolnir commands #344

Open mvgorcum opened 2 years ago

mvgorcum commented 2 years ago

Describe the bug We set a ban on a server in the management room, but this ACL ban was not applied in the #fdroid:f-droid.org room.

To Reproduce Steps to reproduce the behavior:

  1. say !mjolnir ban coc example.com spam in the management room
  2. Mjolnir says 'Done updating rooms - no errors'
  3. ACL does not get applied

Expected behavior ACL gets applied in #fdroid:f-droid.org

Additional context The room in question does already have an ACL list, with a few more servers than are set in mjolnir, but the new server (example.com) does not get added to said list.

mvgorcum commented 2 years ago

I did a bit more experimentation, and I think I found the cause of this issue:

The room in question was added with the production.yaml config, but not through !mjolnir rooms add. After I set the room as protected using !mjolnir rooms add (while not removing it from the config) the bot did set the ACL as expected.

While my issue is solved this is still unexpected behaviour so I'll leave this issue open.

Gnuxie commented 2 years ago

Oh, that cause does make things a lot easier to understand on our end. Thanks for doing the follow up and investigating!

mvgorcum commented 2 years ago

Happy to help!