Skip to content

Commit

Permalink
fix(MessagesList): fix fetching messages completion when there is no …
Browse files Browse the repository at this point in the history
…message.

Signed-off-by: DorraJaouad <dorra.jaoued7@gmail.com>
  • Loading branch information
DorraJaouad committed Nov 21, 2024
1 parent febfe9e commit 3490731
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/MessagesList/MessagesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -670,9 +670,10 @@ export default {
}
this.$store.dispatch('setFirstKnownMessageId', { token, id: startingMessageId })
this.$store.dispatch('setLastKnownMessageId', { token, id: startingMessageId })

// If -2, it means it's the beginning of the chat, so we need to get the context

Check failure on line 673 in src/components/MessagesList/MessagesList.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Trailing spaces not allowed
// using 0
// Get chat messages before last read message and after it
await this.getMessageContext(token, startingMessageId)
await this.getMessageContext(token, startingMessageId !== -2 ? startingMessageId : 0)
} catch (exception) {
console.debug(exception)
// Request was cancelled, stop getting preconditions and restore initial state
Expand Down

0 comments on commit 3490731

Please sign in to comment.