Page MenuHomePhabricator

D3508.diff
No OneTemporary

D3508.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
Thu, Nov 28, 10:30 AM (22 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2593770
Default Alt Text
D3508.diff (781 B)

Event Timeline