mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-15 20:18:56 -05:00
Move event contents into third_party_layout field
This commit is contained in:
parent
32a453d7ba
commit
17dffef5ec
7 changed files with 35 additions and 21 deletions
|
|
@ -42,6 +42,12 @@ class ThirdPartyInvites(object):
|
|||
return False
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
def join_has_third_party_invite(cls, content):
|
||||
if "third_party_invite" not in content:
|
||||
return False
|
||||
return cls.has_join_keys(content["third_party_invite"])
|
||||
|
||||
@classmethod
|
||||
def copy_join_keys(cls, src, dst):
|
||||
for key in cls.JOIN_KEYS:
|
||||
|
|
@ -53,8 +59,8 @@ class ThirdPartyInvites(object):
|
|||
def check_key_valid(cls, http_client, event):
|
||||
try:
|
||||
response = yield http_client.get_json(
|
||||
event.content["key_validity_url"],
|
||||
{"public_key": event.content["public_key"]}
|
||||
event.content["third_party_invite"]["key_validity_url"],
|
||||
{"public_key": event.content["third_party_invite"]["public_key"]}
|
||||
)
|
||||
if not response["valid"]:
|
||||
raise AuthError(403, "Third party certificate was invalid")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue