Skip to content

Add archived, pinned, and unreadCount to ChatSummary #1744

@muhammedaksam

Description

@muhammedaksam

Is your feature request related to a problem? Please describe.
I'm frustrated when building clients (like waha-tui) that rely on GET /api/chats/overview because the ChatSummary object lacks essential metadata such as archived status, pinned status, and unreadCount.

Currently, developers often try to rely on the internal _chat object, but this is unreliable as it often gets stripped or arrives empty during serialization (e.g., when passing data between processes or over the network). This makes it impossible to implement basic features like "Show Archived Chats" or "Sort by Pinned" without making additional heavy API calls for every single chat.

Describe the solution you'd like
I would like ChatSummary to explicitly include these properties as top-level fields so they are guaranteed to be serialized and available.

Update the ChatSummary DTO in waha and the corresponding interfaces in waha-node:

export class ChatSummary {
  id: string;
  name: string | null;
  picture: string | null;

  // New fields
  archived?: boolean;
  pinned?: boolean;
  unreadCount?: number;

  lastMessage: any;
  _chat: any;
}

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