diff options
author | Mark Haines <mjark@negativecurvature.net> | 2016-04-08 14:01:56 +0100 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2016-04-08 14:01:56 +0100 |
commit | 7e2f971c08250cf432d43dd6244faefb2074ff8c (patch) | |
tree | aa3987ef26f11dc98651a28c587ecb63155e8156 /synapse/storage/roommember.py | |
parent | Merge pull request #710 from matrix-org/markjh/move_fire (diff) | |
download | synapse-7e2f971c08250cf432d43dd6244faefb2074ff8c.tar.xz |
Remove some unused functions (#711)
* Remove some unused functions * get_room_events_stream is only used in tests * is_exclusive_room might actually be something we want
Diffstat (limited to 'synapse/storage/roommember.py')
-rw-r--r-- | synapse/storage/roommember.py | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py index 66e7a40e3c..77518e893f 100644 --- a/synapse/storage/roommember.py +++ b/synapse/storage/roommember.py @@ -121,26 +121,6 @@ class RoomMemberStore(SQLBaseStore): with self._stream_id_gen.get_next() as stream_ordering: yield self.runInteraction("locally_reject_invite", f, stream_ordering) - def get_room_member(self, user_id, room_id): - """Retrieve the current state of a room member. - - Args: - user_id (str): The member's user ID. - room_id (str): The room the member is in. - Returns: - Deferred: Results in a MembershipEvent or None. - """ - return self.runInteraction( - "get_room_member", - self._get_members_events_txn, - room_id, - user_id=user_id, - ).addCallback( - self._get_events - ).addCallback( - lambda events: events[0] if events else None - ) - @cached(max_entries=5000) def get_users_in_room(self, room_id): def f(txn): @@ -203,19 +183,6 @@ class RoomMemberStore(SQLBaseStore): defer.returnValue(invite) defer.returnValue(None) - def get_leave_and_ban_events_for_user(self, user_id): - """ Get all the leave events for a user - Args: - user_id (str): The user ID. - Returns: - A deferred list of event objects. - """ - return self.get_rooms_for_user_where_membership_is( - user_id, (Membership.LEAVE, Membership.BAN) - ).addCallback(lambda leaves: self._get_events([ - leave.event_id for leave in leaves - ])) - def get_rooms_for_user_where_membership_is(self, user_id, membership_list): """ Get all the rooms for this user where the membership for this user matches one in the membership list. |