> ## Documentation Index
> Fetch the complete documentation index at: https://learn.social.plus/llms.txt
> Use this file to discover all available pages before exploring further.

# Message Read Status

> Mark chat messages as read and inspect read-count fields from SDK message models.

Use message read status when a user views a message and your app needs unread counts to move forward. The SDK exposes `markRead()` on message models across TypeScript, iOS, Android, and Flutter.

## Platform Surface

| Surface         | TypeScript               | iOS                      | Android                       | Flutter                  |
| --------------- | ------------------------ | ------------------------ | ----------------------------- | ------------------------ |
| Mark read       | `message.markRead()`     | `message.markRead()`     | `message.markRead()`          | `message.markRead()`     |
| Read count      | `message.readCount`      | `message.readCount`      | `message.getReadCount()`      | `message.readCount`      |
| Delivered count | `message.deliveredCount` | `message.deliveredCount` | `message.getDeliveredCount()` | `message.deliveredCount` |

## Parameters

| Parameter                  | Required                | Description                                                          |
| -------------------------- | ----------------------- | -------------------------------------------------------------------- |
| `message`                  | Yes                     | Message model returned by `getMessage` or a message query.           |
| `messageId`                | Yes when fetching first | Message ID used to retrieve a message before marking it read.        |
| `subChannelId`             | Indirect                | The SDK reads this from the message model where needed.              |
| `channelSegment` / segment | Indirect                | The SDK reads this from the message model to sync the read position. |

## Mark Message Read

Call `markRead()` after your app decides the message has been seen, such as when the message becomes visible in an active chat screen.

<CodeGroup>
  ```typescript TypeScript theme={null}
  message.markRead();

  renderResults({
    messageId: message.messageId,
    readCount: message.readCount,
  });
  ```

  ```swift iOS theme={null}
  let liveMessage = messageRepository.getMessage("message-id")

  token = liveMessage.observe { liveObject, _ in
      guard let currentMessage = liveObject.snapshot else { return }

      currentMessage.markRead()
      showSuccessMessage(currentMessage.readCount)
  }
  ```

  ```kotlin Android theme={null}
  val currentMessage = message ?: return

  currentMessage.markRead()
  showSuccessMessage(currentMessage.getReadCount())
  ```

  ```dart Flutter theme={null}
  final fetchedMessage = await AmityChatClient.newMessageRepository()
      .getMessage(messageId);

  fetchedMessage.markRead();
  final readCount = fetchedMessage.readCount ?? 0;
  ```
</CodeGroup>

## Inspect Receipt Counts

Read-count and delivered-count fields are available on message models. Use user-list queries from [Message Delivery Status](./message-delivery-status) when you need the user identities behind the counts.

<CodeGroup>
  ```typescript TypeScript theme={null}
  renderResults({
    readCount: message.readCount,
    deliveredCount: message.deliveredCount,
  });
  ```

  ```swift iOS theme={null}
  let liveMessage = messageRepository.getMessage("message-id")

  token = liveMessage.observe { liveObject, _ in
      guard let currentMessage = liveObject.snapshot else { return }

      showSuccessMessage([
          "readCount": currentMessage.readCount,
          "deliveredCount": currentMessage.deliveredCount
      ])
  }
  ```

  ```kotlin Android theme={null}
  val currentMessage = message ?: return

  showSuccessMessage(
      mapOf(
          "readCount" to currentMessage.getReadCount(),
          "deliveredCount" to currentMessage.getDeliveredCount(),
      ),
  )
  ```

  ```dart Flutter theme={null}
  final fetchedMessage = await AmityChatClient.newMessageRepository()
      .getMessage(messageId);

  final readCount = fetchedMessage.readCount ?? 0;
  final deliveredCount = fetchedMessage.deliveredCount ?? 0;
  ```
</CodeGroup>

## Implementation Notes

<CardGroup cols={2}>
  <Card title="Message Model" icon="message">
    `markRead()` is a method on the message object, so load or query messages before marking them read.
  </Card>

  <Card title="Unread Counts" icon="hashtag">
    Marking messages read is the write path that lets unread count state advance for the current user.
  </Card>

  <Card title="Viewport Logic" icon="eye">
    Your app decides when a message is considered visible enough to mark as read.
  </Card>

  <Card title="Receipt Users" icon="users">
    Use receipt-user APIs where supported when you need identities, not just count fields.
  </Card>
</CardGroup>

## Related Topics

<CardGroup cols={3}>
  <Card title="Channel Unread Count" href="./channel-unread-count" icon="hashtag">
    Read per-channel and total unread counts.
  </Card>

  <Card title="Message Delivery Status" href="./message-delivery-status" icon="truck">
    Mark delivered and query receipt users where supported.
  </Card>

  <Card title="Message Receipt Sync" href="./message-receipt-sync" icon="rotate">
    Keep receipt state current while a chat screen is open.
  </Card>
</CardGroup>
