# Muting Channels

Muting a channel prevents it from triggering push notifications, unhiding, or incrementing the unread count for that user.

By default, mutes remain active indefinitely until removed. You can optionally set an expiration time. The list of muted channels and their expiration times is returned when the user connects.

## Mute a Channel

```ruby label="Ruby"
require 'getstream_ruby'

Models = GetStream::Generated::Models

client.chat.mute_channel(Models::MuteChannelRequest.new(
  channel_cids: ['messaging:general'],
  user_id: 'john'
))

# With expiration (in milliseconds)
client.chat.mute_channel(Models::MuteChannelRequest.new(
  channel_cids: ['messaging:general'],
  user_id: 'john',
  expiration: 1000
))
```

<Admonition type="info">

Messages added to muted channels do not increase the unread messages count.

</Admonition>

### Query Muted Channels

Muted channels can be filtered or excluded by using the `muted` in your query channels filter.

```ruby label="Ruby"
require 'getstream_ruby'

Models = GetStream::Generated::Models

client.chat.query_channels(Models::QueryChannelsRequest.new(
  filter_conditions: { 'muted' => true }
))
```

### Remove a Channel Mute

Use the unmute method to restore normal notifications and unread behavior for a channel.

```ruby label="Ruby"
require 'getstream_ruby'

Models = GetStream::Generated::Models

client.chat.unmute_channel(Models::UnmuteChannelRequest.new(
  channel_cids: ['messaging:general'],
  user_id: 'john'
))
```


---

This page was last updated at 2026-08-07T20:37:59.948Z.

For the most recent version of this documentation, visit [https://getstream.io/chat/docs/ruby/muting-channels/](https://getstream.io/chat/docs/ruby/muting-channels/).