fix: preserve overlapping telegram room event correlations · openclaw/openclaw@ad29f08
steipete
·
2026-05-16
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -120,4 +120,40 @@ describe("telegram inbound turn delivery", () => {
|
120 | 120 | endRoomEvent(); |
121 | 121 | endUserRequest(); |
122 | 122 | }); |
| 123 | + |
| 124 | +it("keeps a newer overlapping room-event correlation when an older one ends", () => { |
| 125 | +let firstCount = 0; |
| 126 | +let secondCount = 0; |
| 127 | +const endFirst = beginTelegramInboundTurnDeliveryCorrelation( |
| 128 | +"sess:overlap", |
| 129 | +{ |
| 130 | +outboundTo: "999", |
| 131 | +markInboundTurnDelivered: () => { |
| 132 | +firstCount += 1; |
| 133 | +}, |
| 134 | +}, |
| 135 | +{ inboundTurnKind: "room_event" }, |
| 136 | +); |
| 137 | +const endSecond = beginTelegramInboundTurnDeliveryCorrelation( |
| 138 | +"sess:overlap", |
| 139 | +{ |
| 140 | +outboundTo: "999", |
| 141 | +markInboundTurnDelivered: () => { |
| 142 | +secondCount += 1; |
| 143 | +}, |
| 144 | +}, |
| 145 | +{ inboundTurnKind: "room_event" }, |
| 146 | +); |
| 147 | + |
| 148 | +endFirst(); |
| 149 | +notifyTelegramInboundTurnOutboundSuccess({ |
| 150 | +sessionKey: "sess:overlap", |
| 151 | +to: "999", |
| 152 | +inboundTurnKind: "room_event", |
| 153 | +}); |
| 154 | + |
| 155 | +expect(firstCount).toBe(0); |
| 156 | +expect(secondCount).toBe(1); |
| 157 | +endSecond(); |
| 158 | +}); |
123 | 159 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。