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
refactor: optimize contacts array message extraction by reducing proto getter calls
OpenClawb1cbfc1c6a6a
diff --git a/src/gowa b/src/gowanew file mode 100755index 00000000..05c7f8e5Binary files /dev/null and b/src/gowa differdiff --git a/src/pkg/utils/whatsapp.go b/src/pkg/utils/whatsapp.goindex 5752574a..be3cb213 100644--- a/src/pkg/utils/whatsapp.go+++ b/src/pkg/utils/whatsapp.go@@ -219,7 +219,8 @@ func ExtractMessageTextFromEvent(evt *events.Message) string {messageText = "👤 " + messageText}} else if contactsArrayMessage := evt.Message.GetContactsArrayMessage(); contactsArrayMessage != nil {- count := len(contactsArrayMessage.GetContacts())+ contacts := contactsArrayMessage.GetContacts()+ count := len(contacts)displayName := contactsArrayMessage.GetDisplayName()if displayName != "" {messageText = fmt.Sprintf("👥 %s (%d contacts)", displayName, count)