Skip to content

Commit fe8020d

Browse files
committed
fix(elevated): keep channel parsing out of core
1 parent eeea24f commit fe8020d

2 files changed

Lines changed: 0 additions & 16 deletions

File tree

src/auto-reply/reply/reply-elevated.test.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,6 @@ describe("resolveElevatedPermissions", () => {
8383
});
8484
});
8585

86-
it("does not authorize a group conversation id when ChatType is missing", () => {
87-
expectAllowFromDecision({
88-
allowFrom: ["120363411111111111@g.us", "from:120363411111111111@g.us"],
89-
allowed: false,
90-
ctx: {
91-
ChatType: undefined,
92-
From: "120363411111111111@g.us",
93-
SenderId: "+15550002222",
94-
SenderE164: "+15550002222",
95-
},
96-
});
97-
});
98-
9986
it("keeps direct chat From fallback authorization", () => {
10087
expectAllowFromDecision({
10188
allowFrom: ["from:whatsapp:+15550001111"],

src/auto-reply/sender-identity.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ function isConversationLikeIdentity(value: string): boolean {
1313
if (normalized.startsWith("chat_id:")) {
1414
return true;
1515
}
16-
if (/(^|:)[0-9]+(?:-[0-9]+)*@g\.us$/.test(normalized)) {
17-
return true;
18-
}
1916
return /(^|:)(channel|group|thread|topic|room|space|spaces):/.test(normalized);
2017
}
2118

0 commit comments

Comments
 (0)