Skip to content

room_config param to user_may_create_room spam-checker callback has invalid data when called for room upgrades #18792

@hughns

Description

@hughns

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:

I'm happy to do whatever is needed to clean this up, but need some guidance on which way to go.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions