diff options
-rw-r--r-- | changelog.d/10642.misc | 1 | ||||
-rw-r--r-- | synapse/storage/roommember.py | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/changelog.d/10642.misc b/changelog.d/10642.misc new file mode 100644 index 0000000000..cca1eb6c57 --- /dev/null +++ b/changelog.d/10642.misc @@ -0,0 +1 @@ +Convert room member storage tuples to `attrs` classes. diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py index 0ff66debdf..9fad67ce48 100644 --- a/synapse/storage/roommember.py +++ b/synapse/storage/roommember.py @@ -23,7 +23,7 @@ from synapse.types import PersistedEventPosition logger = logging.getLogger(__name__) -@attr.s(slots=True, frozen=True, weakref_slot=True, auto_attribs=True) +@attr.s(slots=True, frozen=True, weakref_slot=False, auto_attribs=True) class RoomsForUser: room_id: str sender: str @@ -32,19 +32,19 @@ class RoomsForUser: stream_ordering: int -@attr.s(slots=True, frozen=True, weakref_slot=True, auto_attribs=True) +@attr.s(slots=True, frozen=True, weakref_slot=False, auto_attribs=True) class GetRoomsForUserWithStreamOrdering: room_id: str event_pos: PersistedEventPosition -@attr.s(slots=True, frozen=True, weakref_slot=True, auto_attribs=True) +@attr.s(slots=True, frozen=True, weakref_slot=False, auto_attribs=True) class ProfileInfo: avatar_url: Optional[str] display_name: Optional[str] -@attr.s(slots=True, frozen=True, weakref_slot=True, auto_attribs=True) +@attr.s(slots=True, frozen=True, weakref_slot=False, auto_attribs=True) class MemberSummary: # A truncated list of (user_id, event_id) tuples for users of a given # membership type, suitable for use in calculating heroes for a room. |