chz-telegram-bot 0.3.19 → 0.3.21

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.
@@ -87,7 +87,7 @@ class CommandAction {
87
87
  if (!this.active)
88
88
  return commandTriggerCheckResult_1.CommandTriggerCheckResult.DontTriggerAndSkipCooldown('ActionDisabled');
89
89
  const isChatInBlacklist = this.chatsBlacklist.includes(ctx.chatInfo.id);
90
- const isChatInWhitelist = this.chatsWhitelist.length != 0 &&
90
+ const isChatInWhitelist = this.chatsWhitelist.length == 0 ||
91
91
  this.chatsWhitelist.includes(ctx.chatInfo.id);
92
92
  if (isChatInBlacklist || !isChatInWhitelist)
93
93
  return commandTriggerCheckResult_1.CommandTriggerCheckResult.DontTriggerAndSkipCooldown('ChatForbidden');
@@ -155,7 +155,7 @@ export class CommandAction<TActionState extends IActionState>
155
155
 
156
156
  const isChatInBlacklist = this.chatsBlacklist.includes(ctx.chatInfo.id);
157
157
  const isChatInWhitelist =
158
- this.chatsWhitelist.length != 0 &&
158
+ this.chatsWhitelist.length == 0 ||
159
159
  this.chatsWhitelist.includes(ctx.chatInfo.id);
160
160
 
161
161
  if (isChatInBlacklist || !isChatInWhitelist)
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "type": "git",
15
15
  "url": "https://github.com/AlexSolari/botFramework.git"
16
16
  },
17
- "version": "0.3.19",
17
+ "version": "0.3.21",
18
18
  "type": "module",
19
19
  "dependencies": {
20
20
  "async-sema": "^3.1.1",