Skip to content

Commit

Permalink
Update onHistory based on new chat backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitchdev committed Nov 17, 2024
1 parent 2c0014f commit 191cc9e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions assets/chat/js/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -1110,12 +1110,10 @@ class Chat {
}
}

onHISTORY(data) {
if (data?.messages && data.messages.length > 0) {
onHISTORY(events) {
if (events && events.length > 0) {
this.backlogloading = true;
data.messages.forEach((message) =>
this.source.dispatch(message.event, message.data),
);
events.forEach((data) => this.source.parseAndDispatch({ data }));
this.backlogloading = false;
this.mainwindow.update(true);
}
Expand Down

0 comments on commit 191cc9e

Please sign in to comment.