Page MenuHomePhorge

D6755.1768371880.diff
No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None

D6755.1768371880.diff

diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js
--- a/lib/shared/thread-utils.js
+++ b/lib/shared/thread-utils.js
@@ -72,6 +72,7 @@
UserInfos,
UserInfo,
AccountUserInfo,
+ LoggedInUserInfo,
} from '../types/user-types.js';
import {
useDispatchActionPromise,
@@ -412,11 +413,11 @@
}
function createPendingThreadItem(
- viewerID: string,
+ loggedInUserInfo: LoggedInUserInfo,
user: GlobalAccountUserInfo,
): ChatThreadItem {
const threadInfo = createPendingThread({
- viewerID,
+ viewerID: loggedInUserInfo.id,
threadType: threadTypes.PERSONAL,
members: [user],
});
@@ -1307,7 +1308,7 @@
threadFilter: ThreadInfo => boolean,
threadSearchResults: $ReadOnlySet<string>,
usersSearchResults: $ReadOnlyArray<GlobalAccountUserInfo>,
- viewerID: ?string,
+ loggedInUserInfo: ?LoggedInUserInfo,
): $ReadOnlyArray<ChatThreadItem> {
if (!searchText) {
return chatListData.filter(
@@ -1333,10 +1334,10 @@
}
const chatItems = [...privateThreads, ...personalThreads, ...otherThreads];
- if (viewerID) {
+ if (loggedInUserInfo) {
chatItems.push(
...usersSearchResults.map(user =>
- createPendingThreadItem(viewerID, user),
+ createPendingThreadItem(loggedInUserInfo, user),
),
);
}
diff --git a/native/chat/chat-thread-list.react.js b/native/chat/chat-thread-list.react.js
--- a/native/chat/chat-thread-list.react.js
+++ b/native/chat/chat-thread-list.react.js
@@ -411,7 +411,7 @@
filterThreads,
threadsSearchResults,
usersSearchResults,
- loggedInUserInfo?.id,
+ loggedInUserInfo,
);
const chatItems: Item[] = [...chatThreadItems];
diff --git a/web/chat/thread-list-provider.js b/web/chat/thread-list-provider.js
--- a/web/chat/thread-list-provider.js
+++ b/web/chat/thread-list-provider.js
@@ -187,7 +187,7 @@
threadFilter,
threadSearchResults,
usersSearchResults,
- viewerID,
+ loggedInUserInfo,
);
const activeTopLevelChatThreadItem = useChatThreadItem(
activeTopLevelThreadInfo,

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 14, 6:24 AM (13 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5930763
Default Alt Text
D6755.1768371880.diff (2 KB)

Event Timeline