Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add user settings for info notifications #1926

Merged
merged 10 commits into from
May 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use default_sound for info notifications
  • Loading branch information
imtoori authored May 12, 2023
commit 16284468b925c25396f290c3ef27180fd688eba7
2 changes: 1 addition & 1 deletion engine/apps/mobile_app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class VolumeType(models.TextChoices):
# "You're going OnCall soon" push notification
info_notifications_enabled = models.BooleanField(default=True)

info_notification_sound_name = models.CharField(max_length=100, default="default_sound_info")
info_notification_sound_name = models.CharField(max_length=100, default="default_sound")
info_notification_volume_type = models.CharField(
max_length=50, choices=VolumeType.choices, default=VolumeType.CONSTANT
)
Expand Down
4 changes: 2 additions & 2 deletions engine/apps/mobile_app/tests/test_notify_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def test_fcm_message_user_settings(
assert message.data["default_notification_volume_type"] == "constant"
assert message.data["default_notification_volume_override"] == "false"
assert message.data["default_notification_volume"] == "0.8"
assert message.data["info_notification_sound_name"] == "default_sound_info.mp3"
assert message.data["info_notification_sound_name"] == "default_sound.mp3"
assert message.data["info_notification_volume_type"] == "constant"
assert message.data["info_notification_volume_override"] == "false"
assert message.data["info_notification_volume"] == "0.8"
Expand Down Expand Up @@ -265,7 +265,7 @@ def test_fcm_message_user_settings_critical(
assert message.data["default_notification_volume_type"] == "constant"
assert message.data["default_notification_volume_override"] == "false"
assert message.data["default_notification_volume"] == "0.8"
assert message.data["info_notification_sound_name"] == "default_sound_info.mp3"
assert message.data["info_notification_sound_name"] == "default_sound.mp3"
assert message.data["info_notification_volume_type"] == "constant"
assert message.data["info_notification_volume_override"] == "false"
assert message.data["info_notification_volume"] == "0.8"
Expand Down
4 changes: 2 additions & 2 deletions engine/apps/mobile_app/tests/test_user_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def test_user_settings_get(make_organization_and_user_with_mobile_app_auth_token
"default_notification_volume_type": "constant",
"default_notification_volume": 0.8,
"default_notification_volume_override": False,
"info_notification_sound_name": "default_sound_info",
"info_notification_sound_name": "default_sound",
"info_notification_volume_type": "constant",
"info_notification_volume": 0.8,
"info_notification_volume_override": False,
Expand Down Expand Up @@ -56,7 +56,7 @@ def test_user_settings_put(
"default_notification_volume_type": "intensifying",
"default_notification_volume": 1,
"default_notification_volume_override": True,
"info_notification_sound_name": "default_sound_info",
"info_notification_sound_name": "default_sound",
"info_notification_volume_type": "constant",
"info_notification_volume": 0.8,
"info_notification_volume_override": False,
Expand Down