Files
baya-monorepo/archive/build-chain/contracts/domains/messaging.md
T
2026-08-02 18:48:32 +03:30

31 lines
1.8 KiB
Markdown

# messaging — MERGED into `docs/integration/domains/`
> ⛔ **This headerless 851-byte fragment silently amended
> [`messaging-notifications-admin.md`](messaging-notifications-admin.md) next to it** — two live files
> describing one domain, which is contradiction **C-8**.
>
> Both are superseded. Phase 2 split the merged content three ways, along the client's actual domain
> boundaries:
>
> | Content | Now |
> | --- | --- |
> | Tickets, threads, messages, `is_internal`, the staff queue | [`docs/integration/domains/tickets.md`](../../../docs/integration/domains/tickets.md) |
> | The notification feed and unread badge | [`docs/integration/domains/notifications.md`](../../../docs/integration/domains/notifications.md) |
> | Platform config, holidays, audit, support alerts | [`docs/integration/domains/admin.md`](../../../docs/integration/domains/admin.md) |
>
> Every REQ-028 amendment below is folded into `tickets.md` as current fact, not as a change log. Phase 6
> archives this folder; until then, read it as a record.
---
## Refinement phase 3 additions (REQ-028)
- **`TicketSummaryDto`** gains `lastMessageAt` (last non-internal activity) + `unreadCount` (the caller's unread
non-internal messages from others; 0 on the admin queue). Unread is computed against the participant's
`last_read_at`, **stamped when the participant fetches the user-facing thread**.
- **`GET /tickets`** gains a `bookingId` query filter (jump to a booking's coordination ticket).
- **`POST /tickets/{id}/messages`** accepts an optional `clientMessageId` — a retried send with the same key is
deduplicated (returns the original) and the key is echoed on `PostMessageResult`.
- **Message author = role label, not a name** (confirmed intentional, privacy): the DTO carries `senderId`; the
client derives the author label from the participant role. No raw identity/name is exposed.