mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 15:30:47 +00:00
fix(google-meet): require voice call setup entry
This commit is contained in:
@@ -1868,6 +1868,41 @@ describe("google-meet plugin", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("reports missing voice-call plugin entry for explicit Twilio transport", async () => {
|
||||
vi.stubEnv("TWILIO_ACCOUNT_SID", "AC123");
|
||||
vi.stubEnv("TWILIO_AUTH_TOKEN", "secret");
|
||||
vi.stubEnv("TWILIO_FROM_NUMBER", "+15550001234");
|
||||
const { tools } = setup(
|
||||
{ defaultTransport: "chrome" },
|
||||
{
|
||||
fullConfig: {
|
||||
plugins: {
|
||||
allow: ["google-meet", "voice-call"],
|
||||
entries: {},
|
||||
},
|
||||
},
|
||||
},
|
||||
);
|
||||
const tool = tools[0] as {
|
||||
execute: (
|
||||
id: string,
|
||||
params: unknown,
|
||||
) => Promise<{ details: { ok?: boolean; checks?: unknown[] } }>;
|
||||
};
|
||||
|
||||
const result = await tool.execute("id", { action: "setup_status", transport: "twilio" });
|
||||
|
||||
expect(result.details.ok).toBe(false);
|
||||
expect(result.details.checks).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
id: "twilio-voice-call-plugin",
|
||||
ok: false,
|
||||
}),
|
||||
]),
|
||||
);
|
||||
});
|
||||
|
||||
it("reports missing Twilio dial plan for explicit Twilio setup", async () => {
|
||||
vi.stubEnv("TWILIO_ACCOUNT_SID", "AC123");
|
||||
vi.stubEnv("TWILIO_AUTH_TOKEN", "secret");
|
||||
|
||||
@@ -225,7 +225,8 @@ export function getGoogleMeetSetupStatus(
|
||||
Object.hasOwn(pluginEntries, "voice-call"));
|
||||
if (shouldCheckTwilioDelegation) {
|
||||
const voiceCallAllowed = !Array.isArray(pluginAllow) || pluginAllow.includes("voice-call");
|
||||
const voiceCallEnabled = voiceCallEntry.enabled !== false;
|
||||
const hasVoiceCallEntry = Object.hasOwn(pluginEntries, "voice-call");
|
||||
const voiceCallEnabled = hasVoiceCallEntry && voiceCallEntry.enabled !== false;
|
||||
checks.push({
|
||||
id: "twilio-voice-call-plugin",
|
||||
ok: voiceCallAllowed && voiceCallEnabled,
|
||||
|
||||
Reference in New Issue
Block a user