Details
Similiar to test plan from D15143, but removed a secondary device instead. Called sqliteAPI.getUnsentOutboundP2PMessages() at the beginning and end of getAndUpdateDeviceLists to compare and confirm that P2P messages addressed to the old primary device are removed.
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
| lib/hooks/peer-list-hooks.js | ||
|---|---|---|
| 127 | nit: Instead of allPeerDevices, I would use AuxUserInfos and read AuxUserInfo and the device list for a specific life to avoid iterating through all peer devices each time. However, I am aware that this method is most of the time called with only one userID, so it shouldn't make much difference. | |
| lib/hooks/peer-list-hooks.js | ||
|---|---|---|
| 127 | Yes, valid concern. Initially I was considering going back to raw device list, even transforming it into { [userID]: Set<deviceID> } before this loop, but finally, I concluded it's not worth it for this exact reason you mentioned - usually it's a single userID being processed. | |