multiple user ids for bot api

This commit is contained in:
kulikov0 committed 2026-05-09 19:57:00 +02:00
1 parent 870118d5ab
commit 31d03bcb14
8 files changed
+59 -44

No files matched your search

+5 -1
View File
@@ -151,7 +151,11 @@ export class BotManager {
console.log('[BOT] Message from', fromId, ':', text, 'payload:', payload);
if (this.settings.userId && fromId.toString() !== this.settings.userId.toString()) {
const allowedIds = this.settings.userId
.split(',')
.map((id) => id.trim())
.filter((id) => id.length > 0);
if (allowedIds.length > 0 && !allowedIds.includes(fromId.toString())) {
return;
}