Merge branch 'develop' of github.com:matrix-org/synapse into erikj/receipts_take2

This commit is contained in:
Erik Johnston 2015-08-17 13:23:44 +01:00
commit afef6f5d16
10 changed files with 105 additions and 147 deletions

View file

@ -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

View file

@ -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)