Push notifications don't have a content (#461)
Unknown opened 4 years ago

Describe the bug With siskin there is the problem that with some servers (like trashserver.net and blabber.im) push notifications when the app is closed have no content. When siskin is open but in the background there are two notifications per incoming message, one without any content and one with content.

What might be important: Even though both servers mentioned support XEP-0357 as can be seen here https://compliance.conversations.im/server/trashserver.net/ and here https://compliance.conversations.im/server/blabber.im/ the XEP is not listed as supported when looking under Settings -> TheRespectiveAccount -> Server Features in siskin. Also: In Settings -> Account -> pushNotification kann be activated for accounts on the servers but then When in Away/XA/DND state can not be enabled.

To Reproduce Steps to reproduce the behavior:

  1. Go to blabber.im or trashserver.net and create a test account
  2. Add the account to a siskin installation
  3. Enable push notifications for the account
  4. Check if the XEP-0357 is supported for the account
  5. Send a test message to the account when siskin is open, everything should work as expected
  6. Close Siskin completely and send a message to the account again. The empty push notification should appear.

Expected behavior The Push notification should have the message text as the content of the notification

Screenshots If applicable, add screenshots to help explain your problem.

Details (please complete the following information):

  • Siskin Version: [6.2]
  • iOS version [14.3]
  • iPhone model [8]

Additional Information and Screenshot

Monal has no problems producing the push notification with the content of the message as can be seen on the screenshot

IMG_2705

Unknown commented 4 years ago

If the push had the message it means your message was leaked to the server owner, push server owner and Apple/Google.

Until we have encrypted push messages, we have empty ones, as a security measure.

Monal (tries to) keeps a connection, so that's not the push message that you see but the actual message that Monal just got.

Unknown commented 4 years ago

@joergister to expand on @licaon-kter answer - Monal (and Conversation on Android) do things a little bit differently - they also receive empty push notification, but each time they reconnect to the server to retrieve the message itself. As you noticed, Siskin doesn't do that (as it would consume more resources and doesn't seem particularly efficient). On the other hand we prefer to send encrypted push notifications (see our initial proto-XEP): https://xeps.tigase.net//docs/push-notifications/encrypt/.

You could try an account on tigase.im/sure.im to take advantage of it currently.

Unknown commented 4 years ago

From what I know prosody should support this protoXEP in the future.

Unknown commented 4 years ago

@joergister to expand on @licaon-kter answer - Monal (and Conversation on Android) do things a little bit differently - they also receive empty push notification, but each time they reconnect to the server to retrieve the message itself. As you noticed, Siskin doesn't do that (as it would consume more resources and doesn't seem particularly efficient). On the other hand we prefer to send encrypted push notifications (see our initial proto-XEP): https://xeps.tigase.net//docs/push-notifications/encrypt/.

Oh ok, I didn't know it was possible at all to let you connect so a server to retrieve a message (after receiving an empty push message) even if an app is closed, I always thought that was not possible due to iOS security limitations ? So no plans on your side to do it the Monal (as far as I know, not officially supported) way ? Instead if I understand it correctly, you want to do it the proper way with the new XEP you mentioned, which alas is not yet standardised and not available in the foreseeable future on the servers I mentioned due to the fact that they use ejabberd and not the Tigase server nor prosody ?

You could try an account on tigase.im/sure.im to take advantage of it currently.

Guess I'll have to do that.

Unknown commented 4 years ago

Oh ok, I didn't know it was possible at all to let you connect so a server to retrieve a message (after receiving an empty push message) even if an app is closed, I always thought that was not possible due to iOS security limitations ?

It is, but there are limitations imposed by Apple so if the logging in could take a little bit longer (or Apple would change it's mind, which wouldn't be unlikely knowing Apple) then that way would fail.

So no plans on your side to do it the Monal (as far as I know, not officially supported) way ?

No, no plans as it could stop working in the future.

Instead if I understand it correctly, you want to do it the proper way with the new XEP you mentioned, which alas is not yet standardised and not available in the foreseeable future on the servers I mentioned due to the fact that they use ejabberd and not the Tigase server nor prosody ?

That's correct. Unfortunately in the context of push notifications there is no standardisation. We do hope that encrypted push would be adopted more widely.

Unknown commented 4 years ago

I now have an account at sure.im but the problem is (I already uninstalled and reinstalled siskin) that the push messages can not be decrypted. I always get the push message "I sent you an OMEMO encrypted message but your client doesn’t seem to support that." as content of the push message when siskin is closed. But when I then open Siskin, the message in the chat is decrypted and perfectly readable. Push notifications are enabled and also the "When in Away/XA/DND" is enabled. Is there anything else I have to do ?

Unknown commented 4 years ago

Yes, that is expected. The XMPP server is not-OMEMO aware (only clients are) and the XMPP server receives a message with body I sent you an OMEMO encrypted message but your client doesn’t seem to support that. so it sends Push Notification with this message as a payload.

Unknown commented 4 years ago

Yes, that is expected. The XMPP server is not-OMEMO aware (only clients are) and the XMPP server receives a message with body I sent you an OMEMO encrypted message but your client doesn’t seem to support that. so it sends Push Notification with this message as a payload.

Ok so I thought that it would already be possible because of this comment by @woj-tek but apparrently I got it wrong.

On the other hand we prefer to send encrypted push notifications (see our initial proto-XEP): https://xeps.tigase.net//docs/push-notifications/encrypt/.

You could try an account on tigase.im/sure.im to take advantage of it currently.

So is only the server not omemo aware or is also the client not able to handle omemo encryptet push notifications yet ?

Unknown commented 4 years ago

OMEMO <> Encrypted Push Notifications

Client is OMEMO aware and encrypted push notifications aware. Server is not OMEMO aware and supports encrypted push notifications.

If you would look more closely at the linked document, you would find https://xeps.tigase.net//docs/push-notifications/encrypt-omemo/ describing encrypted push notifications for OMEMO and the following statement in there:

WARNING: THIS IS A PROTOTYPE SPECIFICATION, NOT IMPLEMENTED AND NOT VALIDATED!

Unknown commented 4 years ago

ah ok, though the encrypted push notifications would be omemo encrypted. So because it's just the specification that exists as of now I assume it won't be usable in the near future ?

issue 1 of 1
Type
Bug
Issue Votes (0)
Watchers (0)
Reference
tigase/_clients/siskin-im#461
Please wait...
Page is in error, reload to recover