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

feat: add push notification filtering settings #3207

Merged
merged 12 commits into from
Sep 20, 2023

Conversation

UncleSamtoshi
Copy link
Contributor

@UncleSamtoshi UncleSamtoshi commented Sep 13, 2023

  • Adds the ability to set and retrieve push notification filters
  • Push Notifications will be on by default and before they are sent we will check to make sure notifications are enabled and that the individual notification type and subtype is not disabled
  • NOTE: This is implemented using a string for NotificationType instead of an enum. This allows for the notification service to not need any context about the notifications that are passing through it.

@UncleSamtoshi UncleSamtoshi force-pushed the add-notification-filtering branch 3 times, most recently from b409b74 to 2c45ce1 Compare September 13, 2023 20:10
@UncleSamtoshi UncleSamtoshi changed the title feat: add push notification filtering feat: add push notification filtering settings Sep 13, 2023
Copy link
Member

@nicolasburtey nicolasburtey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments

src/app/accounts/update-push-notification-settings.ts Outdated Show resolved Hide resolved
src/graphql/public/schema.graphql Outdated Show resolved Hide resolved
Copy link
Member

@nicolasburtey nicolasburtey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still have the same reservation on the ambiguity regarding the usage of the mutations with the current API.
the query looks fine.

@UncleSamtoshi UncleSamtoshi force-pushed the add-notification-filtering branch from aadb6c4 to 3a0d2d3 Compare September 18, 2023 17:36
@UncleSamtoshi UncleSamtoshi force-pushed the add-notification-filtering branch from bba12c7 to 54771b2 Compare September 18, 2023 21:12
@UncleSamtoshi UncleSamtoshi force-pushed the add-notification-filtering branch from a1ae361 to 337cffe Compare September 19, 2023 19:40
@UncleSamtoshi UncleSamtoshi marked this pull request as ready for review September 19, 2023 19:49
...sendNotificationArgs,
data: {
...data,
NotificationCategory: notificationCategory,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure what is supposed to be inside { data } versus at the root level (ie: { ...sendNotification, ... }) but reading here would make me think NotificationCategory: notificationCategory, is more a metadata thing and should be one level up in the root

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense, I will move it up a level.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I think it may make sense to keep it where it is at. It is preferable that all notifications that have a notification category receive it as a part of their metadata. Since this method already has logic relating to handling notification categories I think it is alright for it to augment the metadata.

@@ -0,0 +1,28 @@
import {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering how much we should add to the legacy-integration. We're aiming at trimming this folder down. @vindard would have more context

@nicolasburtey
Copy link
Member

great PR. looks good overall, some nits to look at.

nicolasburtey
nicolasburtey previously approved these changes Sep 19, 2023
Copy link
Member

@nicolasburtey nicolasburtey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving, even if this may need change. someelse can reapprove later.

@UncleSamtoshi UncleSamtoshi merged commit 79bf33b into main Sep 20, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants