mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:16:07 -04:00
Add get endpoint for pushers
As per https://github.com/matrix-org/matrix-doc/pull/308
This commit is contained in:
parent
790f5848b2
commit
8a76094965
2 changed files with 53 additions and 1 deletions
|
@ -75,6 +75,25 @@ class PusherStore(SQLBaseStore):
|
|||
|
||||
defer.returnValue(rows)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def get_pushers_by_app_user_id(self, user_id):
|
||||
def r(txn):
|
||||
sql = (
|
||||
"SELECT * FROM pushers"
|
||||
" WHERE user_name = ?"
|
||||
)
|
||||
|
||||
txn.execute(sql, (user_id,))
|
||||
rows = self.cursor_to_dict(txn)
|
||||
|
||||
return self._decode_pushers_rows(rows)
|
||||
|
||||
result = yield self.runInteraction(
|
||||
"get_pushers_by_user_id", r
|
||||
)
|
||||
|
||||
defer.returnValue(result)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def get_all_pushers(self):
|
||||
def get_pushers(txn):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue