[FIX] Messages attributed to wrong user (#4598)

This commit is contained in:
Reinaldo Neto 2022-10-31 14:02:35 -03:00 committed by Diego Mello
parent 4d62874a9f
commit 76c4ce74cd
1 changed files with 4 additions and 1 deletions

View File

@ -93,7 +93,7 @@ class MessageContainer extends React.Component<IMessageContainerProps, IMessageC
shouldComponentUpdate(nextProps: IMessageContainerProps, nextState: IMessageContainerState) {
const { isManualUnignored } = this.state;
const { threadBadgeColor, isIgnored, highlighted } = this.props;
const { threadBadgeColor, isIgnored, highlighted, previousItem } = this.props;
if (nextProps.highlighted !== highlighted) {
return true;
}
@ -106,6 +106,9 @@ class MessageContainer extends React.Component<IMessageContainerProps, IMessageC
if (nextState.isManualUnignored !== isManualUnignored) {
return true;
}
if (nextProps.previousItem?._id !== previousItem?._id) {
return true;
}
return false;
}