forwardMessage
Chuyển tiếp tin nhắn
api.forwardMessage(payload, threadIds[, type])
Parameters
payload
ForwardMessagePayload
threadIds
string[]
type
ThreadType?
mặc định
ThreadType.User
Return
Promise<ForwardMessageResponse>
Types
export type ForwardMessagePayload = {
message: string;
ttl?: number;
reference?: {
id: string;
ts: number;
logSrcType: number;
fwLvl: number;
};
};
export type ForwardMessageSuccess = {
clientId: string;
msgId: string;
};
export type ForwardMessageFail = {
clientId: string;
error_code: string;
};
export type ForwardMessageResponse = {
success: ForwardMessageSuccess[];
fail: ForwardMessageFail[];
};
Examples
Chuyển tiếp tin nhắn cho 3 người dùng
api
.forwardMessage(
{
message: "tin nhắn chuyển tiếp"
},
[
"0000000000000000001",
"0000000000000000002"
"0000000000000000003"
]
)
.then(console.log)
.catch(console.error);
Related
Last updated