Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3504343
D6581.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D6581.diff
View Options
diff --git a/lib/shared/messages/text-message-spec.js b/lib/shared/messages/text-message-spec.js
--- a/lib/shared/messages/text-message-spec.js
+++ b/lib/shared/messages/text-message-spec.js
@@ -24,11 +24,9 @@
stripSpoilersFromMarkdownAST,
} from '../markdown';
import { threadIsGroupChat } from '../thread-utils';
-import { stringForUser } from '../user-utils';
import {
pushTypes,
type MessageSpec,
- type NotificationTextsParams,
type RawMessageInfoFromServerDBRowParams,
} from './message-spec';
import { assertSingleMessageInfo } from './utils';
@@ -169,7 +167,6 @@
async notificationTexts(
messageInfos: $ReadOnlyArray<MessageInfo>,
threadInfo: ThreadInfo,
- params: NotificationTextsParams,
): Promise<NotifTexts> {
const messageInfo = assertSingleMessageInfo(messageInfos);
invariant(
@@ -180,19 +177,20 @@
messageInfo.text,
);
if (!threadInfo.name && !threadIsGroupChat(threadInfo)) {
+ const thread = ET.thread({ display: 'uiName', threadInfo });
return {
- merged: `${threadInfo.uiName}: ${notificationTextWithoutSpoilers}`,
+ merged: ET`${thread}: ${notificationTextWithoutSpoilers}`,
body: notificationTextWithoutSpoilers,
title: threadInfo.uiName,
};
} else {
- const userString = stringForUser(messageInfo.creator);
- const threadName = params.notifThreadName(threadInfo);
+ const creator = ET.user({ userInfo: messageInfo.creator });
+ const thread = ET.thread({ display: 'shortName', threadInfo });
return {
- merged: `${userString} to ${threadName}: ${notificationTextWithoutSpoilers}`,
+ merged: ET`${creator} to ${thread}: ${notificationTextWithoutSpoilers}`,
body: notificationTextWithoutSpoilers,
title: threadInfo.uiName,
- prefix: `${userString}:`,
+ prefix: ET`${creator}:`,
};
}
},
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 8:40 AM (20 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2687108
Default Alt Text
D6581.diff (1 KB)
Attached To
Mode
D6581: [lib] Migrate Text notifText to use EntityText
Attached
Detach File
Event Timeline
Log In to Comment