Skip to content

Query channel returns empty reaction arrays during pagination #2626

@tpucci

Description

@tpucci

Problem

When the SDK calls channel.query() (during initial load or pagination), the API returns empty reaction arrays even when reactions exist on messages. Edit: this happens sometimes during the first sync call after a reaction is sent, meaning it is a backend issue.

Observed Behavior

After a reaction is added to a message (via WebSocket event or direct API call), the very next query channel operation returns messages with empty reaction fields.

Query channel request (from Channel.query() in lib/src/client/channel.dart:1827-1918):

{
  "state": true,
  "watch": true,
  "presence": false,
  "data": {}
}

API response shows empty reaction arrays:

{
  "id": "message-id",
  "latest_reactions": [],
  "own_reactions": [],
  "reaction_counts": {},
  "reaction_scores": {}
}

Expected Behavior

Query channel should return messages with their reaction data populated, including latest_reactions, own_reactions, reaction_counts, and reaction_scores.

SDK Version

stream_chat: 9.23.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions