Skip to content

Messaging, Notifications, And Push

Last audited: 2026-06-26.

Current Screens

Messaging:

  • /messaging
  • /messaging/[leaseId]

Notifications:

  • /notifications

Related routes:

  • /handover/[protocolId]
  • /property/[propertyId]/leases/[leaseId]/handovers/[protocolId]
  • /property/[propertyId]/leases/[leaseId]/payments/[requestId]

Current Behavior

Messaging supports chat list, thread detail by lease, paginated messages, individual message lookup, sending messages, marking a thread as read, unread counts, and action-request response updates.

The chat-list API returns the property name for each conversation, and message bodies are plain text.

Notifications support list, unread count, mark read, mark-all-read, snooze, and navigation into related product surfaces. Integration QA on 2026-06-26 verified message notifications route to lease chat with messageId, payment notifications route to payment request detail, final-settlement notifications route to the closeout board, and handover notifications route through /handover/[protocolId] to the property-scoped protocol detail when only leaseId and protocolId are present. Push registration has native and web-specific bootstrap hooks; native obtains a Firebase Messaging registration token, posts the raw token to the backend, and stores the backend registration response locally. The backend currently stores raw token values and publishes through ExpoPushSender.

Current Backend Touchpoints

  • GET /v1/chats
  • GET /v1/chats/{leaseId}/messages
  • POST /v1/chats/{leaseId}/messages
  • GET /v1/chats/{leaseId}/messages/{messageId}
  • PATCH /v1/chats/{leaseId}/messages/{messageId}/action
  • POST /v1/chats/{leaseId}/messages/read
  • GET /v1/chats/{leaseId}/messages/unread-count
  • GET /v1/notifications
  • GET /v1/notifications/unread-count
  • PATCH /v1/notifications/{notificationId}/read
  • PATCH /v1/notifications/{notificationId}/snooze
  • POST /v1/push-tokens
  • DELETE /v1/push-tokens/{id}

What To Check

  • Chat lease access when a thread is missing or forbidden.
  • Message pagination and read state when unread badges are stale.
  • Notification target metadata when tapping a notification opens the wrong route. For handover notifications, payloads may omit propertyId; the mobile resolver should fetch the protocol/lease and redirect to /property/[propertyId]/leases/[leaseId]/handovers/[protocolId].
  • Native push permission, Firebase Messaging token state, and backend push token records when pushes do not arrive.
  • Expo push request/ticket failures or unregistered-token cleanup in backend logs.