mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-25 09:39:31 -05:00
Merge pull request #368 from matrix-org/erikj/fix_federation_profile
Fix missing profile data in federation joins
This commit is contained in:
commit
018b504f5b
@ -357,7 +357,8 @@ class FederationClient(FederationBase):
|
|||||||
defer.returnValue(signed_auth)
|
defer.returnValue(signed_auth)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def make_membership_event(self, destinations, room_id, user_id, membership):
|
def make_membership_event(self, destinations, room_id, user_id, membership,
|
||||||
|
content={},):
|
||||||
"""
|
"""
|
||||||
Creates an m.room.member event, with context, without participating in the room.
|
Creates an m.room.member event, with context, without participating in the room.
|
||||||
|
|
||||||
@ -398,6 +399,8 @@ class FederationClient(FederationBase):
|
|||||||
|
|
||||||
logger.debug("Got response to make_%s: %s", membership, pdu_dict)
|
logger.debug("Got response to make_%s: %s", membership, pdu_dict)
|
||||||
|
|
||||||
|
pdu_dict["content"].update(content)
|
||||||
|
|
||||||
defer.returnValue(
|
defer.returnValue(
|
||||||
(destination, self.event_from_pdu_json(pdu_dict))
|
(destination, self.event_from_pdu_json(pdu_dict))
|
||||||
)
|
)
|
||||||
|
@ -564,7 +564,7 @@ class FederationHandler(BaseHandler):
|
|||||||
|
|
||||||
@log_function
|
@log_function
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def do_invite_join(self, target_hosts, room_id, joinee):
|
def do_invite_join(self, target_hosts, room_id, joinee, content):
|
||||||
""" Attempts to join the `joinee` to the room `room_id` via the
|
""" Attempts to join the `joinee` to the room `room_id` via the
|
||||||
server `target_host`.
|
server `target_host`.
|
||||||
|
|
||||||
@ -584,7 +584,8 @@ class FederationHandler(BaseHandler):
|
|||||||
target_hosts,
|
target_hosts,
|
||||||
room_id,
|
room_id,
|
||||||
joinee,
|
joinee,
|
||||||
"join"
|
"join",
|
||||||
|
content,
|
||||||
)
|
)
|
||||||
|
|
||||||
self.room_queues[room_id] = []
|
self.room_queues[room_id] = []
|
||||||
@ -840,12 +841,14 @@ class FederationHandler(BaseHandler):
|
|||||||
defer.returnValue(None)
|
defer.returnValue(None)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def _make_and_verify_event(self, target_hosts, room_id, user_id, membership):
|
def _make_and_verify_event(self, target_hosts, room_id, user_id, membership,
|
||||||
|
content={},):
|
||||||
origin, pdu = yield self.replication_layer.make_membership_event(
|
origin, pdu = yield self.replication_layer.make_membership_event(
|
||||||
target_hosts,
|
target_hosts,
|
||||||
room_id,
|
room_id,
|
||||||
user_id,
|
user_id,
|
||||||
membership
|
membership,
|
||||||
|
content,
|
||||||
)
|
)
|
||||||
|
|
||||||
logger.debug("Got response to make_%s: %s", membership, pdu)
|
logger.debug("Got response to make_%s: %s", membership, pdu)
|
||||||
|
@ -504,7 +504,8 @@ class RoomMemberHandler(BaseHandler):
|
|||||||
yield handler.do_invite_join(
|
yield handler.do_invite_join(
|
||||||
room_hosts,
|
room_hosts,
|
||||||
room_id,
|
room_id,
|
||||||
event.user_id
|
event.user_id,
|
||||||
|
event.content,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
logger.debug("Doing normal join")
|
logger.debug("Doing normal join")
|
||||||
|
Loading…
Reference in New Issue
Block a user