mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-19 07:24:06 -04:00
declare a ReadReceipt class
I'm going to use this in queues and things, so it'll be useful to give it more of a structure.
This commit is contained in:
parent
d42c81d724
commit
eed7271b3b
2 changed files with 34 additions and 24 deletions
|
@ -16,6 +16,8 @@ import re
|
|||
import string
|
||||
from collections import namedtuple
|
||||
|
||||
import attr
|
||||
|
||||
from synapse.api.errors import SynapseError
|
||||
|
||||
|
||||
|
@ -455,3 +457,13 @@ class ThirdPartyInstanceID(
|
|||
@classmethod
|
||||
def create(cls, appservice_id, network_id,):
|
||||
return cls(appservice_id=appservice_id, network_id=network_id)
|
||||
|
||||
|
||||
@attr.s(slots=True)
|
||||
class ReadReceipt(object):
|
||||
"""Information about a read-receipt"""
|
||||
room_id = attr.ib()
|
||||
receipt_type = attr.ib()
|
||||
user_id = attr.ib()
|
||||
event_ids = attr.ib()
|
||||
data = attr.ib()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue