0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 22:13:52 +01:00

Fix weakref_slot parameter for room member storage attrs. (#10642)

Follow-up to #10629 which set it to true, not false.
This commit is contained in:
Patrick Cloke 2021-08-18 11:00:37 -04:00 committed by GitHub
parent bec01c0758
commit d9856d9150
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

1
changelog.d/10642.misc Normal file
View file

@ -0,0 +1 @@
Convert room member storage tuples to `attrs` classes.

View file

@ -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.