Page MenuHomePhabricator

D4939.id15907.diff
No OneTemporary

D4939.id15907.diff

diff --git a/web/chat/chat-message-list-container.react.js b/web/chat/chat-message-list-container.react.js
--- a/web/chat/chat-message-list-container.react.js
+++ b/web/chat/chat-message-list-container.react.js
@@ -52,6 +52,18 @@
threadType: threadTypes.PRIVATE,
}),
);
+
+ const newThreadID = 'pending/new_thread';
+ const pendingNewThread = React.useRef({
+ ...createPendingThread({
+ viewerID,
+ threadType: threadTypes.PRIVATE,
+ }),
+ id: newThreadID,
+ uiName: 'New thread',
+ community: null,
+ });
+
const existingThreadInfoFinderForCreatingThread = useExistingThreadInfoFinder(
pendingPrivateThread.current,
);
@@ -68,6 +80,10 @@
const existingThreadInfoFinder = useExistingThreadInfoFinder(baseThreadInfo);
const threadInfo = React.useMemo(() => {
if (isChatCreation) {
+ if (userInfoInputArray.length === 0) {
+ return pendingNewThread.current;
+ }
+
return existingThreadInfoFinderForCreatingThread({
searching: true,
userInfoInputArray,

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 29, 1:52 AM (8 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2730120
Default Alt Text
D4939.id15907.diff (1 KB)

Event Timeline