From e7e1758fa42426cb17a1290c2a4d3db0f0bda2f8 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Wed, 21 Jul 2021 22:23:24 -0700 Subject: [PATCH] Force history messages to always be at the front of the messages array --- webroot/js/components/chat/chat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webroot/js/components/chat/chat.js b/webroot/js/components/chat/chat.js index f26b02e31..daeb5121a 100644 --- a/webroot/js/components/chat/chat.js +++ b/webroot/js/components/chat/chat.js @@ -151,7 +151,7 @@ export default class Chat extends Component { // extra user names const chatUserNames = extraUserNamesFromMessageHistory(data); this.setState({ - messages: this.state.messages.concat(data), + messages: data.concat(this.state.messages), chatUserNames, }); this.scrollToBottom();