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

Implement push notifications deleting #1038

Merged
merged 23 commits into from
Jul 26, 2024
Merged

Implement push notifications deleting #1038

merged 23 commits into from
Jul 26, 2024

Conversation

SleepySquash
Copy link
Contributor

@SleepySquash SleepySquash commented Jun 13, 2024

Synopsis

Push notifications can be received from the FCM, however they can be replaced but cannot be deleted.

Solution

This PR allows the notifications to be deleted when empty notification body is being sent.

Checklist

  • Created PR:
    • In draft mode
    • Name contains issue reference
    • Has type and k:: labels applied
  • Before review:
    • Documentation is updated (if required)
    • Tests are updated (if required)
    • Changes conform code style
    • CHANGELOG entry is added (if required)
    • FCM (final commit message) is posted or updated
    • Draft mode is removed
  • Review is completed and changes are approved
    • FCM (final commit message) is approved
  • Before merge:
    • Milestone is set
    • PR's name and description are correct and up-to-date
    • All temporary labels are removed

@SleepySquash SleepySquash added enhancement Improvement of existing features or bugfix k::refactor Refactor changes of existing code labels Jun 13, 2024
@SleepySquash SleepySquash added this to the 0.1.0-alpha.14 milestone Jun 13, 2024
@SleepySquash SleepySquash self-assigned this Jun 13, 2024
@SleepySquash SleepySquash modified the milestones: 0.1.0, 0.2.0 Jun 27, 2024
@SleepySquash SleepySquash modified the milestones: 0.1.3, 0.2.0 Jul 3, 2024
@SleepySquash SleepySquash modified the milestones: 0.1.4, 0.2.0 Jul 10, 2024
@SleepySquash
Copy link
Contributor Author

SleepySquash commented Jul 25, 2024

FCM

Send `Query.chatItems` to mark `ChatItem`s as delivered when receiving push notifications (#1038)

- impl and use Notification Service Extension on iOS to send `Query.chatItems` query
- refactor `handlePushNotification` to send `Query.chatItems` when receiving push notification on Android
- refactor native `connect()` for `drift` to use `IosUtils.getSharedDirectory()` for iOS
- refactor `NotificationService` to send `Query.chatItems` when receiving foreground notifications

Additionally:
- bootstrap `AndroidUtils.cancelNotification()` for canceling displayed notifications on Android
- bootstrap `IosUtils.cancelNotification()` for canceling displayed notifications on iOS
- refactor Firebase Service Worker on web to support displayed notifications canceling

@SleepySquash SleepySquash marked this pull request as ready for review July 26, 2024 08:19
@SleepySquash SleepySquash merged commit 9324909 into main Jul 26, 2024
26 checks passed
@SleepySquash SleepySquash deleted the support-push-cancels branch July 26, 2024 08:22
github-actions bot added a commit that referenced this pull request Jul 26, 2024
…g push notifications (#1038)

- impl and use Notification Service Extension on iOS to send `Query.chatItems` query
- refactor `handlePushNotification` to send `Query.chatItems` when receiving push notification on Android
- refactor native `connect()` for `drift` to use `IosUtils.getSharedDirectory()` for iOS
- refactor `NotificationService` to send `Query.chatItems` when receiving foreground notifications

Additionally:
- bootstrap `AndroidUtils.cancelNotification()` for canceling displayed notifications on Android
- bootstrap `IosUtils.cancelNotification()` for canceling displayed notifications on iOS
- refactor Firebase Service Worker on web to support displayed notifications canceling 9324909
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing features or bugfix k::refactor Refactor changes of existing code
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant