mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-11-04 00:14:12 +00:00
fix: start a plugin's api calls at once again, not a tick later
This commit is contained in:
@@ -2041,8 +2041,11 @@ export async function dispatchApiCall(
|
||||
throw new Error(`Unknown API method "${method}"`);
|
||||
}
|
||||
|
||||
const assistant = await dispatchAssistant(plugin, method, args);
|
||||
if (assistant !== NOT_MINE) return assistant;
|
||||
// The AI assistant's methods; every other call goes on without waiting a tick.
|
||||
if (method in ASSISTANT_PERMS) {
|
||||
const assistant = await dispatchAssistant(plugin, method, args);
|
||||
if (assistant !== NOT_MINE) return assistant;
|
||||
}
|
||||
|
||||
switch (method) {
|
||||
case 'proxy.fetch': return proxyFetch(plugin, args, opts?.sink ?? null);
|
||||
|
||||
Reference in New Issue
Block a user