diff --git a/pkg/interface/src/views/apps/chat/components/lib/ChatWindow.tsx b/pkg/interface/src/views/apps/chat/components/lib/ChatWindow.tsx index f166ede6a..9d57c9182 100644 --- a/pkg/interface/src/views/apps/chat/components/lib/ChatWindow.tsx +++ b/pkg/interface/src/views/apps/chat/components/lib/ChatWindow.tsx @@ -238,8 +238,8 @@ export default class ChatWindow extends Component a.when - b.when) .forEach((message, index) => { index = index + 1; // To 1-index it - messages.set(envelopes.length + index, message); - lastMessage = envelopes.length + index; + messages.set(mailboxSize + index, message); + lastMessage = mailboxSize + index; }); const messageProps = { association, group, contacts, hideAvatars, hideNicknames, remoteContentPolicy };