mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 19:04:31 +00:00
feat(zalouser): add reactions, group context, and receipt acks
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
import type { ZaloSendOptions, ZaloSendResult } from "./types.js";
|
||||
import { sendZaloLink, sendZaloTextMessage, sendZaloTypingEvent } from "./zalo-js.js";
|
||||
import type { ZaloEventMessage, ZaloSendOptions, ZaloSendResult } from "./types.js";
|
||||
import {
|
||||
sendZaloDeliveredEvent,
|
||||
sendZaloLink,
|
||||
sendZaloReaction,
|
||||
sendZaloSeenEvent,
|
||||
sendZaloTextMessage,
|
||||
sendZaloTypingEvent,
|
||||
} from "./zalo-js.js";
|
||||
|
||||
export type ZalouserSendOptions = ZaloSendOptions;
|
||||
export type ZalouserSendResult = ZaloSendResult;
|
||||
@@ -37,3 +44,44 @@ export async function sendTypingZalouser(
|
||||
): Promise<void> {
|
||||
await sendZaloTypingEvent(threadId, options);
|
||||
}
|
||||
|
||||
export async function sendReactionZalouser(params: {
|
||||
threadId: string;
|
||||
msgId: string;
|
||||
cliMsgId: string;
|
||||
emoji: string;
|
||||
remove?: boolean;
|
||||
profile?: string;
|
||||
isGroup?: boolean;
|
||||
}): Promise<ZalouserSendResult> {
|
||||
const result = await sendZaloReaction({
|
||||
profile: params.profile,
|
||||
threadId: params.threadId,
|
||||
isGroup: params.isGroup,
|
||||
msgId: params.msgId,
|
||||
cliMsgId: params.cliMsgId,
|
||||
emoji: params.emoji,
|
||||
remove: params.remove,
|
||||
});
|
||||
return {
|
||||
ok: result.ok,
|
||||
error: result.error,
|
||||
};
|
||||
}
|
||||
|
||||
export async function sendDeliveredZalouser(params: {
|
||||
profile?: string;
|
||||
isGroup?: boolean;
|
||||
message: ZaloEventMessage;
|
||||
isSeen?: boolean;
|
||||
}): Promise<void> {
|
||||
await sendZaloDeliveredEvent(params);
|
||||
}
|
||||
|
||||
export async function sendSeenZalouser(params: {
|
||||
profile?: string;
|
||||
isGroup?: boolean;
|
||||
message: ZaloEventMessage;
|
||||
}): Promise<void> {
|
||||
await sendZaloSeenEvent(params);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user