Page MenuHomePhabricator

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

Authored by atul on Fri, Apr 12, 12:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 27, 12:07 PM
Unknown Object (File)
Fri, Apr 26, 5:59 PM
Unknown Object (File)
Sun, Apr 21, 5:51 AM
Unknown Object (File)
Thu, Apr 18, 8:33 PM
Unknown Object (File)
Thu, Apr 18, 3:11 PM
Unknown Object (File)
Wed, Apr 17, 8:18 AM
Unknown Object (File)
Wed, Apr 17, 8:17 AM
Unknown Object (File)
Wed, Apr 17, 8:17 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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

Do we have to check this condition?

lib/shared/messages/update-relationship-message-spec.js
66 ↗(On Diff #39087)

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 ↗(On Diff #39087)

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 ↗(On Diff #39087)

Ok, we can keep both conditions.