Page MenuHomePhabricator

[lib] Delete users for whom identity didnt return a device list for a long time
ClosedPublic

Authored by inka on Oct 17 2024, 4:22 AM.
Tags
None
Referenced Files
F3519730: D13741.id45295.diff
Sun, Dec 22, 10:45 PM
F3519729: D13741.id45288.diff
Sun, Dec 22, 10:45 PM
F3519728: D13741.id45245.diff
Sun, Dec 22, 10:45 PM
F3519727: D13741.id45257.diff
Sun, Dec 22, 10:45 PM
F3519705: D13741.id.diff
Sun, Dec 22, 10:45 PM
F3519594: D13741.diff
Sun, Dec 22, 10:43 PM
Unknown Object (File)
Sun, Dec 15, 1:07 AM
Unknown Object (File)
Wed, Dec 4, 5:54 AM
Subscribers

Details

Summary

issue: ENG-9632
If we fail to fetch usres device list for a whole day, we can assume that this is not due to identity temporary data inconsistency. And if a user is a member of a DM, and their device list is not present on the identity, then we know for certain that they deleted their account.
There is only one catch here - if the request times out we shouldn't be deleting the user. Created ENG-9725 to address this

Test Plan

Tested that a user whose device list failed to be fetched for a long time gets deleted and they get removed from threads, users store and aux user store.
Checked that a user whose lastChecked was updated does not get removed from threads and other stores

Diff Detail

Repository
rCOMM Comm
Branch
inka/missing_peers
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

inka requested review of this revision.Oct 17 2024, 4:40 AM
tomek added inline comments.
lib/shared/dm-ops/dm-op-utils.js
178–202 ↗(On Diff #45257)

It might be a good idea to make the dependency between nonDeletedUsers and deletedUsers explicit by creating a function.

This revision is now accepted and ready to land.Oct 21 2024, 3:41 AM