-
Notifications
You must be signed in to change notification settings - Fork 423
Description
Background:
#18486 added the room_config param to the user_may_create_room spam-checker callback.
This callback is also called when the room upgrade API is used (not that this was documented). The is a bug that means that in the case of a room upgrade request the room_config data is junk (it was attempting a subset of what might have been in the original request and makes mistakes in how it constructs the initial_state data).
However, it transpires that this was unnecessary as you can use the on_create_room thirdparty rules callback and raise an Exception instead. That said, you then don't get the callback invoked in the upgrade case.
So, I'm not sure whether it makes sense to fix the broken behaviour or revert.
Some options to address this:
- Change behaviour of
user_may_create_roomto setroom_configtoNonefor room upgrades. This is what was drafted in Document and fix room_config param when user_may_create_room callback is invoked for a room upgrade #18721 - Remove the
room_configparam fromuser_may_create_roomand point to theon_create_roomcallback instead. Basically revert Pass room_config argument to user_may_create_room spam checker module callback #18486 and add documentation. Also ignore the case of checkingroom_configfor upgrades as it has never worked and therefore no-one can be relying on it. - As above but somehow deprecate first (although it would probably then end up never being removed)
I'm happy to do whatever is needed to clean this up, but need some guidance on which way to go.