mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-14 15:35:22 -04:00
Stream public room changes down replication
This commit is contained in:
parent
4fb65a1091
commit
211786ecd6
4 changed files with 74 additions and 1 deletions
|
@ -307,3 +307,19 @@ class RoomStore(SQLBaseStore):
|
|||
return self.runInteraction(
|
||||
"get_public_room_changes", get_public_room_changes_txn
|
||||
)
|
||||
|
||||
def get_all_new_public_rooms(self, prev_id, current_id, limit):
|
||||
def get_all_new_public_rooms(txn):
|
||||
sql = ("""
|
||||
SELECT stream_id, room_id, visibility FROM public_room_list_stream
|
||||
WHERE stream_id > ? AND stream_id <= ?
|
||||
ORDER BY stream_id ASC
|
||||
LIMIT ?
|
||||
""")
|
||||
|
||||
txn.execute(sql, (prev_id, current_id, limit,))
|
||||
return txn.fetchall()
|
||||
|
||||
return self.runInteraction(
|
||||
"get_all_new_public_rooms", get_all_new_public_rooms
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue