chore: build
Backend - Build & Lint / build (push) Failing after 1m22s

This commit is contained in:
2026-06-20 15:20:21 +02:00
parent 0cfd6f392e
commit acda6f72fb
+12 -2
View File
@@ -38,7 +38,12 @@ func (d *Database) NotifyClient(username string, commandID int, notifType, messa
if services.TelegramBot != nil && services.TelegramBot.IsNotificationsEnabled() {
if chatID, ok, err := d.GetClientTelegramChatID(username); err == nil && ok {
go sendTelegramNotif(chatID, fmt.Sprintf("🔔 <b>Notification</b>\n\n%s", message))
dedupKey := fmt.Sprintf("notif:dedup:%d:%s", commandID, notifType)
if set, _ := Redis.SetNX(RedisCtx, dedupKey, "1", 5*time.Minute).Result(); set {
go sendTelegramNotif(chatID, fmt.Sprintf("🔔 <b>Notification</b>\n\n%s", message))
} else {
log.Printf("⚠️ [NOTIF] Doublon détecté (cmd=%d, type=%s) — Telegram ignoré", commandID, notifType)
}
}
}
@@ -64,7 +69,12 @@ func (d *Database) NotifyLivreur(username string, commandID int, notifType, mess
if services.TelegramBot != nil && services.TelegramBot.IsNotificationsEnabled() {
if chatID, ok, err := d.GetUserTelegramChatID(username); err == nil && ok {
go sendTelegramNotif(chatID, fmt.Sprintf("🔔 <b>Notification</b>\n\n%s", message))
dedupKey := fmt.Sprintf("notif:dedup:livreur:%d:%s", commandID, notifType)
if set, _ := Redis.SetNX(RedisCtx, dedupKey, "1", 5*time.Minute).Result(); set {
go sendTelegramNotif(chatID, fmt.Sprintf("🔔 <b>Notification</b>\n\n%s", message))
} else {
log.Printf("⚠️ [NOTIF] Doublon livreur détecté (cmd=%d, type=%s) — Telegram ignoré", commandID, notifType)
}
}
}