default filter

main
alex 2023-10-21 17:12:23 +02:00
parent c714aff989
commit 2983531a8c
2 changed files with 4 additions and 2 deletions

View File

@ -49,7 +49,7 @@ MARIADB_PASSWORD=db_password
MARIADB_DATABASE_NAME=db_database_name`) MARIADB_DATABASE_NAME=db_database_name`)
config.LoadConfig() config.LoadConfig()
rslogger.InitLogger(true, config.Cfg.ColorizedOutput, config.Cfg.LogManagerServerUrl) rslogger.InitLogger(false, config.Cfg.ColorizedOutput, config.Cfg.LogManagerServerUrl)
if os.Getenv("DOCKER") != "" { if os.Getenv("DOCKER") != "" {
fmt.Println("Waiting for mariadb docker") fmt.Println("Waiting for mariadb docker")

View File

@ -75,7 +75,8 @@ func IncomingMessagesHandler() {
replyMessage = "Welcome!\n\n" + replyMessage = "Welcome!\n\n" +
"Type /verify <code> to start receiving notifications. The code can be found in the user profile on the dashboard.\n\n" + "Type /verify <code> to start receiving notifications. The code can be found in the user profile on the dashboard.\n\n" +
"Type /unsubscribe to stop receiving notifications.\n\n" + "Type /unsubscribe to stop receiving notifications.\n\n" +
"Type /filter <filter> to filter notifications. Filter can be: success, info, warning, error. For example: /filter info,warning,error will filter all notifications except success." "Type /filter <filter> to filter notifications. Filter can be: success, info, warning, error. For example: /filter info,warning,error will filter all notifications except success.\n\n" +
"Type /filter to get your current filter."
SendNotification(chatID, replyMessage) SendNotification(chatID, replyMessage)
@ -118,6 +119,7 @@ func IncomingMessagesHandler() {
database.DB.Create(&structs.VerifiedUser{ database.DB.Create(&structs.VerifiedUser{
UserId: tempVerify.UserId, UserId: tempVerify.UserId,
ChatId: update.Message.From.ID, ChatId: update.Message.From.ID,
Filter: utils.NotificationTypeError,
CreatedAt: time.Now(), CreatedAt: time.Now(),
}) })