openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
31 lines (30 loc) • 1.4 kB
JavaScript
import { j as resolveTimerTimeoutMs } from "./number-coercion-CJQ8TR--.js";
import { i as formatErrorMessage } from "./errors-BXgSefBE.js";
import "./error-runtime-C8vbtAJt.js";
import "./number-runtime-DBLVDypr.js";
import { t as collectZalouserSecurityAuditFindings } from "./security-audit-CCOPhPin.js";
import { a as listZaloGroupMembers, b as waitForZaloQrLogin, c as logoutZaloProfile, i as listZaloFriendsMatching, n as getZaloUserInfo, s as listZaloGroupsMatching, y as startZaloQrLogin } from "./zalo-js-B1zE_Wyq.js";
import { a as sendReactionZalouser, i as sendMessageZalouser } from "./send-duv5hIXL.js";
//#region extensions/zalouser/src/probe.ts
async function probeZalouser(profile, timeoutMs) {
try {
const user = timeoutMs ? await Promise.race([getZaloUserInfo(profile), new Promise((resolve) => {
setTimeout(() => resolve(null), resolveTimerTimeoutMs(timeoutMs, 1e3, 1e3));
})]) : await getZaloUserInfo(profile);
if (!user) return {
ok: false,
error: "Not authenticated"
};
return {
ok: true,
user
};
} catch (error) {
return {
ok: false,
error: formatErrorMessage(error)
};
}
}
//#endregion
export { collectZalouserSecurityAuditFindings, getZaloUserInfo, listZaloFriendsMatching, listZaloGroupMembers, listZaloGroupsMatching, logoutZaloProfile, probeZalouser, sendMessageZalouser, sendReactionZalouser, startZaloQrLogin, waitForZaloQrLogin };