/ SDKs / .NET
SDKs
Chat SDKs .NET v4
Chat SDKs .NET
Chat SDKs
.NET
Version 4

Mark messages as delivered

Copy link

Delivery receipt can be used to see whether a message has successfully been delivered to all the intended recipients by the Sendbird server. Call the MarkAsDelivered() method to mark a message as delivered for a group channel member who is online. For a member who is offline, MarkAsDelivered() should be called when the member brings the client app to the foreground or comes back online.

SendbirdChat.GroupChannel.MarkAsDelivered(REMOTE_NOTIFICATION_PAYLOAD, inError =>
{
    if (inError != null)
        return; // Handle error.
});

Receive callbacks for delivery receipts

Copy link

When a message is delivered to an online group channel member, it is automatically marked as delivered and the other online members are notified of delivery receipt through the OnDeliveryStatusUpdated() method in the channel event handler.

However, when it is delivered to an offline group channel member as a push notification, the message can be marked as delivered through the groupChannel.markAsDelivered(), and other online members are notified of the delivery receipt through the OnDeliveryStatusUpdated().

SbGroupChannelHandler channelHandler = new SbGroupChannelHandler
{
    OnDeliveryStatusUpdated = (inGroupChannel) => { /* Message delivery status changed. */}
};
SendbirdChat.GroupChannel.AddGroupChannelHandler(UNIQUE_HANDLER_ID, channelHandler);