Skip to content
Snippets Groups Projects
Unverified Commit 2c2a42cc authored by Eric Eastwood's avatar Eric Eastwood Committed by GitHub
Browse files

Fix application service not being able to join remote federated room without a profile set (#13131)

parent 65e67550
No related branches found
No related tags found
No related merge requests found
Fix application service not being able to join remote federated room without a profile set.
...@@ -846,10 +846,17 @@ class RoomMemberHandler(metaclass=abc.ABCMeta): ...@@ -846,10 +846,17 @@ class RoomMemberHandler(metaclass=abc.ABCMeta):
content["membership"] = Membership.JOIN content["membership"] = Membership.JOIN
profile = self.profile_handler try:
if not content_specified: profile = self.profile_handler
content["displayname"] = await profile.get_displayname(target) if not content_specified:
content["avatar_url"] = await profile.get_avatar_url(target) content["displayname"] = await profile.get_displayname(target)
content["avatar_url"] = await profile.get_avatar_url(target)
except Exception as e:
logger.info(
"Failed to get profile information while processing remote join for %r: %s",
target,
e,
)
if requester.is_guest: if requester.is_guest:
content["kind"] = "guest" content["kind"] = "guest"
...@@ -926,11 +933,18 @@ class RoomMemberHandler(metaclass=abc.ABCMeta): ...@@ -926,11 +933,18 @@ class RoomMemberHandler(metaclass=abc.ABCMeta):
content["membership"] = Membership.KNOCK content["membership"] = Membership.KNOCK
profile = self.profile_handler try:
if "displayname" not in content: profile = self.profile_handler
content["displayname"] = await profile.get_displayname(target) if "displayname" not in content:
if "avatar_url" not in content: content["displayname"] = await profile.get_displayname(target)
content["avatar_url"] = await profile.get_avatar_url(target) if "avatar_url" not in content:
content["avatar_url"] = await profile.get_avatar_url(target)
except Exception as e:
logger.info(
"Failed to get profile information while processing remote knock for %r: %s",
target,
e,
)
return await self.remote_knock( return await self.remote_knock(
remote_room_hosts, room_id, target, content remote_room_hosts, room_id, target, content
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment