From abaac8eb93c3a21c46fd07b6d32d6c267cff02c0 Mon Sep 17 00:00:00 2001 From: Jorge Fernando dos Santos Date: Mon, 9 Nov 2026 13:12:27 -0300 Subject: [PATCH] fix(build): import waWa6 for ClientPayload_UserAgent_AppVersion maintained-develop (after PR #1) did not compile: whatsmeow.go referenced an undefined waProto package. The AppVersion type lives in go.mau.fi/whatsmeow/proto/waWa6. Also gofmt the file. Co-Authored-By: Claude Opus 5.5 --- pkg/whatsmeow/service/whatsmeow.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/whatsmeow/service/whatsmeow.go b/pkg/whatsmeow/service/whatsmeow.go index e09d82f..a7bf22c 100644 --- a/pkg/whatsmeow/service/whatsmeow.go +++ b/pkg/whatsmeow/service/whatsmeow.go @@ -1,13 +1,13 @@ package whatsmeow_service import ( - "github.com/evolution-foundation/evolution-go/pkg/safemap" "bytes" "context" "database/sql" "encoding/base64" "encoding/json" "fmt" + "github.com/evolution-foundation/evolution-go/pkg/safemap" "image/png" "io" "math/rand" @@ -29,6 +29,7 @@ import ( "go.mau.fi/whatsmeow/appstate" "go.mau.fi/whatsmeow/proto/waCompanionReg" "go.mau.fi/whatsmeow/proto/waE2E" + "go.mau.fi/whatsmeow/proto/waWa6" "go.mau.fi/whatsmeow/store" "go.mau.fi/whatsmeow/store/sqlstore" "go.mau.fi/whatsmeow/types" @@ -82,7 +83,7 @@ type whatsmeowService struct { authDB *sql.DB messageRepository message_repository.MessageRepository labelRepository label_repository.LabelRepository -pollService poll_service.PollService // NOVO: Serviço de enquetes + pollService poll_service.PollService // NOVO: Serviço de enquetes config *config.Config killChannel *safemap.Map[chan bool] userInfoCache *cache.Cache @@ -320,7 +321,6 @@ func (w whatsmeowService) ForceUpdateJid(instanceId string, number string) error return nil } - // getSharedSQLStoreContainer returns the process-wide whatsmeow sqlstore.Container. // PostgresAuthDB reuses the pooled authDB from initPostgresAuthDB (Upgrade once). // The Users/GORM database is intentionally separate and never passed here. @@ -561,7 +561,7 @@ func (w whatsmeowService) StartClient(cd *ClientData) { waVer := store.WAVersionContainer{uint32(version.Major), uint32(version.Minor), uint32(version.Patch)} store.SetWAVersion(waVer) if store.BaseClientPayload != nil && store.BaseClientPayload.UserAgent != nil { - store.BaseClientPayload.UserAgent.AppVersion = &waProto.ClientPayload_UserAgent_AppVersion{ + store.BaseClientPayload.UserAgent.AppVersion = &waWa6.ClientPayload_UserAgent_AppVersion{ Primary: proto.Uint32(uint32(version.Major)), Secondary: proto.Uint32(uint32(version.Minor)), Tertiary: proto.Uint32(uint32(version.Patch)),