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 <[email protected]>
This commit is contained in:
jfengandClaude Opus 5.5 committed 2026-11-09 13:12:27 -03:00
1 parent 4998ab3d45
commit abaac8eb93
1 file changed
+3 -3
+3 -3
View File
@@ -1,13 +1,13 @@
package whatsmeow_service package whatsmeow_service
import ( import (
"github.com/evolution-foundation/evolution-go/pkg/safemap"
"bytes" "bytes"
"context" "context"
"database/sql" "database/sql"
"encoding/base64" "encoding/base64"
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/evolution-foundation/evolution-go/pkg/safemap"
"image/png" "image/png"
"io" "io"
"math/rand" "math/rand"
@@ -29,6 +29,7 @@ import (
"go.mau.fi/whatsmeow/appstate" "go.mau.fi/whatsmeow/appstate"
"go.mau.fi/whatsmeow/proto/waCompanionReg" "go.mau.fi/whatsmeow/proto/waCompanionReg"
"go.mau.fi/whatsmeow/proto/waE2E" "go.mau.fi/whatsmeow/proto/waE2E"
"go.mau.fi/whatsmeow/proto/waWa6"
"go.mau.fi/whatsmeow/store" "go.mau.fi/whatsmeow/store"
"go.mau.fi/whatsmeow/store/sqlstore" "go.mau.fi/whatsmeow/store/sqlstore"
"go.mau.fi/whatsmeow/types" "go.mau.fi/whatsmeow/types"
@@ -320,7 +321,6 @@ func (w whatsmeowService) ForceUpdateJid(instanceId string, number string) error
return nil return nil
} }
// getSharedSQLStoreContainer returns the process-wide whatsmeow sqlstore.Container. // getSharedSQLStoreContainer returns the process-wide whatsmeow sqlstore.Container.
// PostgresAuthDB reuses the pooled authDB from initPostgresAuthDB (Upgrade once). // PostgresAuthDB reuses the pooled authDB from initPostgresAuthDB (Upgrade once).
// The Users/GORM database is intentionally separate and never passed here. // 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)} waVer := store.WAVersionContainer{uint32(version.Major), uint32(version.Minor), uint32(version.Patch)}
store.SetWAVersion(waVer) store.SetWAVersion(waVer)
if store.BaseClientPayload != nil && store.BaseClientPayload.UserAgent != nil { 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)), Primary: proto.Uint32(uint32(version.Major)),
Secondary: proto.Uint32(uint32(version.Minor)), Secondary: proto.Uint32(uint32(version.Minor)),
Tertiary: proto.Uint32(uint32(version.Patch)), Tertiary: proto.Uint32(uint32(version.Patch)),