diff --git a/lib/common/src/version.h b/lib/common/src/version.h index 4d43f0ef..9042235c 100644 --- a/lib/common/src/version.h +++ b/lib/common/src/version.h @@ -7,4 +7,4 @@ #pragma once -#define NCHAT_VERSION "5.2.9" +#define NCHAT_VERSION "5.2.10" diff --git a/lib/wmchat/go/ext/whatsmeow/message.go b/lib/wmchat/go/ext/whatsmeow/message.go index 5132c140..5aef10e8 100644 --- a/lib/wmchat/go/ext/whatsmeow/message.go +++ b/lib/wmchat/go/ext/whatsmeow/message.go @@ -168,10 +168,8 @@ func (cli *Client) parseMessageInfo(node *waBinary.Node) (*types.MessageInfo, er cli.Log.Warnf("Failed to parse node in %s: %v", info.ID, err) } case "meta": - info.MsgMetaInfo, err = cli.parseMsgMetaInfo(child) - if err != nil { - cli.Log.Warnf("Failed to parse node in %s: %v", info.ID, err) - } + // TODO parse non-bot metadata too + info.MsgMetaInfo, _ = cli.parseMsgMetaInfo(child) case "franking": // TODO case "trace": diff --git a/lib/wmchat/go/ext/whatsmeow/pair-code.go b/lib/wmchat/go/ext/whatsmeow/pair-code.go index ea8f0933..d1a8497b 100644 --- a/lib/wmchat/go/ext/whatsmeow/pair-code.go +++ b/lib/wmchat/go/ext/whatsmeow/pair-code.go @@ -14,6 +14,7 @@ import ( "fmt" "regexp" "strconv" + "strings" "go.mau.fi/util/random" "golang.org/x/crypto/curve25519" @@ -72,7 +73,9 @@ func generateCompanionEphemeralKey() (ephemeralKeyPair *keys.KeyPair, ephemeralK // PairPhone generates a pairing code that can be used to link to a phone without scanning a QR code. // // You must connect the client normally before calling this (which means you'll also receive a QR code -// event, but that can be ignored when doing code pairing). +// event, but that can be ignored when doing code pairing). You should also wait for `*events.QR` before +// calling this to ensure the connection is fully established. If using [Client.GetQRChannel], wait for +// the first item in the channel. Alternatively, sleeping for a second after calling Connect will probably work too. // // The exact expiry of pairing codes is unknown, but QR codes are always generated and the login websocket is closed // after the QR codes run out, which means there's a 160-second time limit. It is recommended to generate the pairing @@ -86,6 +89,11 @@ func generateCompanionEphemeralKey() (ephemeralKeyPair *keys.KeyPair, ephemeralK func (cli *Client) PairPhone(phone string, showPushNotification bool, clientType PairClientType, clientDisplayName string) (string, error) { ephemeralKeyPair, ephemeralKey, encodedLinkingCode := generateCompanionEphemeralKey() phone = notNumbers.ReplaceAllString(phone, "") + if len(phone) <= 6 { + return "", fmt.Errorf("phone number too short") + } else if strings.HasPrefix(phone, "0") { + return "", fmt.Errorf("international phone number required (must not start with 0)") + } jid := types.NewJID(phone, types.DefaultUserServer) resp, err := cli.sendIQ(infoQuery{ Namespace: "md", diff --git a/lib/wmchat/go/ext/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.pb.go b/lib/wmchat/go/ext/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.pb.go index 9e7ef79b..450bd72c 100644 --- a/lib/wmchat/go/ext/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.pb.go +++ b/lib/wmchat/go/ext/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.pb.go @@ -453,6 +453,7 @@ type DeviceProps_HistorySyncConfig struct { SupportRecentSyncChunkMessageCountTuning *bool `protobuf:"varint,10,opt,name=supportRecentSyncChunkMessageCountTuning" json:"supportRecentSyncChunkMessageCountTuning,omitempty"` SupportHostedGroupMsg *bool `protobuf:"varint,11,opt,name=supportHostedGroupMsg" json:"supportHostedGroupMsg,omitempty"` SupportFbidBotChatHistory *bool `protobuf:"varint,12,opt,name=supportFbidBotChatHistory" json:"supportFbidBotChatHistory,omitempty"` + SupportAddOnHistorySyncMigration *bool `protobuf:"varint,13,opt,name=supportAddOnHistorySyncMigration" json:"supportAddOnHistorySyncMigration,omitempty"` } func (x *DeviceProps_HistorySyncConfig) Reset() { @@ -571,6 +572,13 @@ func (x *DeviceProps_HistorySyncConfig) GetSupportFbidBotChatHistory() bool { return false } +func (x *DeviceProps_HistorySyncConfig) GetSupportAddOnHistorySyncMigration() bool { + if x != nil && x.SupportAddOnHistorySyncMigration != nil { + return *x.SupportAddOnHistorySyncMigration + } + return false +} + type DeviceProps_AppVersion struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/lib/wmchat/go/ext/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.pb.raw b/lib/wmchat/go/ext/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.pb.raw index e02c560a..e6860111 100644 Binary files a/lib/wmchat/go/ext/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.pb.raw and b/lib/wmchat/go/ext/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.pb.raw differ diff --git a/lib/wmchat/go/ext/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.proto b/lib/wmchat/go/ext/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.proto index b490e989..49382563 100644 --- a/lib/wmchat/go/ext/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.proto +++ b/lib/wmchat/go/ext/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.proto @@ -43,6 +43,7 @@ message DeviceProps { optional bool supportRecentSyncChunkMessageCountTuning = 10; optional bool supportHostedGroupMsg = 11; optional bool supportFbidBotChatHistory = 12; + optional bool supportAddOnHistorySyncMigration = 13; } message AppVersion { diff --git a/lib/wmchat/go/ext/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go b/lib/wmchat/go/ext/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go index b130ff05..2385cf9c 100644 --- a/lib/wmchat/go/ext/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +++ b/lib/wmchat/go/ext/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go @@ -98,20 +98,20 @@ func (PeerDataOperationRequestType) EnumDescriptor() ([]byte, []int) { return file_waE2E_WAWebProtobufsE2E_proto_rawDescGZIP(), []int{0} } -type SessionSource int32 +type BotSessionSource int32 const ( - SessionSource_NULL_STATE SessionSource = 1 - SessionSource_TYPEAHEAD SessionSource = 2 - SessionSource_USER_INPUT SessionSource = 3 - SessionSource_EMU_FLASH SessionSource = 4 - SessionSource_EMU_FLASH_FOLLOWUP SessionSource = 5 - SessionSource_VOICE SessionSource = 6 + BotSessionSource_NULL_STATE BotSessionSource = 1 + BotSessionSource_TYPEAHEAD BotSessionSource = 2 + BotSessionSource_USER_INPUT BotSessionSource = 3 + BotSessionSource_EMU_FLASH BotSessionSource = 4 + BotSessionSource_EMU_FLASH_FOLLOWUP BotSessionSource = 5 + BotSessionSource_VOICE BotSessionSource = 6 ) -// Enum value maps for SessionSource. +// Enum value maps for BotSessionSource. var ( - SessionSource_name = map[int32]string{ + BotSessionSource_name = map[int32]string{ 1: "NULL_STATE", 2: "TYPEAHEAD", 3: "USER_INPUT", @@ -119,7 +119,7 @@ var ( 5: "EMU_FLASH_FOLLOWUP", 6: "VOICE", } - SessionSource_value = map[string]int32{ + BotSessionSource_value = map[string]int32{ "NULL_STATE": 1, "TYPEAHEAD": 2, "USER_INPUT": 3, @@ -129,40 +129,40 @@ var ( } ) -func (x SessionSource) Enum() *SessionSource { - p := new(SessionSource) +func (x BotSessionSource) Enum() *BotSessionSource { + p := new(BotSessionSource) *p = x return p } -func (x SessionSource) String() string { +func (x BotSessionSource) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (SessionSource) Descriptor() protoreflect.EnumDescriptor { +func (BotSessionSource) Descriptor() protoreflect.EnumDescriptor { return file_waE2E_WAWebProtobufsE2E_proto_enumTypes[1].Descriptor() } -func (SessionSource) Type() protoreflect.EnumType { +func (BotSessionSource) Type() protoreflect.EnumType { return &file_waE2E_WAWebProtobufsE2E_proto_enumTypes[1] } -func (x SessionSource) Number() protoreflect.EnumNumber { +func (x BotSessionSource) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. -func (x *SessionSource) UnmarshalJSON(b []byte) error { +func (x *BotSessionSource) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = SessionSource(num) + *x = BotSessionSource(num) return nil } -// Deprecated: Use SessionSource.Descriptor instead. -func (SessionSource) EnumDescriptor() ([]byte, []int) { +// Deprecated: Use BotSessionSource.Descriptor instead. +func (BotSessionSource) EnumDescriptor() ([]byte, []int) { return file_waE2E_WAWebProtobufsE2E_proto_rawDescGZIP(), []int{1} } @@ -1541,10 +1541,13 @@ func (HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeCom type PeerDataOperationRequestResponseMessage_PeerDataOperationResult_FullHistorySyncOnDemandResponseCode int32 const ( - PeerDataOperationRequestResponseMessage_PeerDataOperationResult_REQUEST_SUCCESS PeerDataOperationRequestResponseMessage_PeerDataOperationResult_FullHistorySyncOnDemandResponseCode = 0 - PeerDataOperationRequestResponseMessage_PeerDataOperationResult_REQUEST_TIME_EXPIRED PeerDataOperationRequestResponseMessage_PeerDataOperationResult_FullHistorySyncOnDemandResponseCode = 1 - PeerDataOperationRequestResponseMessage_PeerDataOperationResult_DECLINED_SHARING_HISTORY PeerDataOperationRequestResponseMessage_PeerDataOperationResult_FullHistorySyncOnDemandResponseCode = 2 - PeerDataOperationRequestResponseMessage_PeerDataOperationResult_GENERIC_ERROR PeerDataOperationRequestResponseMessage_PeerDataOperationResult_FullHistorySyncOnDemandResponseCode = 3 + PeerDataOperationRequestResponseMessage_PeerDataOperationResult_REQUEST_SUCCESS PeerDataOperationRequestResponseMessage_PeerDataOperationResult_FullHistorySyncOnDemandResponseCode = 0 + PeerDataOperationRequestResponseMessage_PeerDataOperationResult_REQUEST_TIME_EXPIRED PeerDataOperationRequestResponseMessage_PeerDataOperationResult_FullHistorySyncOnDemandResponseCode = 1 + PeerDataOperationRequestResponseMessage_PeerDataOperationResult_DECLINED_SHARING_HISTORY PeerDataOperationRequestResponseMessage_PeerDataOperationResult_FullHistorySyncOnDemandResponseCode = 2 + PeerDataOperationRequestResponseMessage_PeerDataOperationResult_GENERIC_ERROR PeerDataOperationRequestResponseMessage_PeerDataOperationResult_FullHistorySyncOnDemandResponseCode = 3 + PeerDataOperationRequestResponseMessage_PeerDataOperationResult_ERROR_REQUEST_ON_NON_SMB_PRIMARY PeerDataOperationRequestResponseMessage_PeerDataOperationResult_FullHistorySyncOnDemandResponseCode = 4 + PeerDataOperationRequestResponseMessage_PeerDataOperationResult_ERROR_HOSTED_DEVICE_NOT_CONNECTED PeerDataOperationRequestResponseMessage_PeerDataOperationResult_FullHistorySyncOnDemandResponseCode = 5 + PeerDataOperationRequestResponseMessage_PeerDataOperationResult_ERROR_HOSTED_DEVICE_LOGIN_TIME_NOT_SET PeerDataOperationRequestResponseMessage_PeerDataOperationResult_FullHistorySyncOnDemandResponseCode = 6 ) // Enum value maps for PeerDataOperationRequestResponseMessage_PeerDataOperationResult_FullHistorySyncOnDemandResponseCode. @@ -1554,12 +1557,18 @@ var ( 1: "REQUEST_TIME_EXPIRED", 2: "DECLINED_SHARING_HISTORY", 3: "GENERIC_ERROR", + 4: "ERROR_REQUEST_ON_NON_SMB_PRIMARY", + 5: "ERROR_HOSTED_DEVICE_NOT_CONNECTED", + 6: "ERROR_HOSTED_DEVICE_LOGIN_TIME_NOT_SET", } PeerDataOperationRequestResponseMessage_PeerDataOperationResult_FullHistorySyncOnDemandResponseCode_value = map[string]int32{ - "REQUEST_SUCCESS": 0, - "REQUEST_TIME_EXPIRED": 1, - "DECLINED_SHARING_HISTORY": 2, - "GENERIC_ERROR": 3, + "REQUEST_SUCCESS": 0, + "REQUEST_TIME_EXPIRED": 1, + "DECLINED_SHARING_HISTORY": 2, + "GENERIC_ERROR": 3, + "ERROR_REQUEST_ON_NON_SMB_PRIMARY": 4, + "ERROR_HOSTED_DEVICE_NOT_CONNECTED": 5, + "ERROR_HOSTED_DEVICE_LOGIN_TIME_NOT_SET": 6, } ) @@ -8746,8 +8755,10 @@ type AlbumMessage struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Caption *string `protobuf:"bytes,1,opt,name=caption" json:"caption,omitempty"` - ContextInfo *ContextInfo `protobuf:"bytes,17,opt,name=contextInfo" json:"contextInfo,omitempty"` + Caption *string `protobuf:"bytes,1,opt,name=caption" json:"caption,omitempty"` + ExpectedImageCount *uint32 `protobuf:"varint,2,opt,name=expectedImageCount" json:"expectedImageCount,omitempty"` + ExpectedVideoCount *uint32 `protobuf:"varint,3,opt,name=expectedVideoCount" json:"expectedVideoCount,omitempty"` + ContextInfo *ContextInfo `protobuf:"bytes,17,opt,name=contextInfo" json:"contextInfo,omitempty"` } func (x *AlbumMessage) Reset() { @@ -8789,6 +8800,20 @@ func (x *AlbumMessage) GetCaption() string { return "" } +func (x *AlbumMessage) GetExpectedImageCount() uint32 { + if x != nil && x.ExpectedImageCount != nil { + return *x.ExpectedImageCount + } + return 0 +} + +func (x *AlbumMessage) GetExpectedVideoCount() uint32 { + if x != nil && x.ExpectedVideoCount != nil { + return *x.ExpectedVideoCount + } + return 0 +} + func (x *AlbumMessage) GetContextInfo() *ContextInfo { if x != nil { return x.ContextInfo @@ -12416,8 +12441,8 @@ type BotSessionMetadata struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SessionID *string `protobuf:"bytes,1,opt,name=sessionID" json:"sessionID,omitempty"` - SessionSource *SessionSource `protobuf:"varint,2,opt,name=sessionSource,enum=WAWebProtobufsE2E.SessionSource" json:"sessionSource,omitempty"` + SessionID *string `protobuf:"bytes,1,opt,name=sessionID" json:"sessionID,omitempty"` + SessionSource *BotSessionSource `protobuf:"varint,2,opt,name=sessionSource,enum=WAWebProtobufsE2E.BotSessionSource" json:"sessionSource,omitempty"` } func (x *BotSessionMetadata) Reset() { @@ -12459,11 +12484,11 @@ func (x *BotSessionMetadata) GetSessionID() string { return "" } -func (x *BotSessionMetadata) GetSessionSource() SessionSource { +func (x *BotSessionMetadata) GetSessionSource() BotSessionSource { if x != nil && x.SessionSource != nil { return *x.SessionSource } - return SessionSource_NULL_STATE + return BotSessionSource_NULL_STATE } type BotMemuMetadata struct { @@ -12523,11 +12548,12 @@ type BotMetadata struct { PluginMetadata *BotPluginMetadata `protobuf:"bytes,3,opt,name=pluginMetadata" json:"pluginMetadata,omitempty"` SuggestedPromptMetadata *BotSuggestedPromptMetadata `protobuf:"bytes,4,opt,name=suggestedPromptMetadata" json:"suggestedPromptMetadata,omitempty"` InvokerJID *string `protobuf:"bytes,5,opt,name=invokerJID" json:"invokerJID,omitempty"` - SearchMetadata *BotSessionMetadata `protobuf:"bytes,6,opt,name=searchMetadata" json:"searchMetadata,omitempty"` + SessionMetadata *BotSessionMetadata `protobuf:"bytes,6,opt,name=sessionMetadata" json:"sessionMetadata,omitempty"` MemuMetadata *BotMemuMetadata `protobuf:"bytes,7,opt,name=memuMetadata" json:"memuMetadata,omitempty"` Timezone *string `protobuf:"bytes,8,opt,name=timezone" json:"timezone,omitempty"` ReminderMetadata *BotReminderMetadata `protobuf:"bytes,9,opt,name=reminderMetadata" json:"reminderMetadata,omitempty"` ModelMetadata *BotModelMetadata `protobuf:"bytes,10,opt,name=modelMetadata" json:"modelMetadata,omitempty"` + MessageDisclaimerText *string `protobuf:"bytes,11,opt,name=messageDisclaimerText" json:"messageDisclaimerText,omitempty"` } func (x *BotMetadata) Reset() { @@ -12597,9 +12623,9 @@ func (x *BotMetadata) GetInvokerJID() string { return "" } -func (x *BotMetadata) GetSearchMetadata() *BotSessionMetadata { +func (x *BotMetadata) GetSessionMetadata() *BotSessionMetadata { if x != nil { - return x.SearchMetadata + return x.SessionMetadata } return nil } @@ -12632,6 +12658,13 @@ func (x *BotMetadata) GetModelMetadata() *BotModelMetadata { return nil } +func (x *BotMetadata) GetMessageDisclaimerText() string { + if x != nil && x.MessageDisclaimerText != nil { + return *x.MessageDisclaimerText + } + return "" +} + type DeviceListMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -17837,7 +17870,7 @@ var file_waE2E_WAWebProtobufsE2E_proto_enumTypes = make([]protoimpl.EnumInfo, 57 var file_waE2E_WAWebProtobufsE2E_proto_msgTypes = make([]protoimpl.MessageInfo, 166) var file_waE2E_WAWebProtobufsE2E_proto_goTypes = []any{ (PeerDataOperationRequestType)(0), // 0: WAWebProtobufsE2E.PeerDataOperationRequestType - (SessionSource)(0), // 1: WAWebProtobufsE2E.SessionSource + (BotSessionSource)(0), // 1: WAWebProtobufsE2E.BotSessionSource (KeepType)(0), // 2: WAWebProtobufsE2E.KeepType (PlaceholderMessage_PlaceholderType)(0), // 3: WAWebProtobufsE2E.PlaceholderMessage.PlaceholderType (BCallMessage_MediaType)(0), // 4: WAWebProtobufsE2E.BCallMessage.MediaType @@ -18324,12 +18357,12 @@ var file_waE2E_WAWebProtobufsE2E_proto_depIdxs = []int32{ 85, // 256: WAWebProtobufsE2E.DocumentMessage.contextInfo:type_name -> WAWebProtobufsE2E.ContextInfo 85, // 257: WAWebProtobufsE2E.LocationMessage.contextInfo:type_name -> WAWebProtobufsE2E.ContextInfo 85, // 258: WAWebProtobufsE2E.ContactMessage.contextInfo:type_name -> WAWebProtobufsE2E.ContextInfo - 1, // 259: WAWebProtobufsE2E.BotSessionMetadata.sessionSource:type_name -> WAWebProtobufsE2E.SessionSource + 1, // 259: WAWebProtobufsE2E.BotSessionMetadata.sessionSource:type_name -> WAWebProtobufsE2E.BotSessionSource 87, // 260: WAWebProtobufsE2E.BotMemuMetadata.faceImages:type_name -> WAWebProtobufsE2E.BotMediaMetadata 145, // 261: WAWebProtobufsE2E.BotMetadata.avatarMetadata:type_name -> WAWebProtobufsE2E.BotAvatarMetadata 86, // 262: WAWebProtobufsE2E.BotMetadata.pluginMetadata:type_name -> WAWebProtobufsE2E.BotPluginMetadata 146, // 263: WAWebProtobufsE2E.BotMetadata.suggestedPromptMetadata:type_name -> WAWebProtobufsE2E.BotSuggestedPromptMetadata - 147, // 264: WAWebProtobufsE2E.BotMetadata.searchMetadata:type_name -> WAWebProtobufsE2E.BotSessionMetadata + 147, // 264: WAWebProtobufsE2E.BotMetadata.sessionMetadata:type_name -> WAWebProtobufsE2E.BotSessionMetadata 148, // 265: WAWebProtobufsE2E.BotMetadata.memuMetadata:type_name -> WAWebProtobufsE2E.BotMemuMetadata 88, // 266: WAWebProtobufsE2E.BotMetadata.reminderMetadata:type_name -> WAWebProtobufsE2E.BotReminderMetadata 89, // 267: WAWebProtobufsE2E.BotMetadata.modelMetadata:type_name -> WAWebProtobufsE2E.BotModelMetadata diff --git a/lib/wmchat/go/ext/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.raw b/lib/wmchat/go/ext/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.raw index 401511e2..df8654ee 100644 Binary files a/lib/wmchat/go/ext/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.raw and b/lib/wmchat/go/ext/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.raw differ diff --git a/lib/wmchat/go/ext/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto b/lib/wmchat/go/ext/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto index 909d7ca1..a27966b4 100644 --- a/lib/wmchat/go/ext/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +++ b/lib/wmchat/go/ext/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto @@ -17,7 +17,7 @@ enum PeerDataOperationRequestType { FULL_HISTORY_SYNC_ON_DEMAND = 6; } -enum SessionSource { +enum BotSessionSource { NULL_STATE = 1; TYPEAHEAD = 2; USER_INPUT = 3; @@ -491,6 +491,9 @@ message PeerDataOperationRequestResponseMessage { REQUEST_TIME_EXPIRED = 1; DECLINED_SHARING_HISTORY = 2; GENERIC_ERROR = 3; + ERROR_REQUEST_ON_NON_SMB_PRIMARY = 4; + ERROR_HOSTED_DEVICE_NOT_CONNECTED = 5; + ERROR_HOSTED_DEVICE_LOGIN_TIME_NOT_SET = 6; } message WaffleNonceFetchResponse { @@ -1267,6 +1270,8 @@ message StickerPackMessage { message AlbumMessage { optional string caption = 1; + optional uint32 expectedImageCount = 2; + optional uint32 expectedVideoCount = 3; optional ContextInfo contextInfo = 17; } @@ -1718,7 +1723,7 @@ message BotSuggestedPromptMetadata { message BotSessionMetadata { optional string sessionID = 1; - optional SessionSource sessionSource = 2; + optional BotSessionSource sessionSource = 2; } message BotMemuMetadata { @@ -1731,11 +1736,12 @@ message BotMetadata { optional BotPluginMetadata pluginMetadata = 3; optional BotSuggestedPromptMetadata suggestedPromptMetadata = 4; optional string invokerJID = 5; - optional BotSessionMetadata searchMetadata = 6; + optional BotSessionMetadata sessionMetadata = 6; optional BotMemuMetadata memuMetadata = 7; optional string timezone = 8; optional BotReminderMetadata reminderMetadata = 9; optional BotModelMetadata modelMetadata = 10; + optional string messageDisclaimerText = 11; } message DeviceListMetadata { diff --git a/lib/wmchat/go/ext/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go b/lib/wmchat/go/ext/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go index debd7bdf..b27bcb56 100644 --- a/lib/wmchat/go/ext/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go +++ b/lib/wmchat/go/ext/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go @@ -451,21 +451,22 @@ type HistorySync struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SyncType *HistorySync_HistorySyncType `protobuf:"varint,1,req,name=syncType,enum=WAWebProtobufsHistorySync.HistorySync_HistorySyncType" json:"syncType,omitempty"` - Conversations []*Conversation `protobuf:"bytes,2,rep,name=conversations" json:"conversations,omitempty"` - StatusV3Messages []*waWeb.WebMessageInfo `protobuf:"bytes,3,rep,name=statusV3Messages" json:"statusV3Messages,omitempty"` - ChunkOrder *uint32 `protobuf:"varint,5,opt,name=chunkOrder" json:"chunkOrder,omitempty"` - Progress *uint32 `protobuf:"varint,6,opt,name=progress" json:"progress,omitempty"` - Pushnames []*Pushname `protobuf:"bytes,7,rep,name=pushnames" json:"pushnames,omitempty"` - GlobalSettings *GlobalSettings `protobuf:"bytes,8,opt,name=globalSettings" json:"globalSettings,omitempty"` - ThreadIDUserSecret []byte `protobuf:"bytes,9,opt,name=threadIDUserSecret" json:"threadIDUserSecret,omitempty"` - ThreadDsTimeframeOffset *uint32 `protobuf:"varint,10,opt,name=threadDsTimeframeOffset" json:"threadDsTimeframeOffset,omitempty"` - RecentStickers []*StickerMetadata `protobuf:"bytes,11,rep,name=recentStickers" json:"recentStickers,omitempty"` - PastParticipants []*PastParticipants `protobuf:"bytes,12,rep,name=pastParticipants" json:"pastParticipants,omitempty"` - CallLogRecords []*waSyncAction.CallLogRecord `protobuf:"bytes,13,rep,name=callLogRecords" json:"callLogRecords,omitempty"` - AiWaitListState *HistorySync_BotAIWaitListState `protobuf:"varint,14,opt,name=aiWaitListState,enum=WAWebProtobufsHistorySync.HistorySync_BotAIWaitListState" json:"aiWaitListState,omitempty"` - PhoneNumberToLidMappings []*PhoneNumberToLIDMapping `protobuf:"bytes,15,rep,name=phoneNumberToLidMappings" json:"phoneNumberToLidMappings,omitempty"` - CompanionMetaNonce *string `protobuf:"bytes,16,opt,name=companionMetaNonce" json:"companionMetaNonce,omitempty"` + SyncType *HistorySync_HistorySyncType `protobuf:"varint,1,req,name=syncType,enum=WAWebProtobufsHistorySync.HistorySync_HistorySyncType" json:"syncType,omitempty"` + Conversations []*Conversation `protobuf:"bytes,2,rep,name=conversations" json:"conversations,omitempty"` + StatusV3Messages []*waWeb.WebMessageInfo `protobuf:"bytes,3,rep,name=statusV3Messages" json:"statusV3Messages,omitempty"` + ChunkOrder *uint32 `protobuf:"varint,5,opt,name=chunkOrder" json:"chunkOrder,omitempty"` + Progress *uint32 `protobuf:"varint,6,opt,name=progress" json:"progress,omitempty"` + Pushnames []*Pushname `protobuf:"bytes,7,rep,name=pushnames" json:"pushnames,omitempty"` + GlobalSettings *GlobalSettings `protobuf:"bytes,8,opt,name=globalSettings" json:"globalSettings,omitempty"` + ThreadIDUserSecret []byte `protobuf:"bytes,9,opt,name=threadIDUserSecret" json:"threadIDUserSecret,omitempty"` + ThreadDsTimeframeOffset *uint32 `protobuf:"varint,10,opt,name=threadDsTimeframeOffset" json:"threadDsTimeframeOffset,omitempty"` + RecentStickers []*StickerMetadata `protobuf:"bytes,11,rep,name=recentStickers" json:"recentStickers,omitempty"` + PastParticipants []*PastParticipants `protobuf:"bytes,12,rep,name=pastParticipants" json:"pastParticipants,omitempty"` + CallLogRecords []*waSyncAction.CallLogRecord `protobuf:"bytes,13,rep,name=callLogRecords" json:"callLogRecords,omitempty"` + AiWaitListState *HistorySync_BotAIWaitListState `protobuf:"varint,14,opt,name=aiWaitListState,enum=WAWebProtobufsHistorySync.HistorySync_BotAIWaitListState" json:"aiWaitListState,omitempty"` + PhoneNumberToLidMappings []*PhoneNumberToLIDMapping `protobuf:"bytes,15,rep,name=phoneNumberToLidMappings" json:"phoneNumberToLidMappings,omitempty"` + CompanionMetaNonce *string `protobuf:"bytes,16,opt,name=companionMetaNonce" json:"companionMetaNonce,omitempty"` + ShareableChatIdentifierEncryptionKey []byte `protobuf:"bytes,17,opt,name=shareableChatIdentifierEncryptionKey" json:"shareableChatIdentifierEncryptionKey,omitempty"` } func (x *HistorySync) Reset() { @@ -605,6 +606,13 @@ func (x *HistorySync) GetCompanionMetaNonce() string { return "" } +func (x *HistorySync) GetShareableChatIdentifierEncryptionKey() []byte { + if x != nil { + return x.ShareableChatIdentifierEncryptionKey + } + return nil +} + type Conversation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/lib/wmchat/go/ext/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.raw b/lib/wmchat/go/ext/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.raw index 683f347a..5269543d 100644 Binary files a/lib/wmchat/go/ext/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.raw and b/lib/wmchat/go/ext/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.raw differ diff --git a/lib/wmchat/go/ext/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.proto b/lib/wmchat/go/ext/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.proto index bf5dbe48..b13bb7f0 100644 --- a/lib/wmchat/go/ext/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.proto +++ b/lib/wmchat/go/ext/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.proto @@ -50,6 +50,7 @@ message HistorySync { optional BotAIWaitListState aiWaitListState = 14; repeated PhoneNumberToLIDMapping phoneNumberToLidMappings = 15; optional string companionMetaNonce = 16; + optional bytes shareableChatIdentifierEncryptionKey = 17; } message Conversation { diff --git a/lib/wmchat/go/ext/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.go b/lib/wmchat/go/ext/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.go index 4020ec6a..e8df6f53 100644 --- a/lib/wmchat/go/ext/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.go +++ b/lib/wmchat/go/ext/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.go @@ -1349,8 +1349,9 @@ type ClientPayload_InteropData struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AccountID *uint64 `protobuf:"varint,1,opt,name=accountID" json:"accountID,omitempty"` - Token []byte `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` + AccountID *uint64 `protobuf:"varint,1,opt,name=accountID" json:"accountID,omitempty"` + Token []byte `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` + EnableReadReceipts *bool `protobuf:"varint,3,opt,name=enableReadReceipts" json:"enableReadReceipts,omitempty"` } func (x *ClientPayload_InteropData) Reset() { @@ -1399,6 +1400,13 @@ func (x *ClientPayload_InteropData) GetToken() []byte { return nil } +func (x *ClientPayload_InteropData) GetEnableReadReceipts() bool { + if x != nil && x.EnableReadReceipts != nil { + return *x.EnableReadReceipts + } + return false +} + type ClientPayload_DevicePairingRegistrationData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/lib/wmchat/go/ext/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.raw b/lib/wmchat/go/ext/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.raw index 322a7d4f..c0797a59 100644 Binary files a/lib/wmchat/go/ext/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.raw and b/lib/wmchat/go/ext/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.raw differ diff --git a/lib/wmchat/go/ext/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto b/lib/wmchat/go/ext/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto index 568c3cf8..4404f5d7 100644 --- a/lib/wmchat/go/ext/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto +++ b/lib/wmchat/go/ext/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto @@ -170,6 +170,7 @@ message ClientPayload { message InteropData { optional uint64 accountID = 1; optional bytes token = 2; + optional bool enableReadReceipts = 3; } message DevicePairingRegistrationData { diff --git a/lib/wmchat/go/ext/whatsmeow/store/clientpayload.go b/lib/wmchat/go/ext/whatsmeow/store/clientpayload.go index 8902b52b..7a2354c1 100644 --- a/lib/wmchat/go/ext/whatsmeow/store/clientpayload.go +++ b/lib/wmchat/go/ext/whatsmeow/store/clientpayload.go @@ -74,7 +74,7 @@ func (vc WAVersionContainer) ProtoAppVersion() *waProto.ClientPayload_UserAgent_ } // waVersion is the WhatsApp web client version -var waVersion = WAVersionContainer{2, 3000, 1015853550} +var waVersion = WAVersionContainer{2, 3000, 1016249039} // waVersionHash is the md5 hash of a dot-separated waVersion var waVersionHash [16]byte diff --git a/lib/wmchat/go/gowm.go b/lib/wmchat/go/gowm.go index 6bf494b9..dbd64bec 100644 --- a/lib/wmchat/go/gowm.go +++ b/lib/wmchat/go/gowm.go @@ -44,7 +44,7 @@ import ( waLog "go.mau.fi/whatsmeow/util/log" ) -var whatsmeowDate int = 20240821 +var whatsmeowDate int = 20240906 type JSONMessage []json.RawMessage type JSONMessageType string diff --git a/src/nchat.1 b/src/nchat.1 index 0d12a749..7b1f19e6 100644 --- a/src/nchat.1 +++ b/src/nchat.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man. -.TH NCHAT "1" "September 2024" "nchat 5.2.9" "User Commands" +.TH NCHAT "1" "September 2024" "nchat 5.2.10" "User Commands" .SH NAME nchat \- ncurses chat .SH SYNOPSIS