Skip to content

Sorting messages correctly #14

Description

@Axl-91

Sorting messages correctly

Description

Currently, we are using the inserted_at timestamp to sort messages in the chatroom. While this approach works well in most cases, it poses a significant problem when multiple messages are sent within the same second, leading to incorrect ordering.

Proposed Solution

To improve the sorting of messages, we propose increasing the precision of the inserted_at timestamps to include milliseconds. This change should help alleviate the issues arising from messages being sent too closely together.

Considerations

Adding milliseconds will enhance ordering accuracy, but...Can messages actually be sent within the same millisecond? It's possible, yet this solution still represents an improvement over the current system.

Implementing this change will improve the overall user experience by ensuring that messages are presented in the correct order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions