GOWA - WhatsApp REST API with support for UI, Multi Account, Webhooks, and MCP, and Chatwoot. Built with Golang for efficient memory use.
Go botgogolanggolang-whatsappgolang-whatsapp-apirestrest-apiwhatsappwhatsapp-apiwhatsapp-api-gowhatsapp-multi-devicewhatsapp-web-multi-device
fix: auto-reply not working for LID-based WhatsApp accounts (#634)
Aldino Kemal40b08759c6ba
diff --git a/src/infrastructure/whatsapp/auto_reply.go b/src/infrastructure/whatsapp/auto_reply.goindex 9f8da08e..438f2507 100644--- a/src/infrastructure/whatsapp/auto_reply.go+++ b/src/infrastructure/whatsapp/auto_reply.go@@ -20,16 +20,20 @@ func handleAutoReply(ctx context.Context, evt *events.Message, chatStorageRepo d}if client == nil {+ log.Debugf("Auto-reply: skipping, client is nil")return}// Skip groups, broadcasts, and self messagesif utils.IsGroupJID(evt.Info.Chat.String()) || evt.Info.IsIncomingBroadcast() || evt.Info.IsFromMe {+ log.Debugf("Auto-reply: skipping message %s (group=%v, broadcast=%v, fromMe=%v)",+ evt.Info.ID, utils.IsGroupJID(evt.Info.Chat.String()), evt.Info.IsIncomingBroadcast(), evt.Info.IsFromMe)return}- // Only reply to direct 1:1 chats (e.g., *@s.whatsapp.net)- if evt.Info.Chat.Server != types.DefaultUserServer {+ // Only reply to direct 1:1 chats (e.g., *@s.whatsapp.net or *@lid)+ if evt.Info.Chat.Server != types.DefaultUserServer && evt.Info.Chat.Server != types.HiddenUserServer {+ log.Debugf("Auto-reply: skipping message %s, unsupported chat server: %s", evt.Info.ID, evt.Info.Chat.Server)return}@@ -38,6 +42,7 @@ func handleAutoReply(ctx context.Context, evt *events.Message, chatStorageRepo dif strings.Contains(source, "broadcast") ||strings.HasSuffix(evt.Info.Chat.String(), "@broadcast") ||strings.HasPrefix(evt.Info.Chat.String(), "status@") {+ log.Debugf("Auto-reply: skipping message %s, broadcast/status context: %s", evt.Info.ID, source)return}@@ -61,6 +66,7 @@ func handleAutoReply(ctx context.Context, evt *events.Message, chatStorageRepo d}}if !hasText {+ log.Debugf("Auto-reply: skipping message %s, no text content detected", evt.Info.ID)return}