mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
notification_trigger: Rename private_message to direct_message.
This commit renames the 'PRIVATE_MESSAGE' attribute of the 'NotificationTriggers' class to 'DIRECT_MESSAGE'. Custom migration to update the existing value in the database. It includes 'TODO/compatibility' code to support the old notification trigger value 'private_message' in the push notification queue during the Zulip server upgrades. Earlier 'private_message' was one of the possible values for the 'trigger' property of the '[`POST /zulip-outgoing-webhook`]' response; Update the docs to reflect the change in the above-mentioned trigger value.
This commit is contained in:
committed by
Tim Abbott
parent
3675a44471
commit
c4e4737cc6
@@ -0,0 +1,24 @@
|
||||
# Generated by Django 4.2.3 on 2023-08-04 14:08
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("zerver", "0464_remove_realmplayground_url_prefix"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunSQL(
|
||||
"""
|
||||
UPDATE zerver_scheduledmessagenotificationemail
|
||||
SET trigger = 'direct_message'
|
||||
WHERE trigger = 'private_message';
|
||||
""",
|
||||
reverse_sql="""
|
||||
UPDATE zerver_scheduledmessagenotificationemail
|
||||
SET trigger = 'private_message'
|
||||
WHERE trigger = 'direct_message';
|
||||
""",
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user