Page MenuHomePhabricator

[Tunnelbroker] invalidate bad APNs tokens
ClosedPublic

Authored by kamil on Jul 29 2024, 2:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Sep 10, 2:15 AM
Unknown Object (File)
Sun, Sep 8, 8:53 AM
Unknown Object (File)
Sat, Sep 7, 1:43 PM
Unknown Object (File)
Sat, Sep 7, 1:43 PM
Unknown Object (File)
Sat, Sep 7, 1:43 PM
Unknown Object (File)
Fri, Sep 6, 9:56 AM
Unknown Object (File)
Tue, Sep 3, 9:24 PM
Unknown Object (File)
Sun, Sep 1, 4:45 AM
Subscribers

Details

Summary

ENG-8498.

Based on an error from APNs:

  1. Flip the flag in DDB.
  2. Send a message to device.

Depends on D12910

Test Plan

Manually malformed device token for iOS device in DDB, try sending notif to this device and verify that flag was flipped and the message was sent to the device (both online and offline device)

Diff Detail

Repository
rCOMM Comm
Branch
publish-device-token
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Jul 29 2024, 6:37 AM
kamil edited the summary of this revision. (Show Details)
kamil edited the test plan for this revision. (Show Details)
kamil added inline comments.
services/tunnelbroker/src/websockets/session.rs
406

we should use also Unregistered and ExpiredToken (410 status code) - I did mistake while committing, going to update in next rebase

bartek added inline comments.
services/tunnelbroker/src/websockets/session.rs
406

Just FYI - this syntax should be possible:

if matches!(
  body.reason, 
  ErrorReason::BadDeviceToken | ErrorReason::Unregistered | ErrorReason::ExpiredToken
) {
This revision is now accepted and ready to land.Jul 29 2024, 8:20 AM
This revision was automatically updated to reflect the committed changes.

Forgot to add missing error - sorry for that

This revision is now accepted and ready to land.Jul 30 2024, 4:20 AM
This revision was landed with ongoing or failed builds.Jul 30 2024, 5:39 AM
This revision was automatically updated to reflect the committed changes.