Add stream_id to page_params.{subscriptions,unsubscribed}

This isn't used by the client yet, but it should be harmless.

(imported from commit e09ac65ca802f5cf16375b8a93d34e0dfbcb76b4)
This commit is contained in:
Steve Howell 2014-02-05 13:58:41 -05:00
parent 0366659bee
commit 3a96686cbc
3 changed files with 4 additions and 0 deletions

View File

@ -358,6 +358,7 @@ function populate_subscriptions(subs, subscribed) {
invite_only: elem.invite_only, invite_only: elem.invite_only,
notifications: elem.notifications, subscribed: subscribed, notifications: elem.notifications, subscribed: subscribed,
email_address: elem.email_address, email_address: elem.email_address,
stream_id: elem.stream_id,
subscribers: elem.subscribers, subscribers: elem.subscribers,
description: elem.description}); description: elem.description});
sub_rows.push(sub); sub_rows.push(sub);

View File

@ -897,6 +897,7 @@ def notify_subscriptions_added(user_profile, sub_pairs, stream_emails, no_log=Fa
# Send a notification to the user who subscribed. # Send a notification to the user who subscribed.
payload = [dict(name=stream.name, payload = [dict(name=stream.name,
stream_id=stream.id,
in_home_view=subscription.in_home_view, in_home_view=subscription.in_home_view,
invite_only=stream.invite_only, invite_only=stream.invite_only,
color=subscription.color, color=subscription.color,
@ -1912,6 +1913,7 @@ def gather_subscriptions_helper(user_profile):
'invite_only': stream["invite_only"], 'invite_only': stream["invite_only"],
'color': sub["color"], 'color': sub["color"],
'notifications': sub["notifications"], 'notifications': sub["notifications"],
'stream_id': stream["id"],
'description': stream["description"], 'description': stream["description"],
'email_address': encode_email_address_helper(stream["name"], stream["email_token"])} 'email_address': encode_email_address_helper(stream["name"], stream["email_token"])}
if subscribers is not None: if subscribers is not None:

View File

@ -280,6 +280,7 @@ class EventsRegisterTest(AuthedTestCase):
('in_home_view', check_bool), ('in_home_view', check_bool),
('name', check_string), ('name', check_string),
('notifications', check_bool), ('notifications', check_bool),
('stream_id', check_int),
('subscribers', check_list(check_int)), ('subscribers', check_list(check_int)),
]) ])
) )