Page MenuHomePhabricator

[lib] Include `[creator/target]FID` in `messageContentForServerDB` when update relationship op is `farcaster_mutual`
ClosedPublic

Authored by atul on Apr 12 2024, 12:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 27, 10:34 PM
Unknown Object (File)
Sun, Nov 3, 9:48 AM
Unknown Object (File)
Oct 12 2024, 11:48 PM
Unknown Object (File)
Oct 12 2024, 11:48 PM
Unknown Object (File)
Oct 12 2024, 11:47 PM
Unknown Object (File)
Oct 12 2024, 11:47 PM
Unknown Object (File)
Oct 4 2024, 5:29 AM
Unknown Object (File)
Sep 9 2024, 9:06 AM
Subscribers

Details

Summary

Pretty self explanatory, we want to include these in content column so we can reconstruct rawMessageInfo from both client and serverDB.


Depends on D11650

Test Plan

Will create UPDATE_RELATIONSHIP message with operation = 'farcaster_mutual' and observe that row in messages table is correctly constructed before landing.

Diff Detail

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

Event Timeline

atul published this revision for review.Apr 12 2024, 12:26 PM
atul edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Apr 15 2024, 1:35 AM
lib/shared/messages/update-relationship-message-spec.js
66

Do we have to check this condition?

lib/shared/messages/update-relationship-message-spec.js
66

Yeah, the reason we need to check this is because updateRelationshipMessageSpec is used for both LEGACY_UPDATE_RELATIONSHIP and UPDATE_RELATIONSHIP messages.

lib/shared/messages/update-relationship-message-spec.js
66

JK, I think what you're saying is that data.operation === 'farcaster_mutual' would be a sufficient check since that implicitly tells us that the message type is UPDATE_RELATIONSHIP so having both is a bit redundant.

Personally prefer including the first clause since it makes things more clear IMO, but can remove if others feel otherwise

lib/shared/messages/update-relationship-message-spec.js
66

Ok, we can keep both conditions.