# Delivered & Read Status

Messages go through multiple states reflecting recipient interaction:

- **Sent** - The message reached the Stream server. Confirmed via the `message.new` WebSocket event.
- **Delivered** - The recipient's device confirmed delivery. Confirmed via the `message.delivered` WebSocket event. Disabled by default.
- **Read** - The recipient marked the channel as read. Confirmed via the `message.read` WebSocket event.

For marking channels as read/unread and retrieving unread counts, see [Unread Counts](https://getstream.io/chat/docs/ios-swift/unread/).

## Delivery Receipts

Delivery receipts track when messages are delivered to recipient devices.

>
> **Info:** Contact support to enable message delivery tracking for your app.
>

>
> **Warning:** The Android SDK requires the [offline plugin](https://getstream.io/chat/docs/sdk/android/basics/offline-support/) for delivery receipts to function correctly.
>

### Enabling Delivery Receipts

#### Channel Type Configuration

Enable delivery tracking for all channels of a type.

```js label="JavaScript"
// This is a server-side only feature, choose any of our server-side SDKs to use it
```

You can also enable this in the [Dashboard](https://getstream.io/signin/?product=chat) under channel type configuration.

#### User Privacy Settings

Control whether a user's delivery status is shared with others.

```swift label="Swift"
let currentUserController = ChatClient.shared.currentUserController()
currentUserController.updateUserData(
  privacySettings: .init(
    deliveryReceipts: DeliveryReceiptsPrivacySettings(enabled: false)
  )
)
```

When `privacy_settings.delivery_receipts.enabled` is `false`, the user's delivery status is not exposed to others, and the `message.delivered` event is not sent when this user confirms delivery.

### Automatic Delivery Confirmation

The SDK automatically handles delivery confirmation, including request throttling and duplicate prevention.

>
> **Info:** Delivery tracking is currently supported for channel messages only, not thread replies.
>

### Delivery Events

The `message.delivered` event is triggered when a message is delivered to a recipient's device. The event includes:

- `last_delivered_at` - Timestamp when messages were last confirmed as delivered
- `last_delivered_message_id` - ID of the last message confirmed as delivered

## Read Receipts

Read receipts track when users have read messages in a channel.

### Enabling Read Receipts

#### Channel Type Configuration

Enable read tracking for all channels of a type.

```js label="JavaScript"
// This is a server-side only feature, choose any of our server-side SDKs to use it
```

You can also enable this in the Dashboard under channel type configuration.

#### User Privacy Settings

Control whether a user's read status is shared with others.

```swift label="Swift"
let currentUserController = ChatClient.shared.currentUserController()
currentUserController.updateUserData(
  privacySettings: .init(
    readReceipts: ReadReceiptsPrivacySettings(enabled: false)
  )
)
```

When `privacy_settings.read_receipts.enabled` is `false`, the user's read state is not exposed to others, and `message.read` and `notification.mark_read` events are not sent when this user reads messages.

### Read Events

The following events are triggered for read status:

- `message.read` - When any channel member marks the channel as read
- `notification.mark_read` - When the connected user marks a channel as read
- `notification.mark_unread` - When the connected user marks a message as unread

For handling these events and updating unread counts, see [Unread Counts](https://getstream.io/chat/docs/ios-swift/unread/).

## Push Notification Delivery Confirmation

By default, when a push notification is received while the app is inactive, the message is not marked as delivered. To mark messages as delivered from push notifications, customize your push notification handling.

- [iOS Custom Push Notifications](https://getstream.io/chat/docs/sdk/ios/guides/push-notifications/#customising-remote-push-notifications)
- [Android Custom Push Notifications](https://getstream.io/chat/docs/sdk/android/guides/push-notifications/#customizing-push-notifications)

```swift label="Swift"
// In your NotificationService extension
let chatHandler = ChatRemoteNotificationHandler(client: client, content: content)
let chatNotification = chatHandler.handleNotification { chatContent in
  switch chatContent {
  case let .message(messageNotification):
    switch messageNotification.type {
    case .messageNew:
      if let channel = messageNotification.channel {
        chatHandler.markMessageAsDelivered(messageNotification.message, for: channel)
      }
    default:
      break
    }
  case .unknown:
    break
  }
}
```

---

For the most recent version of this documentation, visit [https://getstream.io/chat/docs/ios-swift/message-delivery-and-read-status/](https://getstream.io/chat/docs/ios-swift/message-delivery-and-read-status/).