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], }); @@ -1299,7 +1300,7 @@ threadFilter: ThreadInfo => boolean, threadSearchResults: $ReadOnlySet, usersSearchResults: $ReadOnlyArray, - viewerID: ?string, + loggedInUserInfo: ?LoggedInUserInfo, ): $ReadOnlyArray { if (!searchText) { return chatListData.filter( @@ -1325,10 +1326,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 @@ -407,7 +407,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 @@ -188,7 +188,7 @@ threadFilter, threadSearchResults, usersSearchResults, - viewerID, + loggedInUserInfo, ); const activeTopLevelChatThreadItem = useChatThreadItem( activeTopLevelThreadInfo,