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 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:
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’.
- On success the conversation’s row in the loaded inbox (
mutedUntil,mutedForever) and the loaded conversation’scurrentMemberare updated to the new mute state. - For per-type push toggles, see
useNotificationPreferences.

