fix: store device token in IMAP METADATA on each connection

APNS tokens never expire unless
the user uninstalls the application.
Because of this in most cases
the token remains valid forever
and chatmail server never removes the token
even if it is unencrypted
or the user has removed Delta Chat profile
from the device but not the whole application.

We want to modify chatmail servers
to remember the last time the token was stored
and remove them after some time.
Before we do this, we need to modify
the client to store the device token
each time so the server knows which tokens are used
and can update their timestamps.
This commit is contained in:
link2xt
2025-01-28 05:14:02 +00:00
committed by l
parent 6f5620dad5
commit 4198ed1efb
3 changed files with 52 additions and 23 deletions

View File

@@ -1778,6 +1778,7 @@ mod tests {
"key_id",
"webxdc_integration",
"device_token",
"encrypted_device_token",
];
let t = TestContext::new().await;
let info = t.get_info().await.unwrap();