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

Send GraphQlProvider.chatItems() in handlePushNotification() #1048

Closed
wants to merge 2 commits into from

Conversation

SleepySquash
Copy link
Contributor

Synopsis

Message should be considered delivered as soon as FCM notification is received.

Solution

This PR adds the query of GraphQlProvider.chatItems() when a FCM notification is received, so that it's received status is updated.

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 24, 2024
@SleepySquash SleepySquash added this to the 0.1.0-alpha.14 milestone Jun 24, 2024
@SleepySquash SleepySquash self-assigned this Jun 24, 2024
@SleepySquash
Copy link
Contributor Author

Let's summarize what's been discovered:

  1. Android allows push notifications to run its background handler any time and in any condition. Thus sending a query to mark some ChatItems as delivered is possible.
  2. iOS won't work: background handler is invoked for background notifications only (visible ones won't call that). Also when application is terminated, it seems like the handler isn't invoked at all. Perhaps it can be called only once in 15 minutes?

@SleepySquash SleepySquash modified the milestones: 0.1.0, 0.2.0 Jun 27, 2024
@SleepySquash SleepySquash added wontfix This will not be worked on moved Issue/PR is moved to another project labels Jul 1, 2024
@SleepySquash
Copy link
Contributor Author

Moved to #1038

@SleepySquash SleepySquash deleted the query-chat-on-fcm branch July 1, 2024 12:30
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 moved Issue/PR is moved to another project wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant