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
F3300548: D13741.diff
Sun, Nov 17, 7:32 PM
F3298274: D13741.id45288.diff
Sun, Nov 17, 5:30 AM
Unknown Object (File)
Wed, Nov 6, 5:34 AM
Unknown Object (File)
Mon, Nov 4, 5:38 AM
Unknown Object (File)
Sat, Nov 2, 5:18 AM
Unknown Object (File)
Fri, Nov 1, 10:32 PM
Unknown Object (File)
Fri, Nov 1, 7:07 PM
Unknown Object (File)
Fri, Nov 1, 6:19 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.Mon, Oct 21, 3:41 AM