Skip to content

Commit

Permalink
update proto
Browse files Browse the repository at this point in the history
  • Loading branch information
krypton-byte committed Jan 10, 2025
1 parent 293e808 commit 901ff04
Show file tree
Hide file tree
Showing 8 changed files with 867 additions and 859 deletions.
1,545 changes: 713 additions & 832 deletions goneonize/defproto/Neonize.pb.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,5 @@ message EncryptedPairingRequest {

message ClientPairingProps {
optional bool isChatDbLidMigrated = 1;
optional bool isSyncdPureLidSession = 2;
}
119 changes: 116 additions & 3 deletions goneonize/defproto/waE2E/WAWebProtobufsE2E.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import "waCompanionReg/WAWebProtobufsCompanionReg.proto";
import "waMmsRetry/WAMmsRetry.proto";
import "waCommon/WACommon.proto";

enum PollMediaType {
enum PollContentType {
UNKNOWN_POLL_CONTENT_TYPE = 0;
TEXT = 1;
IMAGE = 2;
}
Expand Down Expand Up @@ -52,7 +53,7 @@ enum BotSessionSource {
}

enum KeepType {
UNKNOWN = 0;
UNKNOWN_KEEP_TYPE = 0;
KEEP_FOR_ALL = 1;
UNDO_KEEP_FOR_ALL = 2;
}
Expand Down Expand Up @@ -211,7 +212,7 @@ message PollCreationMessage {
repeated Option options = 3;
optional uint32 selectableOptionsCount = 4;
optional ContextInfo contextInfo = 5;
optional PollMediaType pollMediaType = 6;
optional PollContentType pollContentType = 6;
optional PollType pollType = 7;
optional Option correctAnswer = 8;
}
Expand Down Expand Up @@ -402,6 +403,7 @@ message InteractiveMessage {
optional Body body = 2;
optional Footer footer = 3;
optional ContextInfo contextInfo = 15;
optional UrlTrackingMap urlTrackingMap = 16;
}

message ListResponseMessage {
Expand Down Expand Up @@ -1062,6 +1064,7 @@ message ContextInfo {
optional bytes ctwaPayload = 55;
optional ForwardedAIBotMessageInfo forwardedAiBotMessageInfo = 56;
optional StatusAttributionType statusAttributionType = 57;
optional UrlTrackingMap urlTrackingMap = 58;
}

message BotPluginMetadata {
Expand Down Expand Up @@ -1092,6 +1095,101 @@ message BotPluginMetadata {
optional string faviconCDNURL = 13;
}

message AIRichResponseMessage {
enum AIRichResponseSubMessageType {
AI_RICH_RESPONSE_UNKNOWN = 0;
AI_RICH_RESPONSE_GRID_IMAGE = 1;
AI_RICH_RESPONSE_TEXT = 2;
AI_RICH_RESPONSE_INLINE_IMAGE = 3;
AI_RICH_RESPONSE_TABLE = 4;
AI_RICH_RESPONSE_CODE = 5;
AI_RICH_RESPONSE_DYNAMIC = 6;
}

enum AIRichResponseMessageType {
AI_RICH_RESPONSE_TYPE_UNKNOWN = 0;
AI_RICH_RESPONSE_TYPE_STANDARD = 1;
AI_RICH_RESPONSE_TYPE_ARTIFACTS = 2;
}

message AIRichResponseDynamicMetadata {
enum AIRichResponseDynamicMetadataType {
AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN = 0;
AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE = 1;
AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF = 2;
}

optional AIRichResponseDynamicMetadataType type = 1;
optional uint64 version = 2;
optional string URL = 3;
optional uint32 loopCount = 4;
}

message AIRichResponseCodeMetadata {
enum AIRichResponseCodeHighlightType {
AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT = 0;
AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD = 1;
AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD = 2;
AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING = 3;
AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER = 4;
AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT = 5;
}

message AIRichResponseCodeBlock {
optional AIRichResponseCodeHighlightType highlightType = 1;
optional string codeContent = 2;
}

optional string codeLanguage = 1;
repeated AIRichResponseCodeBlock codeBlocks = 2;
}

message AIRichResponseInlineImageMetadata {
enum AIRichResponseImageAlignment {
AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED = 0;
AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED = 1;
AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED = 2;
}

optional AIRichResponseImageURL imageURL = 1;
optional string imageText = 2;
optional AIRichResponseImageAlignment alignment = 3;
optional string tapLinkURL = 4;
}

message AIRichResponseSubMessage {
optional AIRichResponseSubMessageType messageType = 1;
optional AIRichResponseGridImageMetadata gridImageMetadata = 2;
optional string messageText = 3;
optional AIRichResponseInlineImageMetadata imageMetadata = 4;
optional AIRichResponseCodeMetadata codeMetadata = 5;
optional AIRichResponseTableMetadata tableMetadata = 6;
optional AIRichResponseDynamicMetadata dynamicMetadata = 7;
}

message AIRichResponseTableMetadata {
message AIRichResponseTableRow {
repeated string items = 1;
optional bool isHeading = 2;
}

repeated AIRichResponseTableRow rows = 1;
}

message AIRichResponseGridImageMetadata {
optional AIRichResponseImageURL gridImageURL = 1;
repeated AIRichResponseImageURL imageURLs = 2;
}

message AIRichResponseImageURL {
optional string imagePreviewURL = 1;
optional string imageHighResURL = 2;
}

optional AIRichResponseMessageType messageType = 1;
repeated AIRichResponseSubMessage submessages = 2;
}

message BotMediaMetadata {
enum OrientationType {
CENTER = 1;
Expand Down Expand Up @@ -1157,6 +1255,8 @@ message BotCapabilityMetadata {
RICH_RESPONSE_THREAD_SURFING = 5;
RICH_RESPONSE_TABLE = 6;
RICH_RESPONSE_CODE = 7;
RICH_RESPONSE_STRUCTURED_RESPONSE = 8;
RICH_RESPONSE_INLINE_IMAGE = 9;
WA_IG_1P_PLUGIN_RANKING_CONTROL = 10;
WA_IG_1P_PLUGIN_RANKING_UPDATE_1 = 11;
WA_IG_1P_PLUGIN_RANKING_UPDATE_2 = 12;
Expand Down Expand Up @@ -1403,6 +1503,8 @@ message Message {
optional FutureProofMessage pollCreationMessageV4 = 93;
optional FutureProofMessage pollCreationMessageV5 = 94;
optional FutureProofMessage statusAddYours = 95;
optional FutureProofMessage groupStatusMessage = 96;
optional AIRichResponseMessage richResponseMessage = 97;
}

message AlbumMessage {
Expand Down Expand Up @@ -2052,3 +2154,14 @@ message MediaNotifyMessage {
message LIDMigrationMappingSyncMessage {
optional bytes encodedMappingPayload = 1;
}

message UrlTrackingMap {
message UrlTrackingMapElement {
optional string originalURL = 1;
optional string unconsentedUsersURL = 2;
optional string consentedUsersURL = 3;
optional uint32 cardIndex = 4;
}

repeated UrlTrackingMapElement urlTrackingMapElements = 1;
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ message Conversation {
optional bool locked = 46;
optional PrivacySystemMessage systemMessageToInsert = 47;
optional bool capiCreatedGroup = 48;
optional string accountLid = 49;
}

message GroupParticipant {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
syntax = "proto2";
package WAWebProtobufLidMigrationSyncPayload;
option go_package = "go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload";

message LIDMigrationMapping {
required uint64 pn = 1;
required uint64 assignedLid = 2;
optional uint64 latestLid = 3;
}

message LIDMigrationMappingSyncPayload {
repeated LIDMigrationMapping pnToLidMappings = 1;
}
16 changes: 7 additions & 9 deletions goneonize/go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
module github.com/krypton-byte/neonize

go 1.22.0

toolchain go1.22.1
go 1.23.4

require (
github.com/mattn/go-sqlite3 v1.14.24
go.mau.fi/whatsmeow v0.0.0-20241121132808-ae900cb6bee4
google.golang.org/protobuf v1.35.2
go.mau.fi/whatsmeow v0.0.0-20250104105216-918c879fcd19
google.golang.org/protobuf v1.36.2
)

require (
Expand All @@ -18,8 +16,8 @@ require (
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/rs/zerolog v1.33.0 // indirect
go.mau.fi/libsignal v0.1.1 // indirect
go.mau.fi/util v0.8.2 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/net v0.31.0 // indirect
golang.org/x/sys v0.27.0 // indirect
go.mau.fi/util v0.8.3 // indirect
golang.org/x/crypto v0.32.0 // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/sys v0.29.0 // indirect
)
28 changes: 14 additions & 14 deletions goneonize/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,26 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8=
github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
go.mau.fi/libsignal v0.1.1 h1:m/0PGBh4QKP/I1MQ44ti4C0fMbLMuHb95cmDw01FIpI=
go.mau.fi/libsignal v0.1.1/go.mod h1:QLs89F/OA3ThdSL2Wz2p+o+fi8uuQUz0e1BRa6ExdBw=
go.mau.fi/util v0.8.2 h1:zWbVHwdRKwI6U9AusmZ8bwgcLosikwbb4GGqLrNr1YE=
go.mau.fi/util v0.8.2/go.mod h1:BHHC9R2WLMJd1bwTZfTcFxUgRFmUgUmiWcT4RbzUgiA=
go.mau.fi/whatsmeow v0.0.0-20241121132808-ae900cb6bee4 h1:fb3X+Us6dDmXWZJt7H9o9P+pSiEq9Fut1jLqurVPpVc=
go.mau.fi/whatsmeow v0.0.0-20241121132808-ae900cb6bee4/go.mod h1:iB+F/NVNOnyumU2p/TKTSSdBhH05GHFG36diYuFp9VQ=
golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ=
golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg=
golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo=
golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM=
go.mau.fi/util v0.8.3 h1:sulhXtfquMrQjsOP67x9CzWVBYUwhYeoo8hNQIpCWZ4=
go.mau.fi/util v0.8.3/go.mod h1:c00Db8xog70JeIsEvhdHooylTkTkakgnAOsZ04hplQY=
go.mau.fi/whatsmeow v0.0.0-20250104105216-918c879fcd19 h1:uVS+Zct5fF8rSXV9lfs87zoXdge0JXTzVGNkjmZ61UU=
go.mau.fi/whatsmeow v0.0.0-20250104105216-918c879fcd19/go.mod h1:TLzm2XkwgufONEmiVAsFny+9uBqyEZnUoPrQAfMyuSU=
golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io=
google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
google.golang.org/protobuf v1.36.2 h1:R8FeyR1/eLmkutZOM5CWghmo5itiG9z0ktFlTVLuTmU=
google.golang.org/protobuf v1.36.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
3 changes: 2 additions & 1 deletion goneonize/utils/decoder.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package utils

import (
"C"
"time"

"github.com/krypton-byte/neonize/defproto"
defproto "github.com/krypton-byte/neonize/defproto"
"go.mau.fi/whatsmeow"
"go.mau.fi/whatsmeow/appstate"
waVname "go.mau.fi/whatsmeow/proto/waVnameCert"
Expand Down

0 comments on commit 901ff04

Please sign in to comment.