mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-18 08:54:54 +03:00
Rename get_public_room_ids() to get_published_room_ids()
This commit is contained in:
parent
0dd8953cbc
commit
4909cd0202
2 changed files with 5 additions and 4 deletions
|
@ -278,7 +278,7 @@ class MessageHandler(BaseHandler):
|
|||
user, pagination_config.get_source_config("presence"), None
|
||||
)
|
||||
|
||||
public_room_ids = yield self.store.get_public_room_ids()
|
||||
published_room_ids = yield self.store.get_published_room_ids()
|
||||
|
||||
limit = pagin_config.limit
|
||||
if limit is None:
|
||||
|
@ -290,7 +290,8 @@ class MessageHandler(BaseHandler):
|
|||
"room_id": event.room_id,
|
||||
"membership": event.membership,
|
||||
"visibility": (
|
||||
"public" if event.room_id in public_room_ids
|
||||
# TODO(paul): This should be specified as "published"
|
||||
"public" if event.room_id in published_room_ids
|
||||
else "private"
|
||||
),
|
||||
}
|
||||
|
|
|
@ -75,14 +75,14 @@ class RoomStore(SQLBaseStore):
|
|||
allow_none=True,
|
||||
)
|
||||
|
||||
def get_public_room_ids(self):
|
||||
def get_published_room_ids(self):
|
||||
return self._simple_select_onecol(
|
||||
table="rooms",
|
||||
keyvalues={
|
||||
"is_public": True,
|
||||
},
|
||||
retcol="room_id",
|
||||
desc="get_public_room_ids",
|
||||
desc="get_published_room_ids",
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
|
Loading…
Reference in a new issue