MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / callback

Function callback

shift/shift.ts:672–698  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

670 existed.targetId,
671 ids,
672 existed.options
673 );
674 const first = existed.messages[0];
675 if (first)
676 updateStats(existed.sourceId, existed.targetId, getMediaType(first));
677 } else {
678 console.log("[SHIFT] 组未触发类型过滤,跳过转发");
679 }
680 } catch (e) {
681 if (!isAbortError(e)) {
682 console.error("[SHIFT] 组转发执行失败", e);
683 }
684 }
685 };
686
687 if (context) {
688 existed.timer = context.setTimeout(() => {
689 if (existed.disposeTimer) {
690 void existed.disposeTimer();
691 existed.disposeTimer = undefined;
692 }
693 const task = context.runTask(callback, { label: "shift-group-forward" });
694 task.catch((error) => {
695 if (!isAbortError(error)) {
696 console.error("[SHIFT] 组转发执行失败", error);
697 }
698 });
699 }, 1200, { label: "shift-group-buffer" });
700 existed.disposeTimer = () => clearTimeout(existed.timer!);
701 } else {

Callers 2

scheduleTimeoutMethod · 0.85
enqueueGroupMessageFunction · 0.85

Calls 7

forwardGroupMessagesFunction · 0.85
updateStatsFunction · 0.85
getMediaTypeFunction · 0.85
isAbortErrorFunction · 0.85
errorMethod · 0.80
throwIfAbortedFunction · 0.70
deleteMethod · 0.45

Tested by

no test coverage detected