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 notify to PN server on message sent #1346

Merged
merged 1 commit into from
Sep 21, 2020
Merged

Conversation

Bilb
Copy link
Collaborator

@Bilb Bilb commented Sep 21, 2020

notify the PN server on message sent, so that it triggers a push notifications to mobile devices

@Bilb Bilb merged commit 92cc9a7 into oxen-io:clearnet Sep 21, 2020
@Bilb Bilb deleted the add-pn-notify branch September 21, 2020 03:38
const shouldNotifyPushServer =
hasBodyOrAttachments &&
isSessionOrClosedMessage &&
sentMessage.ttl ===

Choose a reason for hiding this comment

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

We actually don't need this check now that we're checking for a body or attachments :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops. I matched the android way which was checking this field, https://github.com/loki-project/session-android-service/pull/84/files#diff-d6257378506ec22d884fbbb68f831aa2R29

I will fix it in a new PR

@@ -1253,32 +1253,67 @@
// if we did not sync or trigger a sync message for this specific message already
const shouldTriggerSyncMessage =
!isOurDevice &&
!isOpenGroupMessage &&

Choose a reason for hiding this comment

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

This doesn't matter right now as we're currently not doing any syncing, but in principle it's correct that open group messages aren't synced

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I removed it from here, because the whole sync block is now on the if excluding OpenGroupMessage at https://github.com/loki-project/session-desktop/pull/1346/files/3a876c7322c97bde8df9aaf74e3a3e067c781d8a#diff-fdb432d7888e10d18d02c7becd34c5e4R1309

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.

None yet

3 participants