Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix weakref_slot parameter for room member storage attrs. (#10642)
Browse files Browse the repository at this point in the history
Follow-up to #10629 which set it to true, not false.
  • Loading branch information
clokep committed Aug 18, 2021
1 parent bec01c0 commit d9856d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelog.d/10642.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Convert room member storage tuples to `attrs` classes.
8 changes: 4 additions & 4 deletions synapse/storage/roommember.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
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
Expand All @@ -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.
Expand Down

0 comments on commit d9856d9

Please sign in to comment.