Page MenuHomePhabricator

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

Authored by varun on Fri, Nov 15, 12:35 PM.

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