SSL polling-status.ts
Interaktion und Portierbarkeitunbekannt
import type { ChannelAccountSnapshot } from "openclaw/plugin-sdk/channel-contract"; import {
createConnectedChannelStatusPatch,
createTransportActivityStatusPatch,
} from "openclaw/plugin-sdk/gateway-runtime";
type TelegramPollingStatusSink = (patch: Omit<ChannelAccountSnapshot, "accountId">) => void;
export function createTelegramPollingStatusPublisher(setStatus?: TelegramPollingStatusSink) { return {
notePollingStart() {
setStatus?.({
mode: "polling",
connected: false,
lastConnectedAt: null,
lastEventAt: null,
lastTransportActivityAt: null,
});
},
notePollSuccess(at = Date.now()) {
setStatus?.({
...createConnectedChannelStatusPatch(at), // A successful getUpdates call proves the Telegram HTTP long-poll is alive // even when the response has no user-visible updates.
...createTransportActivityStatusPatch(at),
mode: "polling",
lastError: null,
});
},
notePollingStop() {
setStatus?.({
mode: "polling",
connected: false,
});
},
};
}
Messung V0.5 in Prozent
[Verzeichnis aufwärts0.21unsichere VerbindungÜbersetzung europäischer Sprachen durch Browser2026-06-13]