Skip to content

GET /conversations/:id/messages: per-device ciphertext shape + unavailable marker #336

Description

@codebestia

The message-list handler correctly joins message_envelopes filtered to the caller's own deviceId but returns raw row objects instead of running them through the shared serializeMessage helper that GET /:id already uses. Callers can't distinguish "this device has no envelope for this message" from "this message legitimately has no content". There's no dedicated test file for this route.

Acceptance criteria:

  • The handler maps each row through serializeMessage, matching the shape GET /:id already produces
  • Messages with no matching envelope for the caller's device are explicitly marked unavailable: true
  • A dedicated test file covers: normal pagination, an unavailable-envelope case, and cursor correctness

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions