polygram 0.12.6 → 0.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/handlers/gate-inbound.js +11 -0
- package/package.json +1 -1
|
@@ -79,6 +79,17 @@ function createGateInbound({
|
|
|
79
79
|
&& pairings.hasLivePairing({ bot_name: botName, user_id: msg.from.id, chat_id: chatId })) {
|
|
80
80
|
return true;
|
|
81
81
|
}
|
|
82
|
+
// The operator owns the bot — their abort is never a bystander abort, so it
|
|
83
|
+
// outranks the @mention/reply requirement even in a group. Without this, the
|
|
84
|
+
// operator's bare "stop" in a group is silently abort-identity-blocked (prod:
|
|
85
|
+
// chat -1003369922517, 2026-06-15). Same operator predicate /rewind uses
|
|
86
|
+
// below: operatorUserId, else adminChatId ONLY when it's a user id — a
|
|
87
|
+
// negative/group adminChatId never equals a positive sender id, so it grants
|
|
88
|
+
// no bypass (fail-safe). Narrow: only the operator, not every group member.
|
|
89
|
+
const opId = config.bot?.operatorUserId;
|
|
90
|
+
const adminChatId = config.bot?.adminChatId;
|
|
91
|
+
const operatorUid = opId != null ? Number(opId) : (adminChatId != null ? Number(adminChatId) : null);
|
|
92
|
+
if (operatorUid != null && msg.from?.id != null && Number(msg.from.id) === operatorUid) return true;
|
|
82
93
|
return false;
|
|
83
94
|
}
|
|
84
95
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polygram",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.7",
|
|
4
4
|
"description": "Telegram daemon for Claude Code that preserves the OpenClaw per-chat session model. Migration path for OpenClaw users moving to Claude Code.",
|
|
5
5
|
"main": "lib/ipc/client.js",
|
|
6
6
|
"bin": {
|