Page MenuHomePhorge

D10461.1765052851.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D10461.1765052851.diff

diff --git a/lib/components/chat-mention-provider.react.js b/lib/components/chat-mention-provider.react.js
--- a/lib/components/chat-mention-provider.react.js
+++ b/lib/components/chat-mention-provider.react.js
@@ -13,6 +13,7 @@
ThreadInfo,
} from '../types/thread-types.js';
import { useResolvedThreadInfosObj } from '../utils/entity-helpers.js';
+import { getNameForThreadEntity } from '../utils/entity-text.js';
import { useSelector } from '../utils/redux-utils.js';
type Props = {
@@ -245,14 +246,23 @@
uiName:
chatMentionCandidatesObj[communityThreadID][threadID].threadInfo
.uiName,
+ rawChatName:
+ chatMentionCandidatesObj[communityThreadID][threadID].rawChatName,
});
}
// Sort the keys so that the order of the search result is consistent
searchIndexEntries.sort(({ uiName: uiNameA }, { uiName: uiNameB }) =>
uiNameA.localeCompare(uiNameB),
);
- for (const { id, uiName } of searchIndexEntries) {
- searchIndex.addEntry(id, uiName);
+ for (const { id, uiName, rawChatName } of searchIndexEntries) {
+ const names = [uiName];
+ if (rawChatName) {
+ typeof rawChatName === 'string'
+ ? names.push(rawChatName)
+ : names.push(getNameForThreadEntity(rawChatName));
+ }
+
+ searchIndex.addEntry(id, names.join(' '));
}
result[communityThreadID] = searchIndex;
}
diff --git a/lib/utils/entity-text.js b/lib/utils/entity-text.js
--- a/lib/utils/entity-text.js
+++ b/lib/utils/entity-text.js
@@ -585,6 +585,7 @@
ET,
entityTextToRawString,
entityTextToReact,
+ getNameForThreadEntity,
pluralizeEntityText,
useENSNamesForEntityText,
useEntityTextAsString,

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 6, 8:27 PM (13 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5840632
Default Alt Text
D10461.1765052851.diff (1 KB)

Event Timeline