mirror of
https://github.com/napnap75/multiarch-docker-images.git
synced 2026-02-05 02:18:59 +01:00
Improve WhatsApp connection handling
This commit is contained in:
@@ -364,9 +364,11 @@ func main() {
|
|||||||
// Fonction pour tester la connexion à WhatsApp et Immich
|
// Fonction pour tester la connexion à WhatsApp et Immich
|
||||||
func testConnections(wac *WhatsAppClient, immichClient *ImmichClient, param *Parameters) error {
|
func testConnections(wac *WhatsAppClient, immichClient *ImmichClient, param *Parameters) error {
|
||||||
fmt.Println("Testing connections...")
|
fmt.Println("Testing connections...")
|
||||||
// Test WhatsApp
|
// Connecter WhatsApp si nécessaire
|
||||||
|
if !wac.Client.IsConnected() {
|
||||||
if err := wac.Client.Connect(); err != nil {
|
if err := wac.Client.Connect(); err != nil {
|
||||||
return fmt.Errorf("whatsApp connection failed: %v", err)
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
defer wac.Client.Disconnect()
|
defer wac.Client.Disconnect()
|
||||||
fmt.Println("WhatsApp connected.")
|
fmt.Println("WhatsApp connected.")
|
||||||
|
|||||||
Reference in New Issue
Block a user