Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Move tag/push rules room upgrade checking ealier #6155

Merged
merged 6 commits into from
Oct 10, 2019

Conversation

anoadragon453
Copy link
Member

It turns out that _local_membership_update doesn't run when you join a new, remote room. It only runs if you're joining a room that your server already knows about. This would explain #4703 and #5295 and why the transfer would work in testing and some rooms, but not others. This would especially hit single-user homeservers.

The check has been moved to right after the room has been joined, and works much more reliably. (Though it may still be a bit awkward of a place).

@anoadragon453 anoadragon453 self-assigned this Oct 2, 2019
@anoadragon453 anoadragon453 requested review from a team and removed request for a team October 2, 2019 14:56
@anoadragon453 anoadragon453 requested a review from a team October 2, 2019 16:26
Copy link
Member

@erikjohnston erikjohnston left a comment

Choose a reason for hiding this comment

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

Test?

synapse/handlers/room_member.py Outdated Show resolved Hide resolved
# Copy over user state if this is a join on an local upgraded room
yield self.copy_user_state_on_room_upgrade(
room_id, requester.user.to_string()
)
Copy link
Member

Choose a reason for hiding this comment

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

We only want to do this after join, so I think it should be back in _local_membership_update

Copy link
Member Author

Choose a reason for hiding this comment

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

I've moved it to _local_membership_update. Do you think it should be inside _user_joined_room as well? My only concern is I'm not entirely sure where that method runs.

@anoadragon453
Copy link
Member Author

anoadragon453 commented Oct 8, 2019

Test?

Working on federated versions of the existing tests :)

Edit: matrix-org/sytest#721

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants