mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-09-08 04:51:58 +00:00
Remove unused functions
This commit is contained in:
parent
fda63064fc
commit
3891597eb3
@ -33,12 +33,6 @@ class EventBuilder(EventBase):
|
|||||||
unsigned=unsigned
|
unsigned=unsigned
|
||||||
)
|
)
|
||||||
|
|
||||||
def update_event_key(self, key, value):
|
|
||||||
self._event_dict[key] = value
|
|
||||||
|
|
||||||
def update_event_keys(self, other_dict):
|
|
||||||
self._event_dict.update(other_dict)
|
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
return FrozenEvent.from_event(self)
|
return FrozenEvent.from_event(self)
|
||||||
|
|
||||||
|
@ -58,13 +58,6 @@ class RoomStore(SQLBaseStore):
|
|||||||
logger.error("store_room with room_id=%s failed: %s", room_id, e)
|
logger.error("store_room with room_id=%s failed: %s", room_id, e)
|
||||||
raise StoreError(500, "Problem creating room.")
|
raise StoreError(500, "Problem creating room.")
|
||||||
|
|
||||||
def store_room_config(self, room_id, visibility):
|
|
||||||
return self._simple_update_one(
|
|
||||||
table=RoomsTable.table_name,
|
|
||||||
keyvalues={"room_id": room_id},
|
|
||||||
updatevalues={"is_public": visibility}
|
|
||||||
)
|
|
||||||
|
|
||||||
def get_room(self, room_id):
|
def get_room(self, room_id):
|
||||||
"""Retrieve a room.
|
"""Retrieve a room.
|
||||||
|
|
||||||
|
@ -78,12 +78,6 @@ class StateStore(SQLBaseStore):
|
|||||||
f,
|
f,
|
||||||
)
|
)
|
||||||
|
|
||||||
def store_state_groups(self, event):
|
|
||||||
return self.runInteraction(
|
|
||||||
"store_state_groups",
|
|
||||||
self._store_state_groups_txn, event
|
|
||||||
)
|
|
||||||
|
|
||||||
def _store_state_groups_txn(self, txn, event, context):
|
def _store_state_groups_txn(self, txn, event, context):
|
||||||
if context.current_state is None:
|
if context.current_state is None:
|
||||||
return
|
return
|
||||||
|
@ -56,17 +56,6 @@ class RoomStoreTestCase(unittest.TestCase):
|
|||||||
(yield self.store.get_room(self.room.to_string()))
|
(yield self.store.get_room(self.room.to_string()))
|
||||||
)
|
)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
|
||||||
def test_store_room_config(self):
|
|
||||||
yield self.store.store_room_config(self.room.to_string(),
|
|
||||||
visibility=False
|
|
||||||
)
|
|
||||||
|
|
||||||
self.assertObjectHasAttributes(
|
|
||||||
{"is_public": False},
|
|
||||||
(yield self.store.get_room(self.room.to_string()))
|
|
||||||
)
|
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def test_get_rooms(self):
|
def test_get_rooms(self):
|
||||||
# get_rooms does an INNER JOIN on the room_aliases table :(
|
# get_rooms does an INNER JOIN on the room_aliases table :(
|
||||||
|
Loading…
Reference in New Issue
Block a user