-
Notifications
You must be signed in to change notification settings - Fork 299
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
"You're Going OnCall" mobile app push notification #1814
Merged
Merged
Changes from 4 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
dd598ec
add info_notifications_enabled column to user
joeyorlando e9233c7
wip
joeyorlando f77b609
wip
joeyorlando 99def90
wip
joeyorlando d4b272d
WIP
joeyorlando 6243c98
wip
joeyorlando 4748f32
add tests
joeyorlando 2c13fb4
Merge branch 'dev' into jorlando/youre-oncall-push-notification
joeyorlando e399a1d
update changelog
joeyorlando 3335209
add user/FCMdevice task cache
joeyorlando 24191cb
fetch schedule events for next 7 days
joeyorlando c323eac
resend notification 15mins before
joeyorlando 82d8d1c
Merge branch 'dev' into jorlando/youre-oncall-push-notification
joeyorlando e71deac
minor changes
joeyorlando 5abbafd
Merge branch 'jorlando/youre-oncall-push-notification' of github.com:…
joeyorlando 5c6a64d
PR comments
joeyorlando 033bee2
Merge branch 'dev' into jorlando/youre-oncall-push-notification
joeyorlando File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
engine/apps/mobile_app/migrations/0004_auto_20230425_1033.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Generated by Django 3.2.18 on 2023-04-25 10:33 | ||
|
||
from django.db import migrations, models | ||
from django_add_default_value import AddDefaultValue | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('mobile_app', '0003_mobileappusersettings'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='mobileappusersettings', | ||
name='info_notifications_enabled', | ||
field=models.BooleanField(default=True), | ||
), | ||
# migrations.AddField enforces the default value on the app level, which leads to the issues during release | ||
# adding same default value on the database level | ||
AddDefaultValue( | ||
model_name='mobileappusersettings', | ||
name='info_notifications_enabled', | ||
value=True, | ||
), | ||
|
||
migrations.AddField( | ||
model_name='mobileappusersettings', | ||
name='going_oncall_notification_timing', | ||
field=models.IntegerField(choices=[(0, 'twelve hours before')], default=0), | ||
), | ||
# migrations.AddField enforces the default value on the app level, which leads to the issues during release | ||
# adding same default value on the database level | ||
AddDefaultValue( | ||
model_name='mobileappusersettings', | ||
name='going_oncall_notification_timing', | ||
value=0, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks like a bigger diff than it actually is. I extracted the logic that is now in the following methods to avoid having to duplicate w/ the addition of this new push notification:
send_push_notification_to_fcm_relay
_send_push_notification
_construct_fcm_message