# `ExWapp.Message.Handler.Common`
[🔗](https://github.com/elchemista/ex_wapp/blob/v0.1.5/lib/ex_wapp/message/handler/common.ex#L1)

Provides shared normalization and lookup helpers for inbound node handlers.

JID, timestamp, node-attribute, chat-target, and sync metadata handling live
here so individual handlers apply the same wire conventions.

# `chat_target`

```elixir
@spec chat_target(pid() | term(), map()) :: pid() | struct() | nil
```

# `extract_group_event_timestamp`

```elixir
@spec extract_group_event_timestamp(term()) :: integer() | nil
```

# `extract_group_subject`

```elixir
@spec extract_group_subject(term()) :: binary() | nil
```

# `find_child_node`

```elixir
@spec find_child_node(term(), binary()) :: ExWapp.Binary.Node.t() | nil
```

# `first_non_empty`

```elixir
@spec first_non_empty(list()) :: binary() | nil
```

# `lid_jid?`

```elixir
@spec lid_jid?(term()) :: boolean()
```

# `node_attr`

```elixir
@spec node_attr(term(), binary()) :: term()
```

# `normalize_content`

```elixir
@spec normalize_content(term()) :: binary() | nil
```

# `normalize_jid`

```elixir
@spec normalize_jid(term()) :: binary()
```

# `normalize_jid_with_device`

```elixir
@spec normalize_jid_with_device(term()) :: binary()
```

# `normalize_optional_text`

```elixir
@spec normalize_optional_text(term()) :: binary() | nil
```

# `parse_enc_version`

```elixir
@spec parse_enc_version(term()) :: integer() | nil
```

# `parse_non_neg_integer`

```elixir
@spec parse_non_neg_integer(term()) :: non_neg_integer() | nil
```

# `parse_timestamp`

```elixir
@spec parse_timestamp(term()) :: integer()
```

# `resolve_store_from_target`

```elixir
@spec resolve_store_from_target(pid() | struct()) :: struct() | nil
```

# `strip_device_from_jid`

```elixir
@spec strip_device_from_jid(term()) :: binary()
```

# `update_stats`

```elixir
@spec update_stats(map(), atom()) :: map()
```

# `upsert_chat_from_sync_attrs`

```elixir
@spec upsert_chat_from_sync_attrs(pid() | struct(), map(), map()) :: :ok
```

---

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