# `ExGram.FSM.Key.ChatUser`
[🔗](https://github.com/rockneurotiko/ex_gram_fsm/blob/v0.1.0/lib/ex_gram/fsm/key/chat_user.ex#L1)

Default FSM key: `{chat_id, user_id}`.

Scopes FSM state per-user per-chat. This means:
- The same user in different chats has independent FSM state.
- Different users in the same chat have independent FSM state.

This is the default key strategy and the most common choice for bots that
run multi-step conversations in both DMs and group chats.

## Key shape

| Update type | Key |
|-------------|-----|
| Message / callback in a chat | `{chat_id, user_id}` |
| Inline query (no chat) | `{0, user_id}` — 0 is a sentinel for no-chat context |
| Channel post (no user) | `:error` — FSM state is skipped |

---

*Consult [api-reference.md](api-reference.md) for complete listing*
