HomePhabricator
Diffusion Comm add506a6a102

[web][desktop] refresh device token after receiving message from Tunnelbroker

Description

[web][desktop] refresh device token after receiving message from Tunnelbroker

Summary:
ENG-8498.

This code is refreshing the device token, this is a side effect of the BadDeviceToken message from Tunnelbroker.

We can also consider adding here logic to refresh the token when the keyserver is sending BAD_DEVICE_TOKEN (to match what PushHandler is doing) - ENG-8922.

Some additional context in ENG-8400.

This is only about localToken which is set for every user, not touching tunnelbrokerToken so it shouldn't affect devices without CSAT and TB connection.

Depends on D12912

Test Plan:
Simulate Tunnelbroker throws an error with an invalid device token, and test that a new token is uploaded (value in DDB changed). Additionally, I verified this using logs.

Reviewers: bartek, inka, tomek

Reviewed By: tomek

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D12915