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
Unknown Object (File)
Sun, Dec 15, 1:07 AM
Unknown Object (File)
Wed, Dec 4, 5:54 AM
Unknown Object (File)
Nov 22 2024, 5:30 PM
Unknown Object (File)
Nov 22 2024, 5:29 PM
Unknown Object (File)
Nov 20 2024, 7:03 AM
Unknown Object (File)
Nov 20 2024, 7:03 AM
Unknown Object (File)
Nov 20 2024, 7:02 AM
Unknown Object (File)
Nov 20 2024, 6:39 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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