Hiding Channels
Hiding a channel removes it from query channel requests for that user until a new message is added. Only channel members can hide a channel.
Hidden channels may still have unread messages. Consider marking the channel as read before hiding it.
You can optionally clear the message history for that user when hiding. When a new message is received, it will be the only message visible to that user.
Hide a Channel
// Get a channel
const channel = client.chat.channel("messaging", "general");
// hides the channel for john until a new message is added there
await channel.hide({ user_id: "john" });
// the same, also clearing the history for that user
await channel.hide({ user_id: "john", clear_history: true });
// shows a previously hidden channel
await channel.show({ user_id: "john" });const channel = serverClient.channel("messaging", "general");
// hides the channel for user john until a new message is added there
await channel.hide("john");
// hides the channel and also clears the history for user john
await channel.hide("john", true);
// shows a previously hidden channel
await channel.show("john");Info:
You can still retrieve the list of hidden channels using the { "hidden" : true } query parameter.