When subscribing to streams, send back the canonical stream name

(imported from commit 7803409878cca4627447bc64735ad71f56701a5c)
This commit is contained in:
Zev Benjamin 2013-01-14 15:40:42 -05:00
parent 17e92ebe13
commit 4ffc6a2de1
1 changed files with 2 additions and 2 deletions

View File

@ -868,9 +868,9 @@ def add_subscriptions_backend(request, user_profile,
stream = create_stream_if_needed(subscriber.realm, stream_name) stream = create_stream_if_needed(subscriber.realm, stream_name)
did_subscribe = do_add_subscription(subscriber, stream) did_subscribe = do_add_subscription(subscriber, stream)
if did_subscribe: if did_subscribe:
result["subscribed"].append(stream_name) result["subscribed"].append(stream.name)
else: else:
result["already_subscribed"].append(stream_name) result["already_subscribed"].append(stream.name)
# Inform the user if someone else subscribed them to stuff # Inform the user if someone else subscribed them to stuff
if subscriber != user_profile and result["subscribed"]: if subscriber != user_profile and result["subscribed"]: