send_message: Add an optional parameter in the success response.

Add an optional `automatic_new_visibility_policy` enum field
in the success response to indicate the new visibility policy
value due to the `automatically_follow_topics_policy` and
`automatically_unmute_topics_in_muted_streams_policy` user settings
during the send message action.

Only present if there is a change in the visibility policy.
This commit is contained in:
Prakhar Pratyush
2023-10-09 16:41:32 +05:30
committed by Tim Abbott
parent 0c649ff2aa
commit 17a0304309
11 changed files with 136 additions and 29 deletions

View File

@@ -1071,7 +1071,7 @@ Output:
recipient_list = [to_user.id]
(sending_client, _) = Client.objects.get_or_create(name=sending_client_name)
return check_send_message(
sent_message_result = check_send_message(
from_user,
sending_client,
"private",
@@ -1079,6 +1079,7 @@ Output:
None,
content,
)
return sent_message_result.message_id
def send_huddle_message(
self,
@@ -1092,7 +1093,7 @@ Output:
(sending_client, _) = Client.objects.get_or_create(name=sending_client_name)
return check_send_message(
sent_message_result = check_send_message(
from_user,
sending_client,
"private",
@@ -1100,6 +1101,7 @@ Output:
None,
content,
)
return sent_message_result.message_id
def send_stream_message(
self,