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)
Sat, Nov 30, 6:37 PM
Unknown Object (File)
Sat, Nov 30, 6:08 PM
Unknown Object (File)
Nov 27 2024, 10:34 PM
Unknown Object (File)
Nov 3 2024, 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
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.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 ↗(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.