mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 15:14:57 +00:00
refactor(outbound): centralize telegram account defaults
This commit is contained in:
@@ -22,7 +22,6 @@ import { createSubsystemLogger } from "../logging.js";
|
||||
import { getQueueSize } from "../process/command-queue.js";
|
||||
import { webAuthExists } from "../providers/web/index.js";
|
||||
import { defaultRuntime, type RuntimeEnv } from "../runtime.js";
|
||||
import { resolveDefaultTelegramAccountId } from "../telegram/accounts.js";
|
||||
import { getActiveWebListener } from "../web/active-listener.js";
|
||||
import { emitHeartbeatEvent } from "./heartbeat-events.js";
|
||||
import {
|
||||
@@ -316,17 +315,10 @@ export async function runHeartbeatOnce(opts: {
|
||||
}
|
||||
}
|
||||
|
||||
// Resolve accountId for providers that support multiple accounts
|
||||
const accountId =
|
||||
delivery.provider === "telegram"
|
||||
? resolveDefaultTelegramAccountId(cfg)
|
||||
: undefined;
|
||||
|
||||
await deliverOutboundPayloads({
|
||||
cfg,
|
||||
provider: delivery.provider,
|
||||
to: delivery.to,
|
||||
accountId,
|
||||
payloads: [
|
||||
{
|
||||
text: normalized.text,
|
||||
|
||||
Reference in New Issue
Block a user