mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 10:04:11 -04:00
Docs
This commit is contained in:
parent
5cb298c934
commit
56dbcd1524
2 changed files with 39 additions and 0 deletions
|
@ -751,6 +751,19 @@ class RoomListHandler(BaseHandler):
|
|||
class RoomContextHandler(BaseHandler):
|
||||
@defer.inlineCallbacks
|
||||
def get_event_context(self, user, room_id, event_id, limit):
|
||||
"""Retrieves events, pagination tokens and state around a given event
|
||||
in a room.
|
||||
|
||||
Args:
|
||||
user (UserID)
|
||||
room_id (str)
|
||||
event_id (str)
|
||||
limit (int): The maximum number of events to return in total
|
||||
(excluding state).
|
||||
|
||||
Returns:
|
||||
dict
|
||||
"""
|
||||
before_limit = math.floor(limit/2.)
|
||||
after_limit = limit - before_limit
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue