Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Send ALL membership events, including bans to the server that was banned #1758

Merged
merged 2 commits into from Jan 4, 2017

Conversation

Projects
None yet
2 participants
Contributor

NegativeMjark commented Jan 4, 2017

No description provided.

Send ALL membership events to the server that was affected.
Send all membership changes to the server that was affected.
This ensures that if the last member of a room on a server
was kicked or banned they get told about it.

@NegativeMjark NegativeMjark referenced this pull request in matrix-org/sytest Jan 4, 2017

Merged

Check that remote users get told about their ban #335

synapse/federation/transaction_queue.py
@@ -161,9 +161,11 @@ def notify_new_events(self, current_id):
get_domain_from_id(user_id) for user_id in users_in_room
)
+ # Send all membership changes to the server that was affected.
+ # This ensures that if the last member of a room on a server
+ # was kicked or banned they get told about it.
@richvdh

richvdh Jan 4, 2017

Member

still wish we knew why Membership.JOIN had been special-cased previously :/

richvdh approved these changes Jan 4, 2017

lgtm

@richvdh richvdh assigned NegativeMjark and unassigned richvdh Jan 4, 2017

Get the destinations from the state from before the event
Rather than the state after then event.

richvdh approved these changes Jan 4, 2017

uhhh... still lgtm, I guess?

Contributor

NegativeMjark commented Jan 4, 2017

I've removed the

if event.type == EventTypes.Member:
      if event.content["membership"] == Membership.JOIN:
             destinations.add(get_domain_from_id(event.state_key))

because it would only have been used to send a join event to a server that joined, and that server already has event because it created it. (all join events are created by the server that is joining the room.)

@NegativeMjark NegativeMjark merged commit 0d766c8 into release-v0.18.6 Jan 4, 2017

7 of 8 checks passed

Sytest Dendron (Merged PR) Build finished.
Details
Sytest Dendron (Commit) Build #1299 origin/markjh/fix_ban_propagation succeeded in 14 min
Details
Sytest Postgres (Commit) Build #2142 origin/markjh/fix_ban_propagation succeeded in 9 min 47 sec
Details
Sytest Postgres (Merged PR) Build finished.
Details
Sytest SQLite (Commit) Build #2184 origin/markjh/fix_ban_propagation succeeded in 7 min 8 sec
Details
Sytest SQLite (Merged PR) Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment