Skip to content

Conversation

MartinCupela
Copy link
Contributor

Goal

Provide:

  1. API for message delivery confirmation
client.syncDeliveredCandidates(collections: Channel[]) // in the future (Channel | Thread)[]
await client.markChannelsDelivered(data?: MarkDeliveredOptions)
  1. service for buffering of delivery confirmation payload (client.deliveryReportCoordinator is handling the buffering and throttling of the requests). See Buffering service section in the spec.

  2. WS event processing for read state updates (message.new, message.read, notification.mark_unread, notification.channel_delivered - name may change)

Spec

See description of CHA-991

Out of scope

The buffering service is prepared to handle delivery confirmation for threads too, but it is disabled for the moment.

Copy link
Contributor

github-actions bot commented Sep 9, 2025

Size Change: +15.3 kB (+3.35%)

Total Size: 471 kB

Filename Size Change
dist/cjs/index.browser.cjs 135 kB +5.08 kB (+3.9%)
dist/cjs/index.node.cjs 188 kB +5.11 kB (+2.8%)
dist/esm/index.js 148 kB +5.08 kB (+3.55%)

compressed-size-action

last_read_message_id: event.last_read_message_id,
user: event.user,
unread_messages: 0,
last_delivered_at: event.last_delivered_at
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not necessary to update delivery data here if we have read data

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will keep the data in sync with the back-end

async markChannelsDelivered(data?: MarkDeliveredOptions) {
const deliveryReceiptsEnabled =
this.user?.privacy_settings?.delivery_receipts?.enabled;
if (!deliveryReceiptsEnabled) return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could return some feedback to know that the privacy_setting is missing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't plan it in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants