mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-09-22 17:24:36 -04:00
Merge branch 'develop' of github.com:matrix-org/synapse into postgres
This commit is contained in:
commit
327ca883ec
37 changed files with 1361 additions and 304 deletions
|
@ -487,3 +487,15 @@ def prepare_sqlite3_database(db_conn):
|
|||
" VALUES (?,?)",
|
||||
(row[0], False)
|
||||
)
|
||||
|
||||
|
||||
def are_all_users_on_domain(txn, database_engine, domain):
|
||||
sql = database_engine.convert_param_style(
|
||||
"SELECT COUNT(*) FROM users WHERE name NOT LIKE ?"
|
||||
)
|
||||
pat = "%:" + domain
|
||||
txn.execute(sql, (pat,))
|
||||
num_not_matching = txn.fetchall()[0][0]
|
||||
if num_not_matching == 0:
|
||||
return True
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue