Overview
useMuteConversation returns a function that sets or clears the signed-in user’s mute on a conversation. Muting suppresses the message push for that conversation only — the message is still delivered and readable. Timed mutes expire on their own; push resumes with no further action.
The client passes a duration choice, never a raw timestamp — the server resolves the window and represents “forever” via an explicit signal on the returned member.
Requires
ChatProvider in the component tree, an authenticated user, and the chat bundle.Usage Example
Parameters
The hook returns{ muteConversation, muting }. muteConversation accepts:
The conversation to mute or unmute.
The mute duration choice, or
null to clear the mute. Never a raw timestamp.Returns
muteConversation resolves to the acting user’s own (self-serialized) currentMember. Read the resulting mute state off it:
true when the conversation is muted indefinitely (mutedUntil is then null).Real ISO timestamp for a timed mute;
null when not muted or muted forever.Notes
- Available on
@sublay/react-js,@sublay/react-native, and@sublay/expo(inherited from@sublay/core). - Mute state is personal — it’s returned only on the viewer’s own member row, never on other members’.
- For per-type push toggles, see
useNotificationPreferences.

