diff --git a/backend/gestion/handlers/telegram.go b/backend/gestion/handlers/telegram.go
index 5cafb3ba..e4ee01dc 100644
--- a/backend/gestion/handlers/telegram.go
+++ b/backend/gestion/handlers/telegram.go
@@ -96,25 +96,13 @@ 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)
- }
-
- // 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,
- "✅ Compte lié avec succès !\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)
+ // L'enrollment a échoué, on envoie quand même une confirmation simple
+ if services.TelegramBot != nil {
services.TelegramBot.SendMessage(chatID,
"✅ Compte lié avec succès !\n\nVous recevrez désormais vos notifications ici.")
}
}
+ // lbtelegram envoie lui-même le message d'enrollment avec le deep link vers le bot suivant
} else if services.TelegramBot != nil {
services.TelegramBot.SendMessage(chatID,
"✅ Compte lié avec succès !\n\nVous recevrez désormais vos notifications ici.")