mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-07 21:44:58 -04:00
Implement invite part of invite join dance
This commit is contained in:
parent
328dab2463
commit
d2fb2b8095
4 changed files with 74 additions and 21 deletions
|
@ -413,7 +413,7 @@ class ReplicationLayer(object):
|
|||
@defer.inlineCallbacks
|
||||
def on_invite_request(self, origin, content):
|
||||
pdu = Pdu(**content)
|
||||
ret_pdu = yield self.handler.on_send_join_request(origin, pdu)
|
||||
ret_pdu = yield self.handler.on_invite_request(origin, pdu)
|
||||
defer.returnValue((200, ret_pdu.get_dict()))
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
@ -460,6 +460,19 @@ class ReplicationLayer(object):
|
|||
|
||||
defer.returnValue(state)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def send_invite(self, destination, context, event_id, pdu):
|
||||
code, pdu_dict = yield self.transport_layer.send_invite(
|
||||
destination=destination,
|
||||
context=context,
|
||||
event_id=event_id,
|
||||
content=pdu.get_dict(),
|
||||
)
|
||||
|
||||
logger.debug("Got response to send_invite: %s", pdu_dict)
|
||||
|
||||
defer.returnValue(Pdu(**pdu_dict))
|
||||
|
||||
@log_function
|
||||
def _get_persisted_pdu(self, event_id):
|
||||
""" Get a PDU from the database with given origin and id.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue