Skip to main content

@wildix/xbees-conversations-client > PinMessageCommand

PinMessageCommand class

Pins specified message in the message. This operation is idempotent, meaning that if the message is already pinned, no error will be thrown.

Signature:

export declare class PinMessageCommand extends PinMessageCommand_base 

Extends: PinMessageCommand_base

Example

Use a bare-bones client and the command you need to make an API call.

import { ConversationsClient, PinMessageCommand } from "@wildix/xbees-conversations-client"; // ES Modules import
// const { ConversationsClient, PinMessageCommand } = require("@wildix/xbees-conversations-client"); // CommonJS import
const client = new ConversationsClient(config);
const input = { // PinMessageInput
channelId: "STRING_VALUE", // required
messageId: "STRING_VALUE", // required
userId: "STRING_VALUE",
expiresAfter: Number("int"),
expiresAt: "STRING_VALUE",
silent: true || false,
};
const command = new PinMessageCommand(input);
const response = await client.send(command);
// {};