Page MenuHomePhabricator

D13707.id45196.diff
No OneTemporary

D13707.id45196.diff

diff --git a/native/chat/sidebar-navigation.js b/native/chat/sidebar-navigation.js
--- a/native/chat/sidebar-navigation.js
+++ b/native/chat/sidebar-navigation.js
@@ -7,6 +7,7 @@
import { NeynarClientContext } from 'lib/components/neynar-client-provider.react.js';
import { useLoggedInUserInfo } from 'lib/hooks/account-hooks.js';
import { useThreadChatMentionCandidates } from 'lib/hooks/chat-mention-hooks.js';
+import { chatMessageItemEngagementTargetMessageInfo } from 'lib/shared/chat-message-item-utils.js';
import {
createPendingSidebar,
createUnresolvedPendingSidebar,
@@ -40,7 +41,8 @@
return null;
}
- const { messageInfo, threadInfo } = sourceMessage;
+ const { threadInfo } = sourceMessage;
+ const messageInfo = chatMessageItemEngagementTargetMessageInfo(sourceMessage);
if (!messageInfo) {
return null;
}
@@ -78,7 +80,8 @@
return null;
}
- const { messageInfo, threadInfo } = sourceMessage;
+ const { threadInfo } = sourceMessage;
+ const messageInfo = chatMessageItemEngagementTargetMessageInfo(sourceMessage);
if (!messageInfo) {
return null;
}
@@ -133,7 +136,8 @@
const chatContext = React.useContext(ChatContext);
const setSidebarSourceID = chatContext?.setCurrentTransitionSidebarSourceID;
const navigateToSidebar = useNavigateToSidebar(item);
- const messageID = item.messageInfo?.id;
+ const messageInfo = chatMessageItemEngagementTargetMessageInfo(item);
+ const messageID = messageInfo?.id;
return React.useCallback(() => {
if (!messageID) {
return;
diff --git a/web/tooltips/tooltip-action-utils.js b/web/tooltips/tooltip-action-utils.js
--- a/web/tooltips/tooltip-action-utils.js
+++ b/web/tooltips/tooltip-action-utils.js
@@ -133,7 +133,8 @@
item: ChatMessageInfoItem,
threadInfo: ThreadInfo,
): ?MessageTooltipAction {
- const { threadCreatedFromMessage, messageInfo } = item;
+ const { threadCreatedFromMessage } = item;
+ const messageInfo = chatMessageItemEngagementTargetMessageInfo(item);
const { popModal } = useModalContext();
const sidebarExists = !!threadCreatedFromMessage;
const sidebarExistsOrCanBeCreated = useSidebarExistsOrCanBeCreated(

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 24, 1:26 AM (15 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2697741
Default Alt Text
D13707.id45196.diff (2 KB)

Event Timeline