Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33309013
D6590.1768803550.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D6590.1768803550.diff
View Options
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
@@ -213,7 +213,6 @@
function getNameForThreadEntity(
entity: ThreadEntity,
- threadID: ?string,
params?: ?EntityTextToRawStringParams,
): string {
const { name: userGeneratedName, display } = entity;
@@ -243,7 +242,7 @@
if (!name || entity.alwaysDisplayShortName) {
const threadType = entity.threadType ?? threadTypes.PERSONAL;
const noun = entity.subchannel ? 'subchannel' : threadNoun(threadType);
- if (entity.id === threadID) {
+ if (entity.id === params?.threadID) {
const prefixThisThreadNounWith =
params?.prefixThisThreadNounWith === 'your' ? 'your' : 'this';
name = `${prefixThisThreadNounWith} ${noun}`;
@@ -283,7 +282,7 @@
if (typeof entity === 'string') {
return entity;
} else if (entity.type === 'thread') {
- return getNameForThreadEntity(entity, params?.threadID, params);
+ return getNameForThreadEntity(entity, params);
} else if (entity.type === 'color') {
return entity.hex;
} else if (entity.type === 'user') {
@@ -319,7 +318,7 @@
);
} else if (entity.type === 'thread') {
const { id } = entity;
- const name = getNameForThreadEntity(entity, threadID);
+ const name = getNameForThreadEntity(entity, { threadID });
if (id === threadID) {
return name;
} else {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 19, 6:19 AM (19 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5954793
Default Alt Text
D6590.1768803550.diff (1 KB)
Attached To
Mode
D6590: [lib] Don't pass threadID in twice to getNameForThreadEntity
Attached
Detach File
Event Timeline
Log In to Comment