()
| 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 { |
no test coverage detected