Hello ,
recently I deleted a chatmail account in DC-iOS, which I continue to use in DC-Desktop.
Even though the account no longer exists in DC-iOS, push notifications are still being received for it.
I’m unsure whether I should report this issue as a DC-iOS or Chatmail bug in GitHub.
probably it’s best to register an issue in the chatmail repo.
How did you notice that push notifications still arrive on ios?
You only removed an account, but not Delta Chat from iOS, right?
the issue is known and already fixed, but the fix is not released yet.
(for the interested ones: there are some situations where the - on purpose dumb - server thinks a notification is needed but the client knowns better: eg. muted-chats, already-read-on-other-client, account-deleted-on-client.
the client wants to not show a notification in these situations - however, by default, not showing push notifications is not possible on iOS. but needs a special entitlement we meanwhile got and made use of at make use of notifications filtering entitlement by r10s · Pull Request #2124 · deltachat/deltachat-ios · GitHub - it will be released with the next update)
The notifications appeared on the lock screen. I was wondering why there weren’t any new messages in the app until it became clear that notifications were for the deleted account.
@link2xt Yes, that’s right.
@r10s Thanks for the explanation.
Do the servers learn that after a certain time push notifications are no longer necessary?
I ask because notifications should have been displayed again about three hours ago. But this time there weren’t any. I hadn’t accessed the messages in DC desktop until much later.
Update:
Now the push notifications are arriving again.
It makes sense to have a dumb server for the situations you described but for the situation if you delete an account I don’t see why the server should be dumb and still send notifications to that device. In this situation it seems to me that the “correct” action (in my opinion) is to un-register the device from the server, if this is possible.
Simply hiding the notification is in my opinion only an invisible workaround but not the “correct” solution.
surely, this can be optimised. but we also have to take development resources and maintenance effort into account, so we decided against for now
Totaly understand, its good to allocate resources according to priorities!
Can I ask, just to be clear, the current workaround is only for iOS, right? So accounts get deleted properly on all other platforms like Android and Desktop?
Does anyone know the answer to this question?
On Android if you install gplay
version and use chatmail account, FCM (Google) push notifications are used similarly to Apple notifications. If you use F-Droid version or if your phone has no Google Services (plain LineageOS or similar) then only IMAP IDLE is used and there is no such problem.
Push notification token eventually expires, so chatmail server will try to notify it via push relay and get back an error, then it deletes it.
Thanks for the answer. So after the push notification token expires, there will be nothing which links the server to the client any more?
And will the server keep any information about the account, such as the profile name, after the account has been deleted from the client?
Chatmail server does not store any information about the client except the password hash, stored push notification tokens and incoming (or bcc-copied to self) messages in the mailbox. Display name (profile name) is not stored on the server, it is sent in the messages and is encrypted if you use chats with guaranteed encryption. By default messages are deleted after 20 days and the whole account (including non-expired push notification tokens) is deleted after 90 days, but check the page of your chatmail provider as these settings may be tweaked.
We are also working on the encryption of push notification tokens, so chatmail operators will not be able to see the token or its type (Apple/Google) or check if multiple accounts have the same token: