Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: babbles messages #504

Merged
merged 2 commits into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/routes/babbles/chat/[id]/[[thread_id]]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@

const parentMessage = parentMap.get(message.parentId)
if (!parentMessage) {
// this is a workaround for the case when the parent is lost to
// keep the rest of the thread
roots.push(parent)
Comment on lines +129 to +131
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a temporary fix? If so, I suggest adding //FIXME: or //TODO:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, for now it is a workaround for lost messages.

However there is a broader issue that we only keep MAX_MESSAGES (currently set to 100) messages locally in the history. This is not a big issue with chats because they are linear, but with babbles it is possible that a parent message is lost because of this and the conversation would be orphaned without this workaround too.

continue
}

Expand Down