More code review suggestions.

This commit is contained in:
aforge
2021-09-25 20:33:26 +03:00
parent b1589a8790
commit b6abc76f3f
7 changed files with 23 additions and 39 deletions
+5 -4
View File
@@ -843,16 +843,17 @@ class MessagesView extends React.Component {
uploader.cancel();
}
handlePickReply(seq, content, senderId, senderName) {
handlePickReply(seq, content, forwarded, senderId, senderName) {
this.setState({reply: null});
if (!seq || !content) {
return;
}
if (typeof content == 'string') {
content = Drafty.init(content);
}
content = forwarded ?
Drafty.forwardedContent(content) :
typeof content == 'string' ?
Drafty.init(content) : content;
if (Drafty.isValid(content)) {
content = Drafty.preview(content, QUOTED_REPLY_LENGTH);
} else {