Merge pull request #5464 from matrix-org/erikj/3pid_remote_invite_state

Fix 3PID invite room state over federation.
This commit is contained in:
Erik Johnston 2019-06-17 10:18:28 +01:00 committed by GitHub
commit a9dab970b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 7 deletions

1
changelog.d/5464.bugfix Normal file
View File

@ -0,0 +1 @@
Fix missing invite state after exchanging 3PID invites over federaton.

View File

@ -14,7 +14,7 @@ This image is designed to run either with an automatically generated
configuration file or with a custom configuration that requires manual editing. configuration file or with a custom configuration that requires manual editing.
An easy way to make use of this image is via docker-compose. See the An easy way to make use of this image is via docker-compose. See the
[contrib/docker](../contrib/docker) section of the synapse project for [contrib/docker](https://github.com/matrix-org/synapse/tree/master/contrib/docker) section of the synapse project for
examples. examples.
### Without Compose (harder) ### Without Compose (harder)

View File

@ -2677,12 +2677,6 @@ class FederationHandler(BaseHandler):
# though the sender isn't a local user. # though the sender isn't a local user.
event.internal_metadata.send_on_behalf_of = get_domain_from_id(event.sender) event.internal_metadata.send_on_behalf_of = get_domain_from_id(event.sender)
# XXX we send the invite here, but send_membership_event also sends it,
# so we end up making two requests. I think this is redundant.
returned_invite = yield self.send_invite(origin, event)
# TODO: Make sure the signatures actually are correct.
event.signatures.update(returned_invite.signatures)
member_handler = self.hs.get_room_member_handler() member_handler = self.hs.get_room_member_handler()
yield member_handler.send_membership_event(None, event, context) yield member_handler.send_membership_event(None, event, context)