spacebarchat / spacebarchat/server

Broken message order when fetching history via the API

Open
#1,628 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug javascript Module: API Priority:medium Route
Dominant language
TypeScript
Stars
2.2k
Forks
323
Avg merge
14h 48m
Merged PRs (30d)
4

Description

example: https://api.old.server.spacebar.chat/api/v9/channels/1006649184062836783/messages?after=1494423496004641556&limit=30

something about ordering is broken here as some replies come before the message they reply to

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the request against the messages API endpoint shown in the issue and inspect the returned ordering around replies. Trace the history-fetching entry point and determine the expected parent-before-reply order. Done means the endpoint consistently returns messages in the intended order, with a regression test covering replies that follow their referenced messages.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.