diff options
author | David Baker <dbkr@users.noreply.github.com> | 2016-01-08 14:47:15 +0000 |
---|---|---|
committer | David Baker <dbkr@users.noreply.github.com> | 2016-01-08 14:47:15 +0000 |
commit | c232780081c7d56de34d7c2a270aabb55bbfeec1 (patch) | |
tree | d4cf21a860a1c98e50a2154c076788185c27f9d2 /synapse/rest | |
parent | Merge pull request #475 from matrix-org/markjh/fix_thumbnail (diff) | |
parent | This comma is actually important (diff) | |
download | synapse-c232780081c7d56de34d7c2a270aabb55bbfeec1.tar.xz |
Merge pull request #456 from matrix-org/store_event_actions
Send unread notification counts
Diffstat (limited to 'synapse/rest')
-rw-r--r-- | synapse/rest/client/v2_alpha/register.py | 5 | ||||
-rw-r--r-- | synapse/rest/client/v2_alpha/sync.py | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/synapse/rest/client/v2_alpha/register.py b/synapse/rest/client/v2_alpha/register.py index 25389ceded..c4d025b465 100644 --- a/synapse/rest/client/v2_alpha/register.py +++ b/synapse/rest/client/v2_alpha/register.py @@ -259,7 +259,10 @@ class RegisterRestServlet(RestServlet): def _do_guest_registration(self): if not self.hs.config.allow_guest_access: defer.returnValue((403, "Guest access is disabled")) - user_id, _ = yield self.registration_handler.register(generate_token=False) + user_id, _ = yield self.registration_handler.register( + generate_token=False, + make_guest=True + ) access_token = self.auth_handler.generate_access_token(user_id, ["guest = true"]) defer.returnValue((200, { "user_id": user_id, diff --git a/synapse/rest/client/v2_alpha/sync.py b/synapse/rest/client/v2_alpha/sync.py index c05e7d50c8..2558dc415c 100644 --- a/synapse/rest/client/v2_alpha/sync.py +++ b/synapse/rest/client/v2_alpha/sync.py @@ -311,6 +311,7 @@ class SyncRestServlet(RestServlet): if joined: ephemeral_events = filter.filter_room_ephemeral(room.ephemeral) result["ephemeral"] = {"events": ephemeral_events} + result["unread_notification_count"] = room.unread_notification_count return result |