mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 12:21:58 +00:00
do_change_stream_description: Accept a stream as argument.
This commit is contained in:
@@ -2115,14 +2115,13 @@ def do_rename_stream(stream, new_name, log=True):
|
||||
# email forwarding address to display the correctly-escaped new name.
|
||||
return {"email_address": new_email}
|
||||
|
||||
def do_change_stream_description(realm, stream_name, new_description):
|
||||
# type: (Realm, Text, Text) -> None
|
||||
stream = get_stream(stream_name, realm)
|
||||
def do_change_stream_description(stream, new_description):
|
||||
# type: (Stream, Text) -> None
|
||||
stream.description = new_description
|
||||
stream.save(update_fields=['description'])
|
||||
|
||||
event = dict(type='stream', op='update',
|
||||
property='description', name=stream_name,
|
||||
property='description', name=stream.name,
|
||||
value=new_description)
|
||||
send_event(event, can_access_stream_user_ids(stream))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user