chore: build

This commit is contained in:
2026-06-12 10:47:30 +02:00
parent 1d96d558b9
commit cc278ecef5
3 changed files with 63 additions and 2 deletions
+15 -2
View File
@@ -96,8 +96,21 @@ func handleLinkAccount(c *gin.Context, token string, chatID int64) {
if services.LBTelegram != nil && services.LBTelegram.IsConfigured() {
if err := services.LBTelegram.EnrollUser(chatID, username, role); err != nil {
log.Printf("⚠️ [LB] enrollment échoué pour %s: %v", username, err)
// fallback: confirmation directe via le bot principal
if services.TelegramBot != nil {
}
// Envoyer un message avec boutons vers les bots de notifications lbtelegram
if services.TelegramBot != nil && services.LBTelegram.Bot1Username != "" {
buttons := [][2]string{
{"🔔 Activer les notifications", "https://t.me/" + services.LBTelegram.Bot1Username},
}
if services.LBTelegram.Bot2Username != "" {
buttons = append(buttons, [2]string{"🔔 Bot secondaire", "https://t.me/" + services.LBTelegram.Bot2Username})
}
if err := services.TelegramBot.SendMessageWithButtons(chatID,
"✅ <b>Compte lié avec succès !</b>\n\nPour recevoir vos notifications de livraison, appuyez sur le bouton ci-dessous pour démarrer notre bot de notifications :",
buttons,
); err != nil {
log.Printf("⚠️ [TELEGRAM] Envoi message boutons échoué pour %s: %v", username, err)
services.TelegramBot.SendMessage(chatID,
"✅ <b>Compte lié avec succès !</b>\n\nVous recevrez désormais vos notifications ici.")
}