mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-19 17:47:49 -04:00
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
This commit is contained in:
commit
088d52ba6c
10 changed files with 401 additions and 149 deletions
|
@ -599,14 +599,14 @@ class PresenceHandler(object):
|
|||
for user_id in user_ids
|
||||
}
|
||||
|
||||
missing = [user_id for user_id, state in states.items() if not state]
|
||||
missing = [user_id for user_id, state in states.iteritems() if not state]
|
||||
if missing:
|
||||
# There are things not in our in memory cache. Lets pull them out of
|
||||
# the database.
|
||||
res = yield self.store.get_presence_for_users(missing)
|
||||
states.update(res)
|
||||
|
||||
missing = [user_id for user_id, state in states.items() if not state]
|
||||
missing = [user_id for user_id, state in states.iteritems() if not state]
|
||||
if missing:
|
||||
new = {
|
||||
user_id: UserPresenceState.default(user_id)
|
||||
|
|
|
@ -24,7 +24,6 @@ from synapse.types import UserID, get_domain_from_id
|
|||
import logging
|
||||
|
||||
from collections import namedtuple
|
||||
import ujson as json
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -288,8 +287,7 @@ class TypingHandler(object):
|
|||
for room_id, serial in self._room_serials.items():
|
||||
if last_id < serial and serial <= current_id:
|
||||
typing = self._room_typing[room_id]
|
||||
typing_bytes = json.dumps(list(typing), ensure_ascii=False)
|
||||
rows.append((serial, room_id, typing_bytes))
|
||||
rows.append((serial, room_id, list(typing)))
|
||||
rows.sort()
|
||||
return rows
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue