penguin/golifehk

@golifehk bot in Telegram

commit 0ed4c618dc698918bbdba4486babf663544a0e66

author斟酌 鵬兄 <tgckpg@gmail.com>
date2024-10-31T19:15:14Z
subjectdefault mode to disable
commit 0ed4c618dc698918bbdba4486babf663544a0e66
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date:   2024-10-31T19:15:14Z

    default mode to disable
---
 utils/system.go | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/utils/system.go b/utils/system.go
index ec52be4..a76cc75 100644
--- a/utils/system.go
+++ b/utils/system.go
@@ -85,9 +85,12 @@ func SystemControl( tgMesg *tgbotapi.Message ) ( string, bool ) {
     //// Begin processing settings
 
     // ignore chats if enabled
-    if Settings.IgnoredChats[ chatId ] {
-        processed = true
-    }
+	if ignore, ok := Settings.IgnoredChats[ chatId ]; ok {
+        processed = processed || ignore;
+	} else {
+		// default ignore
+		processed = true;
+	}
 
     return mesg, processed
 }