'Generate the entry for a room in the public room list and append it
to the `chunk` if it matches the search filter'

@defer.inlineCallbacks
def _append_room_entry_to_chunk(self, room_id, num_joined_users, chunk, limit, search_filter):

    if (limit and (len(chunk) > (limit + 1))):
        return
    result = (yield self._generate_room_entry(room_id, num_joined_users))
    if (result and _matches_room_entry(result, search_filter)):
        chunk.append(result)
