@wildix/xbees-conversations-client > MarkUnreadCommand
MarkUnreadCommand class
Marks the channel with unread indicator. A user can have up to 100 channels marked as unread. If a user tries to tag more than 100 channels, the system will remove the oldest channel unread marked if the force flag is specified; otherwise, a MarkUnreadChannelsLimitReachedException will be thrown. The system will automatically remove the unread mark from the channel if the user reads the messages using the MarkRead operation. This operation is idempotent, meaning that if the channel is already marked as unread, no error will be thrown.
Signature:
export declare class MarkUnreadCommand extends MarkUnreadCommand_base
Extends: MarkUnreadCommand_base
Example
Use a bare-bones client and the command you need to make an API call.
import { ConversationsClient, MarkUnreadCommand } from "@wildix/xbees-conversations-client"; // ES Modules import
// const { ConversationsClient, MarkUnreadCommand } = require("@wildix/xbees-conversations-client"); // CommonJS import
const client = new ConversationsClient(config);
const input = { // MarkUnreadInput
channelId: "STRING_VALUE", // required
userId: "STRING_VALUE",
messageId: "STRING_VALUE",
force: true || false,
};
const command = new MarkUnreadCommand(input);
const response = await client.send(command);
// {};