mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:16:07 -04:00
Merge pull request #302 from matrix-org/daniel/3pidinvites
Implement third party identifier invites
This commit is contained in:
commit
e5acc8a47b
12 changed files with 392 additions and 24 deletions
|
@ -21,6 +21,7 @@ from synapse.api.constants import Membership, EventTypes
|
|||
from synapse.types import UserID, RoomAlias
|
||||
|
||||
from synapse.util.logcontext import PreserveLoggingContext
|
||||
from synapse.util import third_party_invites
|
||||
|
||||
import logging
|
||||
|
||||
|
@ -169,6 +170,16 @@ class BaseHandler(object):
|
|||
)
|
||||
)
|
||||
|
||||
if (
|
||||
event.type == EventTypes.Member and
|
||||
event.content["membership"] == Membership.JOIN and
|
||||
third_party_invites.join_has_third_party_invite(event.content)
|
||||
):
|
||||
yield third_party_invites.check_key_valid(
|
||||
self.hs.get_simple_http_client(),
|
||||
event
|
||||
)
|
||||
|
||||
federation_handler = self.hs.get_handlers().federation_handler
|
||||
|
||||
if event.type == EventTypes.Member:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue