mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-10 23:45:57 -05:00
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/receipts_take2
This commit is contained in:
commit
afef6f5d16
10 changed files with 105 additions and 147 deletions
|
|
@ -112,16 +112,16 @@ class RegistrationStore(SQLBaseStore):
|
|||
})
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def user_delete_access_tokens_apart_from(self, user_id, token_id):
|
||||
def user_delete_access_tokens(self, user_id):
|
||||
yield self.runInteraction(
|
||||
"user_delete_access_tokens_apart_from",
|
||||
self._user_delete_access_tokens_apart_from, user_id, token_id
|
||||
"user_delete_access_tokens",
|
||||
self._user_delete_access_tokens, user_id
|
||||
)
|
||||
|
||||
def _user_delete_access_tokens_apart_from(self, txn, user_id, token_id):
|
||||
def _user_delete_access_tokens(self, txn, user_id):
|
||||
txn.execute(
|
||||
"DELETE FROM access_tokens WHERE user_id = ? AND id != ?",
|
||||
(user_id, token_id)
|
||||
"DELETE FROM access_tokens WHERE user_id = ?",
|
||||
(user_id, )
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
|
|
|||
|
|
@ -412,9 +412,10 @@ class StateStore(SQLBaseStore):
|
|||
full=(types is None),
|
||||
)
|
||||
|
||||
results[group].update({
|
||||
# We replace here to remove all the entries with None values.
|
||||
results[group] = {
|
||||
key: value for key, value in state_dict.items() if value
|
||||
})
|
||||
}
|
||||
|
||||
defer.returnValue(results)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue