diff --git a/apps/desktop/src/plugins/hermes-bots/relay.test.ts b/apps/desktop/src/plugins/hermes-bots/relay.test.ts index 99064c450a..dd66dbd4f8 100644 --- a/apps/desktop/src/plugins/hermes-bots/relay.test.ts +++ b/apps/desktop/src/plugins/hermes-bots/relay.test.ts @@ -30,6 +30,16 @@ const { clearBotAttentionMock, hostMock, noteBotAttentionMock, UnboundedCache } clearBotAttentionMock: vi.fn(), hostMock: { onEvent: vi.fn(), + pluginDecisions: { + get: () => { + try { + const raw = window.localStorage.getItem('hermes.desktop.pluginDecisions.v2') + return raw ? (JSON.parse(raw) as Record) : {} + } catch { + return {} + } + } + }, profileRoutes: vi.fn(), requestProfile: vi.fn(), retainProfileSocket: vi.fn() diff --git a/apps/desktop/src/plugins/hermes-bots/relay.ts b/apps/desktop/src/plugins/hermes-bots/relay.ts index ba3a0e6b80..727b94a3f1 100644 --- a/apps/desktop/src/plugins/hermes-bots/relay.ts +++ b/apps/desktop/src/plugins/hermes-bots/relay.ts @@ -9,8 +9,6 @@ import { host, LruCache } from '@hermes/plugin-sdk' -import { pluginActive } from '@/contrib/plugins-store' - import { botHandle, clearBotAttention, noteBotAttention } from './data' import { ID } from './shared' import type { ProfileRoute, RosterRow } from './types' @@ -120,7 +118,9 @@ const RELAY_OUTBOX_ANY = '*' const routesWithOutboxWork = new Set() function relayBotModeOn(): boolean { - return pluginActive(ID) + const decisions = host.pluginDecisions.get() + + return ID in decisions ? Boolean(decisions[ID]) : true } function noteRelayOutboxWork(event?: { connectionId?: string }) {