the-draupnir-project / Draupnir

A Matrix moderation bot
https://the-draupnir-project.github.io/draupnir-documentation/
92 stars 14 forks source link

Draupnir will not join the room after unprotecting and reprotecting a room. #615

Open ll-SKY-ll opened 1 month ago

ll-SKY-ll commented 1 month ago

Context: https://matrix.to/#/%21IaWNErZAgQUhGqJXjX%3Amatrix.org/%24J3HjChUOSLpSs4r-4ECG4M0FewvWT7EXntxczg0CTN4?via=matrix.org&via=envs.net&via=tchncs.de

Bug appearing on v2.0.0-beta7 and beta8

If i leave a room with !draupnir rooms remove #roomname:server.com and try to rejoin the room via !draupnir rooms add #roomname:server.com, the bot gives me a confirmation in the management room and even says it it Setting the Server ACL since its out of sync but actually never joins the room. If i restart the bot, it immediately joins the room, so i assume that the account data is still correct. I checked out previous versions in git and built them to see where that behaviour started and can say that for me beta 7 and 8 is affected and on beta 6 its working like intended

Gnuxie commented 1 month ago

developer context: We recently changed the RoomJoiner capability to check the JoinedRoomsRevision before calling /join and to skip joining if the revision says we are already joined. There are two problems that have been confirmed with this issue.

  1. we don't inform the JoinedRoomsRevision properly of parts when running in bot mode.
  2. we don't preemptively update the revision when we leave the protected room. I think that's because we don't have a capability for leaving rooms where we can do that.