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)),