Page MenuHomePhabricator

D3508.id10707.diff
No OneTemporary

D3508.id10707.diff

diff --git a/web/chat/message-preview.react.js b/web/chat/message-preview.react.js
--- a/web/chat/message-preview.react.js
+++ b/web/chat/message-preview.react.js
@@ -49,13 +49,13 @@
getDefaultTextMessageRules().simpleMarkdownRules,
);
+ const hasUsername =
+ threadIsGroupChat(threadInfo) ||
+ threadInfo.name !== '' ||
+ messageInfo.creator.isViewer;
+
let usernameText = null;
- if (
- messageInfo.type === messageTypes.TEXT &&
- (threadIsGroupChat(threadInfo) ||
- threadInfo.name !== '' ||
- messageInfo.creator.isViewer)
- ) {
+ if (messageInfo.type === messageTypes.TEXT && hasUsername) {
const userString = stringForUser(messageInfo.creator);
usernameText = <span className={colorStyle}>{`${userString}: `}</span>;
}

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 3, 11:22 AM (4 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2611499
Default Alt Text
D3508.id10707.diff (781 B)

Event Timeline