mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-24 20:49:23 -05:00
Get display name from identity server, not client
This commit is contained in:
parent
5335bf9c34
commit
0d63dc3ec9
@ -582,7 +582,6 @@ class RoomMemberHandler(BaseHandler):
|
|||||||
medium,
|
medium,
|
||||||
address,
|
address,
|
||||||
id_server,
|
id_server,
|
||||||
display_name,
|
|
||||||
token_id,
|
token_id,
|
||||||
txn_id
|
txn_id
|
||||||
):
|
):
|
||||||
@ -609,7 +608,6 @@ class RoomMemberHandler(BaseHandler):
|
|||||||
else:
|
else:
|
||||||
yield self._make_and_store_3pid_invite(
|
yield self._make_and_store_3pid_invite(
|
||||||
id_server,
|
id_server,
|
||||||
display_name,
|
|
||||||
medium,
|
medium,
|
||||||
address,
|
address,
|
||||||
room_id,
|
room_id,
|
||||||
@ -673,7 +671,6 @@ class RoomMemberHandler(BaseHandler):
|
|||||||
def _make_and_store_3pid_invite(
|
def _make_and_store_3pid_invite(
|
||||||
self,
|
self,
|
||||||
id_server,
|
id_server,
|
||||||
display_name,
|
|
||||||
medium,
|
medium,
|
||||||
address,
|
address,
|
||||||
room_id,
|
room_id,
|
||||||
@ -681,7 +678,7 @@ class RoomMemberHandler(BaseHandler):
|
|||||||
token_id,
|
token_id,
|
||||||
txn_id
|
txn_id
|
||||||
):
|
):
|
||||||
token, public_key, key_validity_url = (
|
token, public_key, key_validity_url, display_name = (
|
||||||
yield self._ask_id_server_for_third_party_invite(
|
yield self._ask_id_server_for_third_party_invite(
|
||||||
id_server,
|
id_server,
|
||||||
medium,
|
medium,
|
||||||
@ -725,10 +722,11 @@ class RoomMemberHandler(BaseHandler):
|
|||||||
# TODO: Check for success
|
# TODO: Check for success
|
||||||
token = data["token"]
|
token = data["token"]
|
||||||
public_key = data["public_key"]
|
public_key = data["public_key"]
|
||||||
|
display_name = data["display_name"]
|
||||||
key_validity_url = "%s%s/_matrix/identity/api/v1/pubkey/isvalid" % (
|
key_validity_url = "%s%s/_matrix/identity/api/v1/pubkey/isvalid" % (
|
||||||
id_server_scheme, id_server,
|
id_server_scheme, id_server,
|
||||||
)
|
)
|
||||||
defer.returnValue((token, public_key, key_validity_url))
|
defer.returnValue((token, public_key, key_validity_url, display_name))
|
||||||
|
|
||||||
|
|
||||||
class RoomListHandler(BaseHandler):
|
class RoomListHandler(BaseHandler):
|
||||||
|
@ -459,7 +459,6 @@ class RoomMembershipRestServlet(ClientV1RestServlet):
|
|||||||
content["medium"],
|
content["medium"],
|
||||||
content["address"],
|
content["address"],
|
||||||
content["id_server"],
|
content["id_server"],
|
||||||
content["display_name"],
|
|
||||||
token_id,
|
token_id,
|
||||||
txn_id
|
txn_id
|
||||||
)
|
)
|
||||||
@ -494,7 +493,7 @@ class RoomMembershipRestServlet(ClientV1RestServlet):
|
|||||||
defer.returnValue((200, {}))
|
defer.returnValue((200, {}))
|
||||||
|
|
||||||
def _has_3pid_invite_keys(self, content):
|
def _has_3pid_invite_keys(self, content):
|
||||||
for key in {"id_server", "medium", "address", "display_name"}:
|
for key in {"id_server", "medium", "address"}:
|
||||||
if key not in content:
|
if key not in content:
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
Loading…
Reference in New Issue
Block a user