SYWEB-3 : Added 'visibility' key to rooms returned via /initialSync
This commit is contained in:
parent
65c37cc852
commit
c707b7d128
1 changed files with 5 additions and 0 deletions
|
@ -268,6 +268,9 @@ class MessageHandler(BaseHandler):
|
||||||
user, pagination_config, None
|
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
|
limit = pagin_config.limit
|
||||||
if not limit:
|
if not limit:
|
||||||
limit = 10
|
limit = 10
|
||||||
|
@ -276,6 +279,8 @@ class MessageHandler(BaseHandler):
|
||||||
d = {
|
d = {
|
||||||
"room_id": event.room_id,
|
"room_id": event.room_id,
|
||||||
"membership": event.membership,
|
"membership": event.membership,
|
||||||
|
"visibility": ("public" if event.room_id in
|
||||||
|
public_room_ids else "private"),
|
||||||
}
|
}
|
||||||
|
|
||||||
if event.membership == Membership.INVITE:
|
if event.membership == Membership.INVITE:
|
||||||
|
|
Loading…
Reference in a new issue