mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 13:46:02 -04:00
Actually don't store any PDUs
This commit is contained in:
parent
d84f5b30b8
commit
21fe249d62
3 changed files with 42 additions and 14 deletions
|
@ -415,6 +415,28 @@ class FederationHandler(BaseHandler):
|
|||
for e in events
|
||||
])
|
||||
|
||||
@defer.inlineCallbacks
|
||||
@log_function
|
||||
def get_persisted_pdu(self, pdu_id, origin):
|
||||
""" Get a PDU from the database with given origin and id.
|
||||
|
||||
Returns:
|
||||
Deferred: Results in a `Pdu`.
|
||||
"""
|
||||
event = yield self.store.get_event(
|
||||
self.pdu_codec.encode_event_id(pdu_id, origin),
|
||||
allow_none=True,
|
||||
)
|
||||
|
||||
if event:
|
||||
defer.returnValue(self.pdu_codec.pdu_from_event(event))
|
||||
else:
|
||||
defer.returnValue(None)
|
||||
|
||||
@log_function
|
||||
def get_min_depth_for_context(self, context):
|
||||
return self.store.get_min_depth(context)
|
||||
|
||||
@log_function
|
||||
def _on_user_joined(self, user, room_id):
|
||||
waiters = self.waiting_for_join_list.get((user.to_string(), room_id), [])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue