mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 05:13:50 +01:00
Look for keys on the right objects
This commit is contained in:
parent
f38df51e8d
commit
643b5fcdc8
3 changed files with 6 additions and 4 deletions
|
@ -364,7 +364,9 @@ class FederationClient(FederationBase):
|
||||||
|
|
||||||
args = {}
|
args = {}
|
||||||
if third_party_invites.join_has_third_party_invite(content):
|
if third_party_invites.join_has_third_party_invite(content):
|
||||||
args = third_party_invites.extract_join_keys(content)
|
args = third_party_invites.extract_join_keys(
|
||||||
|
content["third_party_invite"]
|
||||||
|
)
|
||||||
try:
|
try:
|
||||||
ret = yield self.transport_layer.make_join(
|
ret = yield self.transport_layer.make_join(
|
||||||
destination, room_id, user_id, args
|
destination, room_id, user_id, args
|
||||||
|
|
|
@ -566,7 +566,7 @@ class RoomMemberHandler(BaseHandler):
|
||||||
if invitee:
|
if invitee:
|
||||||
# make sure it looks like a user ID; it'll throw if it's invalid.
|
# make sure it looks like a user ID; it'll throw if it's invalid.
|
||||||
UserID.from_string(invitee)
|
UserID.from_string(invitee)
|
||||||
yield self.handlers.message_handler.create_and_send_event(
|
yield self.hs.get_handlers().message_handler.create_and_send_event(
|
||||||
{
|
{
|
||||||
"type": EventTypes.Member,
|
"type": EventTypes.Member,
|
||||||
"content": {
|
"content": {
|
||||||
|
@ -641,7 +641,7 @@ class RoomMemberHandler(BaseHandler):
|
||||||
user.to_string()
|
user.to_string()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
msg_handler = self.handlers.message_handler
|
msg_handler = self.hs.get_handlers().message_handler
|
||||||
yield msg_handler.create_and_send_event(
|
yield msg_handler.create_and_send_event(
|
||||||
{
|
{
|
||||||
"type": EventTypes.ThirdPartyInvite,
|
"type": EventTypes.ThirdPartyInvite,
|
||||||
|
|
|
@ -51,7 +51,7 @@ def join_has_third_party_invite(content):
|
||||||
def extract_join_keys(src):
|
def extract_join_keys(src):
|
||||||
return {
|
return {
|
||||||
key: value
|
key: value
|
||||||
for key, value in src["third_party_invite"].items()
|
for key, value in src.items()
|
||||||
if key in JOIN_KEYS
|
if key in JOIN_KEYS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue