@inetafrica/open-claudia 1.19.3 → 1.19.4
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 +3 -1
- package/bot.js +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v1.19.4
|
|
4
|
+
- Legacy/static env-only deployments with no persisted `auth.json` owner now treat configured `TELEGRAM_CHAT_ID` chats as owners for shared auth commands. This fixes authorized test chats being blocked from `/codex_login` when no `isOwner` metadata exists yet.
|
|
5
|
+
|
|
3
6
|
## v1.19.3
|
|
4
7
|
- 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
8
|
|
package/bot-agent.js
CHANGED
|
@@ -332,7 +332,9 @@ function isOwner(msg) {
|
|
|
332
332
|
if (chatId === CHAT_ID) return true;
|
|
333
333
|
try {
|
|
334
334
|
const auth = JSON.parse(fs.readFileSync(AUTH_FILE, "utf-8"));
|
|
335
|
-
|
|
335
|
+
const authorized = Array.isArray(auth.authorized) ? auth.authorized : [];
|
|
336
|
+
if (authorized.some((a) => String(a.chatId) === chatId && a.isOwner === true)) return true;
|
|
337
|
+
if (!authorized.some((a) => a.isOwner === true) && CHAT_IDS.includes(chatId)) return true;
|
|
336
338
|
} catch (e) {}
|
|
337
339
|
return false;
|
|
338
340
|
}
|
package/bot.js
CHANGED
|
@@ -663,7 +663,9 @@ function isOwner(msg) {
|
|
|
663
663
|
if (chatId === CHAT_ID) return true;
|
|
664
664
|
try {
|
|
665
665
|
const auth = JSON.parse(fs.readFileSync(AUTH_FILE, "utf-8"));
|
|
666
|
-
|
|
666
|
+
const authorized = Array.isArray(auth.authorized) ? auth.authorized : [];
|
|
667
|
+
if (authorized.some((a) => String(a.chatId) === chatId && a.isOwner === true)) return true;
|
|
668
|
+
if (!authorized.some((a) => a.isOwner === true) && CHAT_IDS.includes(chatId)) return true;
|
|
667
669
|
} catch (e) {}
|
|
668
670
|
return false;
|
|
669
671
|
}
|