mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 11:43:51 +01:00
Add rest servlet. Fix SQL.
This commit is contained in:
parent
eef7778af9
commit
67f2c901ea
2 changed files with 5 additions and 5 deletions
|
@ -124,3 +124,4 @@ def register_servlets(hs, http_server):
|
|||
WhoisRestServlet(hs).register(http_server)
|
||||
PurgeMediaCacheRestServlet(hs).register(http_server)
|
||||
DeactivateAccountRestServlet(hs).register(http_server)
|
||||
PurgeHistoryRestServlet(hs).register(http_server)
|
||||
|
|
|
@ -1384,10 +1384,6 @@ class EventsStore(SQLBaseStore):
|
|||
(event_id,) for event_id, state_key in event_rows
|
||||
if state_key is None and not self.hs.is_mine_id(event_id)
|
||||
]
|
||||
to_not_delete = [
|
||||
(event_id,) for event_id, state_key in event_rows
|
||||
if state_key is not None or self.hs.is_mine_id(event_id)
|
||||
]
|
||||
for table in (
|
||||
"events",
|
||||
"event_json",
|
||||
|
@ -1424,7 +1420,10 @@ class EventsStore(SQLBaseStore):
|
|||
txn.executemany(
|
||||
"UPDATE events SET outlier = ?"
|
||||
" WHERE event_id = ?",
|
||||
to_not_delete
|
||||
[
|
||||
(True, event_id,) for event_id, state_key in event_rows
|
||||
if state_key is not None or self.hs.is_mine_id(event_id)
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue