mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-30 20:48:37 -04:00
Merge branch 'develop' into rav/upsert_for_device_list
This commit is contained in:
commit
30a19daa02
74 changed files with 1244 additions and 779 deletions
|
@ -273,8 +273,7 @@ class RegistrationWorkerStore(SQLBaseStore):
|
|||
desc="delete_account_validity_for_user",
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def is_server_admin(self, user):
|
||||
async def is_server_admin(self, user):
|
||||
"""Determines if a user is an admin of this homeserver.
|
||||
|
||||
Args:
|
||||
|
@ -283,7 +282,7 @@ class RegistrationWorkerStore(SQLBaseStore):
|
|||
Returns (bool):
|
||||
true iff the user is a server admin, false otherwise.
|
||||
"""
|
||||
res = yield self.db.simple_select_one_onecol(
|
||||
res = await self.db.simple_select_one_onecol(
|
||||
table="users",
|
||||
keyvalues={"name": user.to_string()},
|
||||
retcol="admin",
|
||||
|
|
|
@ -35,9 +35,13 @@ DELETE FROM background_updates WHERE update_name IN (
|
|||
'populate_stats_cleanup'
|
||||
);
|
||||
|
||||
-- this relies on current_state_events.membership having been populated, so add
|
||||
-- a dependency on current_state_events_membership.
|
||||
INSERT INTO background_updates (update_name, progress_json, depends_on) VALUES
|
||||
('populate_stats_process_rooms', '{}', '');
|
||||
('populate_stats_process_rooms', '{}', 'current_state_events_membership');
|
||||
|
||||
-- this also relies on current_state_events.membership having been populated, but
|
||||
-- we get that as a side-effect of depending on populate_stats_process_rooms.
|
||||
INSERT INTO background_updates (update_name, progress_json, depends_on) VALUES
|
||||
('populate_stats_process_users', '{}', 'populate_stats_process_rooms');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue