Page MenuHomePhabricator

D11872.diff
No OneTemporary

D11872.diff

diff --git a/lib/shared/messages/update-relationship-message-spec.js b/lib/shared/messages/update-relationship-message-spec.js
--- a/lib/shared/messages/update-relationship-message-spec.js
+++ b/lib/shared/messages/update-relationship-message-spec.js
@@ -51,8 +51,6 @@
...
};
-const connectionOnFarcasterMessage = 'Your connection on Farcaster is on Comm.';
-
export const updateRelationshipMessageSpec: UpdateRelationshipMessageSpec =
Object.freeze({
messageContentForServerDB(
@@ -245,7 +243,13 @@
});
return ET`${creator} accepted ${targetPossessive} friend request`;
} else if (messageInfo.operation === 'farcaster_mutual') {
- return ET`${connectionOnFarcasterMessage}`;
+ const viewerIsCreator = messageInfo.creator.isViewer;
+ if (viewerIsCreator) {
+ const otherUser = ET.user({ userInfo: messageInfo.target });
+ return ET`${otherUser} is ${messageInfo.targetFID} on Farcaster`;
+ } else {
+ return ET`${creator} is ${messageInfo.creatorFID} on Farcaster`;
+ }
}
invariant(
false,
@@ -290,7 +294,7 @@
threadID: rawMessageInfo.threadID,
creatorID: rawMessageInfo.creatorID,
time: rawMessageInfo.time,
- robotext: connectionOnFarcasterMessage,
+ robotext: 'Your connection on Farcaster is on Comm.',
unsupportedMessageInfo: rawMessageInfo,
dontPrefixCreator: true,
};

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 3:46 AM (13 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2567951
Default Alt Text
D11872.diff (1 KB)

Event Timeline