


















@@ -7,63 +7,63 @@ afterEach(() => {
77__testing.setDepsForTest();
88});
9910-describe("resolveAnnounceOrigin telegram forum topics", () => {
11-it("preserves stored forum topic thread ids when requester origin omits one for the same chat", () => {
10+describe("resolveAnnounceOrigin threaded route targets", () => {
11+it("preserves stored thread ids when requester origin omits one for the same chat", () => {
1212expect(
1313resolveAnnounceOrigin(
1414{
15-lastChannel: "telegram",
16-lastTo: "telegram:-1001234567890:topic:99",
15+lastChannel: "topicchat",
16+lastTo: "topicchat:room-a:topic:99",
1717lastThreadId: 99,
1818},
1919{
20-channel: "telegram",
21-to: "telegram:-1001234567890",
20+channel: "topicchat",
21+to: "topicchat:room-a",
2222},
2323),
2424).toEqual({
25-channel: "telegram",
26-to: "telegram:-1001234567890",
25+channel: "topicchat",
26+to: "topicchat:room-a",
2727threadId: 99,
2828});
2929});
303031-it("preserves stored forum topic thread ids for legacy group-prefixed requester targets", () => {
31+it("preserves stored thread ids for group-prefixed requester targets", () => {
3232expect(
3333resolveAnnounceOrigin(
3434{
35-lastChannel: "telegram",
36-lastTo: "telegram:-1001234567890:topic:99",
35+lastChannel: "topicchat",
36+lastTo: "topicchat:room-a:topic:99",
3737lastThreadId: 99,
3838},
3939{
40-channel: "telegram",
41-to: "group:-1001234567890",
40+channel: "topicchat",
41+to: "group:room-a",
4242},
4343),
4444).toEqual({
45-channel: "telegram",
46-to: "group:-1001234567890",
45+channel: "topicchat",
46+to: "group:room-a",
4747threadId: 99,
4848});
4949});
505051-it("still strips stale thread ids when the stored telegram route points at a different chat", () => {
51+it("still strips stale thread ids when the stored route points at a different chat", () => {
5252expect(
5353resolveAnnounceOrigin(
5454{
55-lastChannel: "telegram",
56-lastTo: "telegram:-1009999999999:topic:99",
55+lastChannel: "topicchat",
56+lastTo: "topicchat:room-b:topic:99",
5757lastThreadId: 99,
5858},
5959{
60-channel: "telegram",
61-to: "telegram:-1001234567890",
60+channel: "topicchat",
61+to: "topicchat:room-a",
6262},
6363),
6464).toEqual({
65-channel: "telegram",
66-to: "telegram:-1001234567890",
65+channel: "topicchat",
66+to: "topicchat:room-a",
6767});
6868});
6969});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。