Skip to content

Commit

Permalink
fix(webchat): increase conversation history length (#622)
Browse files Browse the repository at this point in the history
  • Loading branch information
hacheybj committed Sep 6, 2023
1 parent 003d79e commit 1e18a83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/webchat/src/core/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default class WebchatApi {
try {
const conversation = await this.socket.socket.getConversation(conversationId)
this.socket.socket.switchConversation(conversation!.id)
const messages = (await this.socket.socket.listMessages()).filter((x) => x.payload.type !== 'visit')
const messages = (await this.socket.socket.listMessages(500)).filter((x) => x.payload.type !== 'visit')
return { ...conversation, messages }
} catch (err) {
console.error('Error fetching a conversation', err)
Expand Down

0 comments on commit 1e18a83

Please sign in to comment.