chat: fixes misses pending messages

fixes #3497
This commit is contained in:
Tyler Brown Cifu Shuster 2020-09-18 21:57:44 -07:00
parent c19acbb041
commit df4d392ca7

View File

@ -238,8 +238,8 @@ export default class ChatWindow extends Component<ChatWindowProps, ChatWindowSta
.sort((a, b) => 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 };