FIX: ensures updateLastRead is called when receiving a message (#20728)
This behavior is hard to test as it's mostly fixing a race condition: User A sends a message at the same time than User B, which as a result doesn't cause a scroll for the second message and we don't update last read unless we do a small up and down scroll. `updateLastRead` is debounced so it has no direct consequences to call it slightly more often than what should ideally be needed.
This commit is contained in:
parent
293cb7bde2
commit
aa8eff5e16
|
@ -613,6 +613,7 @@ export default class ChatLivePane extends Component {
|
|||
const message = ChatMessage.create(this.args.channel, data.chat_message);
|
||||
this.args.channel.addMessages([message]);
|
||||
this.scrollToLatestMessage();
|
||||
this.updateLastReadMessage();
|
||||
} else {
|
||||
// If we are almost at the bottom, we append the message and notice the user
|
||||
const message = ChatMessage.create(this.args.channel, data.chat_message);
|
||||
|
|
Loading…
Reference in New Issue