Add support for loading a narrows-only embedded Zulip window.

Features:
* Only shows messages in the narrow
* New messages in the narrow will arrive as they are sent
* Works even for streams you're not subscribed to
* Automatically subscribes you to a stream on send
* Doesn't update your pointer
* All searches etc. automatically have the narrow added

(imported from commit 2e12b76849f6ca0f53dda5985dad477a04f7bbac)
This commit is contained in:
Tim Abbott
2013-12-13 14:20:28 -05:00
parent 8e6728f206
commit 2276c6e524
7 changed files with 60 additions and 21 deletions

View File

@@ -288,7 +288,7 @@ def get_client_descriptors_for_realm_all_streams(realm_id):
def add_to_client_dicts(client):
user_clients.setdefault(client.user_profile_id, []).append(client)
if client.all_public_streams:
if client.all_public_streams or client.narrow != []:
realm_clients_all_streams.setdefault(client.realm_id, []).append(client)
def allocate_client_descriptor(user_profile_id, realm_id, event_types, client_type,