Skip to content

Conversation

@nexy7574
Copy link
Contributor

@nexy7574 nexy7574 commented Dec 22, 2025

Fixes 19120 by always falling back to checking power levels for local users if a local creator cannot be found in a v12 room.

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct (run the linters)

@nexy7574 nexy7574 requested a review from a team as a code owner December 22, 2025 19:25
Signed-off-by: timedout <[email protected]>
chosen_user = local_creators.pop() # random creator
user_power_level = CREATOR_POWER_LEVEL
else:
if chosen_user is None:
Copy link
Contributor

@MadLittleMods MadLittleMods Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This kind of change deserves a test of some sort to ensure we don't regress into the future. It's probably easiest to write a Complement test to setup this kind of scenario. Is this something you'd be comfortable with tackling?

Probably something in tests/restricted_rooms_test.go

As an example of running Complement tests for the Synapse project, here is how to run a single test:

COMPLEMENT_DIR=../complement ./scripts-dev/complement.sh ./tests -run TestRestrictedRoomsLocalJoin

(checkout the complement repo as a sibling to the synapse repo)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll give it a shot

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened matrix-org/complement#836, let me know if I missed a step or anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Attempting to join a restricted v12 room created by a remote user fails

2 participants