Page MenuHomePhabricator

[keyserver][lib] change thread info validators -> thin raw thread info validators
ClosedPublic

Authored by varun on Fri, Nov 15, 12:35 PM.
Tags
None
Referenced Files
F3300069: D13949.id45854.diff
Sun, Nov 17, 4:49 PM
F3300068: D13949.id45852.diff
Sun, Nov 17, 4:49 PM
F3300067: D13949.id.diff
Sun, Nov 17, 4:49 PM
F3299434: D13949.diff
Sun, Nov 17, 11:54 AM
Unknown Object (File)
Fri, Nov 15, 8:53 PM
Unknown Object (File)
Fri, Nov 15, 8:48 PM
Unknown Object (File)
Fri, Nov 15, 6:20 PM
Subscribers

Details

Summary

all four of the updated validators here are only ever used to validate thin threads. therefore, they should be thin thread validators

Test Plan

https://linear.app/comm/issue/ENG-9937/narrow-raw-thread-info-validators this linear task enumerates all callsites for these validators. i checked that they're only ever used on the keyserver or to validate keyserver responses. it looks like we don't use these validators for E2EE DMs.

i also did some manual testing by sending messages through my keyserver and sending DMs to other test accounts

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

varun held this revision as a draft.
varun published this revision for review.Fri, Nov 15, 12:52 PM
varun added inline comments.
lib/permissions/minimally-encoded-thread-permissions.test.js
516–524

I decided not to change the types of the data in these tests because it didn't seem necessary

exampleMinimallyEncodedRawThreadInfoA is typed as a RawThreadInfo, but the validator tests that it's in fact a ThinRawThreadInfo

similarly, exampleRawThreadInfoA is type LegacyRawThreadInfo, but the validator tests that it's a LegacyThinRawThreadInfo

I went through each of these on my own and I think it's safe

This revision is now accepted and ready to land.Fri, Nov 15, 2:05 PM