mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
drafts: Add support for toggling drafts synchronization.
With changes mostly to the API documentation by tabbott.
This commit is contained in:
committed by
Tim Abbott
parent
4d3b10d84d
commit
c00089ac28
@@ -197,6 +197,7 @@ from zerver.models import (
|
||||
CustomProfileFieldValue,
|
||||
DefaultStream,
|
||||
DefaultStreamGroup,
|
||||
Draft,
|
||||
EmailChangeStatus,
|
||||
Message,
|
||||
MultiuseInvite,
|
||||
@@ -5101,6 +5102,13 @@ def do_set_user_display_setting(
|
||||
active_user_ids(user_profile.realm_id),
|
||||
)
|
||||
|
||||
if setting_name == "enable_drafts_synchronization" and setting_value is False:
|
||||
# Delete all of the drafts from the backend but don't send delete events
|
||||
# for them since all that's happened is that we stopped syncing changes,
|
||||
# not deleted every previously synced draft - to do that use the DELETE
|
||||
# endpoint.
|
||||
Draft.objects.filter(user_profile=user_profile).delete()
|
||||
|
||||
|
||||
def lookup_default_stream_groups(
|
||||
default_stream_group_names: List[str], realm: Realm
|
||||
|
||||
Reference in New Issue
Block a user