[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 5e8698086c
commit 36e7ee7383
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) { shouldComponentUpdate(nextProps: IMessageContainerProps, nextState: IMessageContainerState) {
const { isManualUnignored } = this.state; const { isManualUnignored } = this.state;
const { threadBadgeColor, isIgnored, highlighted } = this.props; const { threadBadgeColor, isIgnored, highlighted, previousItem } = this.props;
if (nextProps.highlighted !== highlighted) { if (nextProps.highlighted !== highlighted) {
return true; return true;
} }
@ -106,6 +106,9 @@ class MessageContainer extends React.Component<IMessageContainerProps, IMessageC
if (nextState.isManualUnignored !== isManualUnignored) { if (nextState.isManualUnignored !== isManualUnignored) {
return true; return true;
} }
if (nextProps.previousItem?._id !== previousItem?._id) {
return true;
}
return false; return false;
} }