diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-09-17 16:05:30 +0100 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-09-17 16:09:07 +0100 |
commit | c707b7d12895c01b998c4676a257f0f5f75a56ba (patch) | |
tree | badbf63da0b36f74ea2f265482a315df42445b60 | |
parent | SYWEB-22: Format emote('/me') messages correctly in desktop notification (diff) | |
download | synapse-c707b7d12895c01b998c4676a257f0f5f75a56ba.tar.xz |
SYWEB-3 : Added 'visibility' key to rooms returned via /initialSync
-rw-r--r-- | synapse/handlers/message.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index b63863e5b2..14fae689f2 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -268,6 +268,9 @@ class MessageHandler(BaseHandler): user, pagination_config, None ) + public_rooms = yield self.store.get_rooms(is_public=True) + public_room_ids = [r["room_id"] for r in public_rooms] + limit = pagin_config.limit if not limit: limit = 10 @@ -276,6 +279,8 @@ class MessageHandler(BaseHandler): d = { "room_id": event.room_id, "membership": event.membership, + "visibility": ("public" if event.room_id in + public_room_ids else "private"), } if event.membership == Membership.INVITE: |