mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-08-15 17:10:19 -04:00
Very first cut of calculating actions for events as they come in. Doesn't store them yet. Not very efficient.
This commit is contained in:
parent
86345a511f
commit
21f135ba76
4 changed files with 81 additions and 1 deletions
|
@ -291,6 +291,18 @@ class RegistrationStore(SQLBaseStore):
|
|||
defer.returnValue(ret['user_id'])
|
||||
defer.returnValue(None)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def get_all_user_ids(self):
|
||||
"""Returns all user ids registered on this homeserver"""
|
||||
return self.runInteraction(
|
||||
"get_all_user_ids",
|
||||
self._get_all_user_ids_txn
|
||||
)
|
||||
|
||||
def _get_all_user_ids_txn(self, txn):
|
||||
txn.execute("SELECT name from users")
|
||||
return [r[0] for r in txn.fetchall()]
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def count_all_users(self):
|
||||
"""Counts all users registered on the homeserver."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue