@inetafrica/open-claudia 1.19.2 → 1.19.3
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/CHANGELOG.md +3 -0
- package/bot-agent.js +7 -1
- package/bot.js +7 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v1.19.3
|
|
4
|
+
- Owner-only auth commands now recognize chats marked as `isOwner: true` in `auth.json`, not only the first `TELEGRAM_CHAT_ID`. This fixes owner-authenticated Telegram chats being blocked from `/codex_login` and `/codex_setup_token`.
|
|
5
|
+
|
|
3
6
|
## v1.19.2
|
|
4
7
|
- Docker images now bake in the OpenAI Codex CLI (`@openai/codex`), so `/codex` and Codex auth commands are available in container/Kubernetes deployments after rollout.
|
|
5
8
|
- Documented that direct npm installs still need optional backend CLIs installed on the host, while Docker images include the Codex CLI.
|
package/bot-agent.js
CHANGED
|
@@ -328,7 +328,13 @@ function isAuthorized(msg) {
|
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
function isOwner(msg) {
|
|
331
|
-
|
|
331
|
+
const chatId = String(msg.chat.id);
|
|
332
|
+
if (chatId === CHAT_ID) return true;
|
|
333
|
+
try {
|
|
334
|
+
const auth = JSON.parse(fs.readFileSync(AUTH_FILE, "utf-8"));
|
|
335
|
+
return Array.isArray(auth.authorized) && auth.authorized.some((a) => String(a.chatId) === chatId && a.isOwner === true);
|
|
336
|
+
} catch (e) {}
|
|
337
|
+
return false;
|
|
332
338
|
}
|
|
333
339
|
|
|
334
340
|
function loadAuth() {
|
package/bot.js
CHANGED
|
@@ -659,7 +659,13 @@ function isAuthorized(msg) {
|
|
|
659
659
|
}
|
|
660
660
|
|
|
661
661
|
function isOwner(msg) {
|
|
662
|
-
|
|
662
|
+
const chatId = String(msg.chat.id);
|
|
663
|
+
if (chatId === CHAT_ID) return true;
|
|
664
|
+
try {
|
|
665
|
+
const auth = JSON.parse(fs.readFileSync(AUTH_FILE, "utf-8"));
|
|
666
|
+
return Array.isArray(auth.authorized) && auth.authorized.some((a) => String(a.chatId) === chatId && a.isOwner === true);
|
|
667
|
+
} catch (e) {}
|
|
668
|
+
return false;
|
|
663
669
|
}
|
|
664
670
|
|
|
665
671
|
function loadAuth() {
|