zulip/zerver
Zev Benjamin 814aed7cbe Send an event when a stream is created, is deleted, becomes occupied, or becomes vacant
A stream is vacant when it has no subscribers and occupied when it has at least
one subscriber.

We have a slightly odd model where stream creation is conflated with
subscription creation.  Streams are created by attempting to subscribe to a
stream that doesn't exist.  We also hide streams with no subscribers from users
to make it seem like they've gone away.  However, we can't actually remove those
streams because we want to preserve history.

This commit moves us towards a separation of these two concepts.  By sending
events for stream creation, occupation, vacancy, and deletion, we allow clients
to directly observe the global state of streams rather than indirectly observing
subscription information.  A more complete solution would involve adding a view
for explicitly creating streams without subscribing to them.

This commit does not handle the intricacies of invite-only streams.  We
currently simply do not send these events for invite-only streams.

(imported from commit 5430e5a5eecefafcdba4f5d4f9aa665556fcc559)
2014-03-03 17:30:58 -05:00
..
fixtures JIRA: Show all updated fields as long as one is not truthy 2014-02-27 20:25:35 -05:00
lib Send an event when a stream is created, is deleted, becomes occupied, or becomes vacant 2014-03-03 17:30:58 -05:00
management Fix bug that hid digest email settings box for customers. 2014-02-27 20:25:26 -05:00
migrations [schema] Split Subscription notifications field into audible + desktop. 2014-03-03 16:08:31 -05:00
templatetags Add a custom template filter for formatting displaying lists of items in emails. 2013-10-25 19:11:40 -04:00
tests/frontend Convert settings from static HTML to a template. 2014-03-03 16:08:32 -05:00
views Move bulk of get_streams_backend to actions.py 2014-03-03 17:30:57 -05:00
worker Add helper function for returning a Redis client 2014-02-10 13:23:28 -05:00
__init__.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
context_processors.py Fix documentation for email gateway on Zulip Enterprise. 2013-12-04 16:39:39 -05:00
decorator.py Remove unused json_to_list function. 2014-02-18 14:24:04 -05:00
exceptions.py Enable absolute imports for non-third-party code where it was omitted previously 2013-10-25 14:13:30 -04:00
filters.py Add api_key to filtered variables. 2013-12-12 10:31:03 -05:00
finders.py [manual] Move our deployment scripts to scripts/. 2013-10-28 10:54:48 -04:00
forms.py [manual] Allow signups for emails held by non-MIT mirror dummy accounts. 2014-01-10 21:38:59 -05:00
handlers.py Remove old email error reporting handler 2013-11-13 16:22:21 -05:00
middleware.py Blacklist more paths, and fix paths with / to use . instead 2014-02-03 14:06:58 -05:00
models.py Send an event when a stream is created, is deleted, becomes occupied, or becomes vacant 2014-03-03 17:30:58 -05:00
openid.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
retention_policy.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
static_header.txt Update copyright to 2014. 2014-02-04 15:51:53 -05:00
storage.py Enable absolute imports for non-third-party code where it was omitted previously 2013-10-25 14:13:30 -04:00
test_bugdown.py Properly preview images from Dropbox photo albums. 2014-02-27 20:25:35 -05:00
test_decorators.py Remove unused json_to_list function. 2014-02-18 14:24:04 -05:00
test_events.py Send an event when a stream is created, is deleted, becomes occupied, or becomes vacant 2014-03-03 17:30:58 -05:00
test_external.py Extract test_external.py 2014-01-31 13:14:19 -05:00
test_hooks.py JIRA: Show all updated fields as long as one is not truthy 2014-02-27 20:25:35 -05:00
test_messages.py Exclude muted streams in exclude_muting_conditions(). 2014-02-27 20:25:37 -05:00
test_signup.py Send an event when a stream is created, is deleted, becomes occupied, or becomes vacant 2014-03-03 17:30:58 -05:00
test_subs.py Send an event when a stream is created, is deleted, becomes occupied, or becomes vacant 2014-03-03 17:30:58 -05:00
test_unread.py Move some tests into test_unread.py 2014-02-10 13:23:27 -05:00
tests.py Convert settings from static HTML to a template. 2014-03-03 16:08:32 -05:00
tornado_callbacks.py Remove stray } from name of queue 2014-01-29 15:46:04 -05:00
tornadoviews.py Eliminate json_to_dict and use check_dict instead. 2014-02-18 13:02:08 -05:00