Rename get_public_room_ids() to get_published_room_ids()

This commit is contained in:
Paul "LeoNerd" Evans 2015-06-18 14:07:41 +01:00
parent 0dd8953cbc
commit 4909cd0202
2 changed files with 5 additions and 4 deletions

View file

@ -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"
),
}

View file

@ -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