@hiroosy/baileys-lite 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/WAProto/index.js +231 -113252
- package/WAProto/parts/ADVDeviceIdentity.part +201 -0
- package/WAProto/parts/ADVEncryptionType.part +6 -0
- package/WAProto/parts/ADVKeyIndexList.part +201 -0
- package/WAProto/parts/ADVSignedDeviceIdentity.part +150 -0
- package/WAProto/parts/ADVSignedDeviceIdentityHMAC.part +142 -0
- package/WAProto/parts/ADVSignedKeyIndexList.part +128 -0
- package/WAProto/parts/AIHomeState.part +405 -0
- package/WAProto/parts/AIMediaCollectionMessage.part +119 -0
- package/WAProto/parts/AIMediaCollectionMetadata.part +100 -0
- package/WAProto/parts/AIMetadataOperation.part +83 -0
- package/WAProto/parts/AIQueryFanout.part +133 -0
- package/WAProto/parts/AIRegenerateMetadata.part +112 -0
- package/WAProto/parts/AIRichResponseCodeMetadata.part +252 -0
- package/WAProto/parts/AIRichResponseContentItemsMetadata.part +354 -0
- package/WAProto/parts/AIRichResponseDynamicMetadata.part +172 -0
- package/WAProto/parts/AIRichResponseGridImageMetadata.part +114 -0
- package/WAProto/parts/AIRichResponseImageURL.part +119 -0
- package/WAProto/parts/AIRichResponseInlineImageMetadata.part +164 -0
- package/WAProto/parts/AIRichResponseLatexMetadata.part +346 -0
- package/WAProto/parts/AIRichResponseMapMetadata.part +346 -0
- package/WAProto/parts/AIRichResponseMessage.part +167 -0
- package/WAProto/parts/AIRichResponseMessageType.part +5 -0
- package/WAProto/parts/AIRichResponseSubMessage.part +313 -0
- package/WAProto/parts/AIRichResponseSubMessageType.part +13 -0
- package/WAProto/parts/AIRichResponseTableMetadata.part +223 -0
- package/WAProto/parts/AIRichResponseUnifiedResponse.part +84 -0
- package/WAProto/parts/AISubscriptionRequestType.part +7 -0
- package/WAProto/parts/AISubscriptionUpsellMetadata.part +102 -0
- package/WAProto/parts/AIThreadInfo.part +316 -0
- package/WAProto/parts/Account.part +138 -0
- package/WAProto/parts/ActionLink.part +100 -0
- package/WAProto/parts/AutoDownloadSettings.part +138 -0
- package/WAProto/parts/AvatarUserSettings.part +100 -0
- package/WAProto/parts/BizAccountLinkInfo.part +210 -0
- package/WAProto/parts/BizAccountPayload.part +105 -0
- package/WAProto/parts/BizIdentityInfo.part +298 -0
- package/WAProto/parts/BotAgeCollectionMetadata.part +138 -0
- package/WAProto/parts/BotAgentDeepLinkMetadata.part +81 -0
- package/WAProto/parts/BotAgentMetadata.part +83 -0
- package/WAProto/parts/BotCapabilityMetadata.part +437 -0
- package/WAProto/parts/BotCommandMetadata.part +119 -0
- package/WAProto/parts/BotDocumentMessageMetadata.part +100 -0
- package/WAProto/parts/BotFeedbackMessage.part +1366 -0
- package/WAProto/parts/BotGroupMetadata.part +92 -0
- package/WAProto/parts/BotGroupParticipantMetadata.part +81 -0
- package/WAProto/parts/BotImagineMetadata.part +134 -0
- package/WAProto/parts/BotInfrastructureDiagnostics.part +148 -0
- package/WAProto/parts/BotLinkedAccount.part +95 -0
- package/WAProto/parts/BotLinkedAccountsMetadata.part +134 -0
- package/WAProto/parts/BotMediaMetadata.part +229 -0
- package/WAProto/parts/BotMemoryFact.part +100 -0
- package/WAProto/parts/BotMemoryMetadata.part +141 -0
- package/WAProto/parts/BotMemuMetadata.part +92 -0
- package/WAProto/parts/BotMessageOrigin.part +95 -0
- package/WAProto/parts/BotMessageOriginMetadata.part +92 -0
- package/WAProto/parts/BotMessageSharingInfo.part +297 -0
- package/WAProto/parts/BotMetadata.part +934 -0
- package/WAProto/parts/BotMetricsEntryPoint.part +51 -0
- package/WAProto/parts/BotMetricsMetadata.part +341 -0
- package/WAProto/parts/BotMetricsThreadEntryPoint.part +8 -0
- package/WAProto/parts/BotModeSelectionMetadata.part +151 -0
- package/WAProto/parts/BotModelMetadata.part +167 -0
- package/WAProto/parts/BotPluginMetadata.part +379 -0
- package/WAProto/parts/BotProgressIndicatorMetadata.part +837 -0
- package/WAProto/parts/BotPromotionMessageMetadata.part +124 -0
- package/WAProto/parts/BotPromptSuggestion.part +100 -0
- package/WAProto/parts/BotPromptSuggestions.part +92 -0
- package/WAProto/parts/BotPttPromptMetadata.part +81 -0
- package/WAProto/parts/BotQuotaMetadata.part +241 -0
- package/WAProto/parts/BotReminderMetadata.part +232 -0
- package/WAProto/parts/BotRenderingConfigMetadata.part +100 -0
- package/WAProto/parts/BotRenderingMetadata.part +203 -0
- package/WAProto/parts/BotResolvedToolCallMetadata.part +100 -0
- package/WAProto/parts/BotSessionMetadata.part +137 -0
- package/WAProto/parts/BotSessionSource.part +11 -0
- package/WAProto/parts/BotSignatureVerificationMetadata.part +92 -0
- package/WAProto/parts/BotSignatureVerificationUseCaseProof.part +183 -0
- package/WAProto/parts/BotSourcesMetadata.part +322 -0
- package/WAProto/parts/BotSuggestedPromptMetadata.part +150 -0
- package/WAProto/parts/BotUnifiedResponseMutation.part +339 -0
- package/WAProto/parts/CallLogRecord.part +646 -0
- package/WAProto/parts/CertChain.part +392 -0
- package/WAProto/parts/ChatLockSettings.part +102 -0
- package/WAProto/parts/ChatRowOpaqueData.part +712 -0
- package/WAProto/parts/Citation.part +119 -0
- package/WAProto/parts/ClientPairingProps.part +160 -0
- package/WAProto/parts/ClientPayload.part +2892 -0
- package/WAProto/parts/CollectionName.part +9 -0
- package/WAProto/parts/CommentMetadata.part +102 -0
- package/WAProto/parts/CompanionCommitment.part +84 -0
- package/WAProto/parts/CompanionEphemeralIdentity.part +227 -0
- package/WAProto/parts/Config.part +136 -0
- package/WAProto/parts/ContextInfo.part +4137 -0
- package/WAProto/parts/Conversation.part +1472 -0
- package/WAProto/parts/DeviceCapabilities.part +670 -0
- package/WAProto/parts/DeviceConsistencyCodeMessage.part +103 -0
- package/WAProto/parts/DeviceListMetadata.part +306 -0
- package/WAProto/parts/DeviceProps.part +982 -0
- package/WAProto/parts/DisappearingMode.part +206 -0
- package/WAProto/parts/EmbeddedContent.part +100 -0
- package/WAProto/parts/EmbeddedMessage.part +102 -0
- package/WAProto/parts/EmbeddedMusic.part +370 -0
- package/WAProto/parts/EncryptedPairingRequest.part +106 -0
- package/WAProto/parts/EphemeralSetting.part +110 -0
- package/WAProto/parts/EventAdditionalMetadata.part +81 -0
- package/WAProto/parts/EventResponse.part +152 -0
- package/WAProto/parts/ExitCode.part +110 -0
- package/WAProto/parts/ExternalBlobReference.part +195 -0
- package/WAProto/parts/Field.part +193 -0
- package/WAProto/parts/ForwardedAIBotMessageInfo.part +119 -0
- package/WAProto/parts/GlobalSettings.part +497 -0
- package/WAProto/parts/GroupHistoryBundleInfo.part +141 -0
- package/WAProto/parts/GroupHistoryIndividualMessageInfo.part +102 -0
- package/WAProto/parts/GroupMention.part +100 -0
- package/WAProto/parts/GroupParticipant.part +142 -0
- package/WAProto/parts/GroupRootKeyShare.part +92 -0
- package/WAProto/parts/GroupRootKeyShareEntry.part +161 -0
- package/WAProto/parts/HandshakeMessage.part +815 -0
- package/WAProto/parts/HatchMetadataSync.part +132 -0
- package/WAProto/parts/HistorySync.part +605 -0
- package/WAProto/parts/HistorySyncMsg.part +112 -0
- package/WAProto/parts/HydratedTemplateButton.part +501 -0
- package/WAProto/parts/IdentityKeyPairStructure.part +106 -0
- package/WAProto/parts/InThreadSurveyMetadata.part +779 -0
- package/WAProto/parts/InlineContact.part +157 -0
- package/WAProto/parts/InteractiveAnnotation.part +246 -0
- package/WAProto/parts/InteractiveMessageAdditionalMetadata.part +81 -0
- package/WAProto/parts/KeepInChat.part +225 -0
- package/WAProto/parts/KeepType.part +6 -0
- package/WAProto/parts/KeyExchangeMessage.part +169 -0
- package/WAProto/parts/KeyId.part +84 -0
- package/WAProto/parts/LIDMigrationMapping.part +149 -0
- package/WAProto/parts/LIDMigrationMappingSyncMessage.part +84 -0
- package/WAProto/parts/LIDMigrationMappingSyncPayload.part +122 -0
- package/WAProto/parts/LegacyMessage.part +104 -0
- package/WAProto/parts/LimitSharing.part +177 -0
- package/WAProto/parts/LocalizedName.part +119 -0
- package/WAProto/parts/Location.part +119 -0
- package/WAProto/parts/MediaData.part +81 -0
- package/WAProto/parts/MediaDomainInfo.part +120 -0
- package/WAProto/parts/MediaKeyDomain.part +6 -0
- package/WAProto/parts/MediaNotifyMessage.part +132 -0
- package/WAProto/parts/MediaRetryNotification.part +170 -0
- package/WAProto/parts/MediaVisibility.part +6 -0
- package/WAProto/parts/MemberLabel.part +110 -0
- package/WAProto/parts/Message.part +32376 -0
- package/WAProto/parts/MessageAddOn.part +305 -0
- package/WAProto/parts/MessageAddOnContextInfo.part +113 -0
- package/WAProto/parts/MessageAssociation.part +235 -0
- package/WAProto/parts/MessageContextInfo.part +451 -0
- package/WAProto/parts/MessageKey.part +138 -0
- package/WAProto/parts/MessageSecretMessage.part +125 -0
- package/WAProto/parts/Money.part +129 -0
- package/WAProto/parts/MsgOpaqueData.part +1732 -0
- package/WAProto/parts/MsgRowOpaqueData.part +104 -0
- package/WAProto/parts/MutationProps.part +89 -0
- package/WAProto/parts/NoiseCertificate.part +277 -0
- package/WAProto/parts/NotificationMessageInfo.part +152 -0
- package/WAProto/parts/NotificationSettings.part +176 -0
- package/WAProto/parts/PairingRequest.part +128 -0
- package/WAProto/parts/PastParticipant.part +148 -0
- package/WAProto/parts/PastParticipants.part +112 -0
- package/WAProto/parts/PatchDebugData.part +358 -0
- package/WAProto/parts/PaymentBackground.part +460 -0
- package/WAProto/parts/PaymentInfo.part +602 -0
- package/WAProto/parts/PhoneNumberToLIDMapping.part +100 -0
- package/WAProto/parts/PhotoChange.part +125 -0
- package/WAProto/parts/PinInChat.part +205 -0
- package/WAProto/parts/Point.part +138 -0
- package/WAProto/parts/PollAdditionalMetadata.part +216 -0
- package/WAProto/parts/PollEncValue.part +106 -0
- package/WAProto/parts/PollUpdate.part +202 -0
- package/WAProto/parts/PreKeyRecordStructure.part +125 -0
- package/WAProto/parts/PreKeySignalMessage.part +185 -0
- package/WAProto/parts/PremiumMessageInfo.part +81 -0
- package/WAProto/parts/PrimaryEphemeralIdentity.part +106 -0
- package/WAProto/parts/PrivacySystemMessage.part +6 -0
- package/WAProto/parts/ProcessedVideo.part +266 -0
- package/WAProto/parts/ProloguePayload.part +105 -0
- package/WAProto/parts/Pushname.part +100 -0
- package/WAProto/parts/QuarantinedMessage.part +103 -0
- package/WAProto/parts/Reaction.part +169 -0
- package/WAProto/parts/RecentEmojiWeight.part +100 -0
- package/WAProto/parts/RecordStructure.part +114 -0
- package/WAProto/parts/Reportable.part +138 -0
- package/WAProto/parts/ReportingTokenInfo.part +84 -0
- package/WAProto/parts/ScheduledMessageMetadata.part +132 -0
- package/WAProto/parts/SenderKeyDistributionMessage.part +144 -0
- package/WAProto/parts/SenderKeyMessage.part +122 -0
- package/WAProto/parts/SenderKeyRecordStructure.part +92 -0
- package/WAProto/parts/SenderKeyStateStructure.part +469 -0
- package/WAProto/parts/ServerErrorReceipt.part +81 -0
- package/WAProto/parts/SessionStructure.part +1087 -0
- package/WAProto/parts/SessionTransparencyMetadata.part +132 -0
- package/WAProto/parts/SessionTransparencyType.part +5 -0
- package/WAProto/parts/SignalMessage.part +144 -0
- package/WAProto/parts/SignedPreKeyRecordStructure.part +176 -0
- package/WAProto/parts/StatusAttribution.part +1235 -0
- package/WAProto/parts/StatusMentionMessage.part +83 -0
- package/WAProto/parts/StatusPSA.part +121 -0
- package/WAProto/parts/StickerMetadata.part +357 -0
- package/WAProto/parts/SyncActionData.part +146 -0
- package/WAProto/parts/SyncActionValue.part +12959 -0
- package/WAProto/parts/SyncdIndex.part +84 -0
- package/WAProto/parts/SyncdMutation.part +121 -0
- package/WAProto/parts/SyncdMutations.part +92 -0
- package/WAProto/parts/SyncdPatch.part +262 -0
- package/WAProto/parts/SyncdRecord.part +125 -0
- package/WAProto/parts/SyncdSnapshot.part +157 -0
- package/WAProto/parts/SyncdValue.part +84 -0
- package/WAProto/parts/SyncdVersion.part +91 -0
- package/WAProto/parts/TapLinkAction.part +100 -0
- package/WAProto/parts/TemplateButton.part +449 -0
- package/WAProto/parts/ThreadID.part +126 -0
- package/WAProto/parts/UrlTrackingMap.part +231 -0
- package/WAProto/parts/UserPassword.part +399 -0
- package/WAProto/parts/UserReceipt.part +221 -0
- package/WAProto/parts/VerifiedNameCertificate.part +318 -0
- package/WAProto/parts/WallpaperSettings.part +119 -0
- package/WAProto/parts/WebFeatures.part +1870 -0
- package/WAProto/parts/WebLinkRenderConfig.part +5 -0
- package/WAProto/parts/WebMessageInfo.part +2851 -0
- package/WAProto/parts/WebNotificationsInfo.part +160 -0
- package/package.json +1 -1
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function MessageContextInfo(p) {
|
|
3
|
+
this.threadId = [];
|
|
4
|
+
if (p)
|
|
5
|
+
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
|
6
|
+
if (p[ks[i]] != null && ks[i] !== "__proto__")
|
|
7
|
+
this[ks[i]] = p[ks[i]];
|
|
8
|
+
}
|
|
9
|
+
MessageContextInfo.prototype.deviceListMetadata = null;
|
|
10
|
+
MessageContextInfo.prototype.deviceListMetadataVersion = null;
|
|
11
|
+
MessageContextInfo.prototype.messageSecret = null;
|
|
12
|
+
MessageContextInfo.prototype.paddingBytes = null;
|
|
13
|
+
MessageContextInfo.prototype.messageAddOnDurationInSecs = null;
|
|
14
|
+
MessageContextInfo.prototype.botMessageSecret = null;
|
|
15
|
+
MessageContextInfo.prototype.botMetadata = null;
|
|
16
|
+
MessageContextInfo.prototype.reportingTokenVersion = null;
|
|
17
|
+
MessageContextInfo.prototype.messageAddOnExpiryType = null;
|
|
18
|
+
MessageContextInfo.prototype.messageAssociation = null;
|
|
19
|
+
MessageContextInfo.prototype.capiCreatedGroup = null;
|
|
20
|
+
MessageContextInfo.prototype.supportPayload = null;
|
|
21
|
+
MessageContextInfo.prototype.limitSharing = null;
|
|
22
|
+
MessageContextInfo.prototype.limitSharingV2 = null;
|
|
23
|
+
MessageContextInfo.prototype.threadId = $util.emptyArray;
|
|
24
|
+
MessageContextInfo.prototype.weblinkRenderConfig = null;
|
|
25
|
+
MessageContextInfo.prototype.teeBotMetadata = null;
|
|
26
|
+
let $oneOfFields;
|
|
27
|
+
Object.defineProperty(MessageContextInfo.prototype, "_deviceListMetadata", {
|
|
28
|
+
get: $util.oneOfGetter($oneOfFields = ["deviceListMetadata"]),
|
|
29
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(MessageContextInfo.prototype, "_deviceListMetadataVersion", {
|
|
32
|
+
get: $util.oneOfGetter($oneOfFields = ["deviceListMetadataVersion"]),
|
|
33
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(MessageContextInfo.prototype, "_messageSecret", {
|
|
36
|
+
get: $util.oneOfGetter($oneOfFields = ["messageSecret"]),
|
|
37
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(MessageContextInfo.prototype, "_paddingBytes", {
|
|
40
|
+
get: $util.oneOfGetter($oneOfFields = ["paddingBytes"]),
|
|
41
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(MessageContextInfo.prototype, "_messageAddOnDurationInSecs", {
|
|
44
|
+
get: $util.oneOfGetter($oneOfFields = ["messageAddOnDurationInSecs"]),
|
|
45
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(MessageContextInfo.prototype, "_botMessageSecret", {
|
|
48
|
+
get: $util.oneOfGetter($oneOfFields = ["botMessageSecret"]),
|
|
49
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(MessageContextInfo.prototype, "_botMetadata", {
|
|
52
|
+
get: $util.oneOfGetter($oneOfFields = ["botMetadata"]),
|
|
53
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(MessageContextInfo.prototype, "_reportingTokenVersion", {
|
|
56
|
+
get: $util.oneOfGetter($oneOfFields = ["reportingTokenVersion"]),
|
|
57
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
58
|
+
});
|
|
59
|
+
Object.defineProperty(MessageContextInfo.prototype, "_messageAddOnExpiryType", {
|
|
60
|
+
get: $util.oneOfGetter($oneOfFields = ["messageAddOnExpiryType"]),
|
|
61
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
62
|
+
});
|
|
63
|
+
Object.defineProperty(MessageContextInfo.prototype, "_messageAssociation", {
|
|
64
|
+
get: $util.oneOfGetter($oneOfFields = ["messageAssociation"]),
|
|
65
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(MessageContextInfo.prototype, "_capiCreatedGroup", {
|
|
68
|
+
get: $util.oneOfGetter($oneOfFields = ["capiCreatedGroup"]),
|
|
69
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
70
|
+
});
|
|
71
|
+
Object.defineProperty(MessageContextInfo.prototype, "_supportPayload", {
|
|
72
|
+
get: $util.oneOfGetter($oneOfFields = ["supportPayload"]),
|
|
73
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(MessageContextInfo.prototype, "_limitSharing", {
|
|
76
|
+
get: $util.oneOfGetter($oneOfFields = ["limitSharing"]),
|
|
77
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
78
|
+
});
|
|
79
|
+
Object.defineProperty(MessageContextInfo.prototype, "_limitSharingV2", {
|
|
80
|
+
get: $util.oneOfGetter($oneOfFields = ["limitSharingV2"]),
|
|
81
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
82
|
+
});
|
|
83
|
+
Object.defineProperty(MessageContextInfo.prototype, "_weblinkRenderConfig", {
|
|
84
|
+
get: $util.oneOfGetter($oneOfFields = ["weblinkRenderConfig"]),
|
|
85
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(MessageContextInfo.prototype, "_teeBotMetadata", {
|
|
88
|
+
get: $util.oneOfGetter($oneOfFields = ["teeBotMetadata"]),
|
|
89
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
90
|
+
});
|
|
91
|
+
MessageContextInfo.create = function create(properties) {
|
|
92
|
+
return new MessageContextInfo(properties);
|
|
93
|
+
};
|
|
94
|
+
MessageContextInfo.encode = function encode(m, w) {
|
|
95
|
+
if (!w)
|
|
96
|
+
w = $Writer.create();
|
|
97
|
+
if (m.deviceListMetadata != null && Object.hasOwnProperty.call(m, "deviceListMetadata"))
|
|
98
|
+
$root.proto.DeviceListMetadata.encode(m.deviceListMetadata, w.uint32(10).fork()).ldelim();
|
|
99
|
+
if (m.deviceListMetadataVersion != null && Object.hasOwnProperty.call(m, "deviceListMetadataVersion"))
|
|
100
|
+
w.uint32(16).int32(m.deviceListMetadataVersion);
|
|
101
|
+
if (m.messageSecret != null && Object.hasOwnProperty.call(m, "messageSecret"))
|
|
102
|
+
w.uint32(26).bytes(m.messageSecret);
|
|
103
|
+
if (m.paddingBytes != null && Object.hasOwnProperty.call(m, "paddingBytes"))
|
|
104
|
+
w.uint32(34).bytes(m.paddingBytes);
|
|
105
|
+
if (m.messageAddOnDurationInSecs != null && Object.hasOwnProperty.call(m, "messageAddOnDurationInSecs"))
|
|
106
|
+
w.uint32(40).uint32(m.messageAddOnDurationInSecs);
|
|
107
|
+
if (m.botMessageSecret != null && Object.hasOwnProperty.call(m, "botMessageSecret"))
|
|
108
|
+
w.uint32(50).bytes(m.botMessageSecret);
|
|
109
|
+
if (m.botMetadata != null && Object.hasOwnProperty.call(m, "botMetadata"))
|
|
110
|
+
$root.proto.BotMetadata.encode(m.botMetadata, w.uint32(58).fork()).ldelim();
|
|
111
|
+
if (m.reportingTokenVersion != null && Object.hasOwnProperty.call(m, "reportingTokenVersion"))
|
|
112
|
+
w.uint32(64).int32(m.reportingTokenVersion);
|
|
113
|
+
if (m.messageAddOnExpiryType != null && Object.hasOwnProperty.call(m, "messageAddOnExpiryType"))
|
|
114
|
+
w.uint32(72).int32(m.messageAddOnExpiryType);
|
|
115
|
+
if (m.messageAssociation != null && Object.hasOwnProperty.call(m, "messageAssociation"))
|
|
116
|
+
$root.proto.MessageAssociation.encode(m.messageAssociation, w.uint32(82).fork()).ldelim();
|
|
117
|
+
if (m.capiCreatedGroup != null && Object.hasOwnProperty.call(m, "capiCreatedGroup"))
|
|
118
|
+
w.uint32(88).bool(m.capiCreatedGroup);
|
|
119
|
+
if (m.supportPayload != null && Object.hasOwnProperty.call(m, "supportPayload"))
|
|
120
|
+
w.uint32(98).string(m.supportPayload);
|
|
121
|
+
if (m.limitSharing != null && Object.hasOwnProperty.call(m, "limitSharing"))
|
|
122
|
+
$root.proto.LimitSharing.encode(m.limitSharing, w.uint32(106).fork()).ldelim();
|
|
123
|
+
if (m.limitSharingV2 != null && Object.hasOwnProperty.call(m, "limitSharingV2"))
|
|
124
|
+
$root.proto.LimitSharing.encode(m.limitSharingV2, w.uint32(114).fork()).ldelim();
|
|
125
|
+
if (m.threadId != null && m.threadId.length) {
|
|
126
|
+
for (var i = 0; i < m.threadId.length; ++i)
|
|
127
|
+
$root.proto.ThreadID.encode(m.threadId[i], w.uint32(122).fork()).ldelim();
|
|
128
|
+
}
|
|
129
|
+
if (m.weblinkRenderConfig != null && Object.hasOwnProperty.call(m, "weblinkRenderConfig"))
|
|
130
|
+
w.uint32(128).int32(m.weblinkRenderConfig);
|
|
131
|
+
if (m.teeBotMetadata != null && Object.hasOwnProperty.call(m, "teeBotMetadata"))
|
|
132
|
+
w.uint32(138).bytes(m.teeBotMetadata);
|
|
133
|
+
return w;
|
|
134
|
+
};
|
|
135
|
+
MessageContextInfo.decode = function decode(r, l, e, n) {
|
|
136
|
+
if (!(r instanceof $Reader))
|
|
137
|
+
r = $Reader.create(r);
|
|
138
|
+
if (n === undefined)
|
|
139
|
+
n = 0;
|
|
140
|
+
if (n > $Reader.recursionLimit)
|
|
141
|
+
throw Error("maximum nesting depth exceeded");
|
|
142
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.MessageContextInfo();
|
|
143
|
+
while (r.pos < c) {
|
|
144
|
+
var t = r.uint32();
|
|
145
|
+
if (t === e)
|
|
146
|
+
break;
|
|
147
|
+
switch (t >>> 3) {
|
|
148
|
+
case 1: {
|
|
149
|
+
m.deviceListMetadata = $root.proto.DeviceListMetadata.decode(r, r.uint32(), undefined, n + 1);
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
case 2: {
|
|
153
|
+
m.deviceListMetadataVersion = r.int32();
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
case 3: {
|
|
157
|
+
m.messageSecret = r.bytes();
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
case 4: {
|
|
161
|
+
m.paddingBytes = r.bytes();
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
case 5: {
|
|
165
|
+
m.messageAddOnDurationInSecs = r.uint32();
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
case 6: {
|
|
169
|
+
m.botMessageSecret = r.bytes();
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
case 7: {
|
|
173
|
+
m.botMetadata = $root.proto.BotMetadata.decode(r, r.uint32(), undefined, n + 1);
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
case 8: {
|
|
177
|
+
m.reportingTokenVersion = r.int32();
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
case 9: {
|
|
181
|
+
m.messageAddOnExpiryType = r.int32();
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
case 10: {
|
|
185
|
+
m.messageAssociation = $root.proto.MessageAssociation.decode(r, r.uint32(), undefined, n + 1);
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
case 11: {
|
|
189
|
+
m.capiCreatedGroup = r.bool();
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
case 12: {
|
|
193
|
+
m.supportPayload = r.string();
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
case 13: {
|
|
197
|
+
m.limitSharing = $root.proto.LimitSharing.decode(r, r.uint32(), undefined, n + 1);
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
case 14: {
|
|
201
|
+
m.limitSharingV2 = $root.proto.LimitSharing.decode(r, r.uint32(), undefined, n + 1);
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
case 15: {
|
|
205
|
+
if (!(m.threadId && m.threadId.length))
|
|
206
|
+
m.threadId = [];
|
|
207
|
+
m.threadId.push($root.proto.ThreadID.decode(r, r.uint32(), undefined, n + 1));
|
|
208
|
+
break;
|
|
209
|
+
}
|
|
210
|
+
case 16: {
|
|
211
|
+
m.weblinkRenderConfig = r.int32();
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
case 17: {
|
|
215
|
+
m.teeBotMetadata = r.bytes();
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
default:
|
|
219
|
+
r.skipType(t & 7, n);
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return m;
|
|
224
|
+
};
|
|
225
|
+
MessageContextInfo.fromObject = function fromObject(d, n) {
|
|
226
|
+
if (d instanceof $root.proto.MessageContextInfo)
|
|
227
|
+
return d;
|
|
228
|
+
if (n === undefined)
|
|
229
|
+
n = 0;
|
|
230
|
+
if (n > $util.recursionLimit)
|
|
231
|
+
throw Error("maximum nesting depth exceeded");
|
|
232
|
+
var m = new $root.proto.MessageContextInfo();
|
|
233
|
+
if (d.deviceListMetadata != null) {
|
|
234
|
+
if (typeof d.deviceListMetadata !== "object")
|
|
235
|
+
throw TypeError(".proto.MessageContextInfo.deviceListMetadata: object expected");
|
|
236
|
+
m.deviceListMetadata = $root.proto.DeviceListMetadata.fromObject(d.deviceListMetadata, n + 1);
|
|
237
|
+
}
|
|
238
|
+
if (d.deviceListMetadataVersion != null) {
|
|
239
|
+
m.deviceListMetadataVersion = d.deviceListMetadataVersion | 0;
|
|
240
|
+
}
|
|
241
|
+
if (d.messageSecret != null) {
|
|
242
|
+
if (typeof d.messageSecret === "string")
|
|
243
|
+
$util.base64.decode(d.messageSecret, m.messageSecret = $util.newBuffer($util.base64.length(d.messageSecret)), 0);
|
|
244
|
+
else if (d.messageSecret.length >= 0)
|
|
245
|
+
m.messageSecret = d.messageSecret;
|
|
246
|
+
}
|
|
247
|
+
if (d.paddingBytes != null) {
|
|
248
|
+
if (typeof d.paddingBytes === "string")
|
|
249
|
+
$util.base64.decode(d.paddingBytes, m.paddingBytes = $util.newBuffer($util.base64.length(d.paddingBytes)), 0);
|
|
250
|
+
else if (d.paddingBytes.length >= 0)
|
|
251
|
+
m.paddingBytes = d.paddingBytes;
|
|
252
|
+
}
|
|
253
|
+
if (d.messageAddOnDurationInSecs != null) {
|
|
254
|
+
m.messageAddOnDurationInSecs = d.messageAddOnDurationInSecs >>> 0;
|
|
255
|
+
}
|
|
256
|
+
if (d.botMessageSecret != null) {
|
|
257
|
+
if (typeof d.botMessageSecret === "string")
|
|
258
|
+
$util.base64.decode(d.botMessageSecret, m.botMessageSecret = $util.newBuffer($util.base64.length(d.botMessageSecret)), 0);
|
|
259
|
+
else if (d.botMessageSecret.length >= 0)
|
|
260
|
+
m.botMessageSecret = d.botMessageSecret;
|
|
261
|
+
}
|
|
262
|
+
if (d.botMetadata != null) {
|
|
263
|
+
if (typeof d.botMetadata !== "object")
|
|
264
|
+
throw TypeError(".proto.MessageContextInfo.botMetadata: object expected");
|
|
265
|
+
m.botMetadata = $root.proto.BotMetadata.fromObject(d.botMetadata, n + 1);
|
|
266
|
+
}
|
|
267
|
+
if (d.reportingTokenVersion != null) {
|
|
268
|
+
m.reportingTokenVersion = d.reportingTokenVersion | 0;
|
|
269
|
+
}
|
|
270
|
+
switch (d.messageAddOnExpiryType) {
|
|
271
|
+
default:
|
|
272
|
+
if (typeof d.messageAddOnExpiryType === "number") {
|
|
273
|
+
m.messageAddOnExpiryType = d.messageAddOnExpiryType;
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
break;
|
|
277
|
+
case "STATIC":
|
|
278
|
+
case 1:
|
|
279
|
+
m.messageAddOnExpiryType = 1;
|
|
280
|
+
break;
|
|
281
|
+
case "DEPENDENT_ON_PARENT":
|
|
282
|
+
case 2:
|
|
283
|
+
m.messageAddOnExpiryType = 2;
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
if (d.messageAssociation != null) {
|
|
287
|
+
if (typeof d.messageAssociation !== "object")
|
|
288
|
+
throw TypeError(".proto.MessageContextInfo.messageAssociation: object expected");
|
|
289
|
+
m.messageAssociation = $root.proto.MessageAssociation.fromObject(d.messageAssociation, n + 1);
|
|
290
|
+
}
|
|
291
|
+
if (d.capiCreatedGroup != null) {
|
|
292
|
+
m.capiCreatedGroup = Boolean(d.capiCreatedGroup);
|
|
293
|
+
}
|
|
294
|
+
if (d.supportPayload != null) {
|
|
295
|
+
m.supportPayload = String(d.supportPayload);
|
|
296
|
+
}
|
|
297
|
+
if (d.limitSharing != null) {
|
|
298
|
+
if (typeof d.limitSharing !== "object")
|
|
299
|
+
throw TypeError(".proto.MessageContextInfo.limitSharing: object expected");
|
|
300
|
+
m.limitSharing = $root.proto.LimitSharing.fromObject(d.limitSharing, n + 1);
|
|
301
|
+
}
|
|
302
|
+
if (d.limitSharingV2 != null) {
|
|
303
|
+
if (typeof d.limitSharingV2 !== "object")
|
|
304
|
+
throw TypeError(".proto.MessageContextInfo.limitSharingV2: object expected");
|
|
305
|
+
m.limitSharingV2 = $root.proto.LimitSharing.fromObject(d.limitSharingV2, n + 1);
|
|
306
|
+
}
|
|
307
|
+
if (d.threadId) {
|
|
308
|
+
if (!Array.isArray(d.threadId))
|
|
309
|
+
throw TypeError(".proto.MessageContextInfo.threadId: array expected");
|
|
310
|
+
m.threadId = [];
|
|
311
|
+
for (var i = 0; i < d.threadId.length; ++i) {
|
|
312
|
+
if (typeof d.threadId[i] !== "object")
|
|
313
|
+
throw TypeError(".proto.MessageContextInfo.threadId: object expected");
|
|
314
|
+
m.threadId[i] = $root.proto.ThreadID.fromObject(d.threadId[i], n + 1);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
switch (d.weblinkRenderConfig) {
|
|
318
|
+
default:
|
|
319
|
+
if (typeof d.weblinkRenderConfig === "number") {
|
|
320
|
+
m.weblinkRenderConfig = d.weblinkRenderConfig;
|
|
321
|
+
break;
|
|
322
|
+
}
|
|
323
|
+
break;
|
|
324
|
+
case "WEBVIEW":
|
|
325
|
+
case 0:
|
|
326
|
+
m.weblinkRenderConfig = 0;
|
|
327
|
+
break;
|
|
328
|
+
case "SYSTEM":
|
|
329
|
+
case 1:
|
|
330
|
+
m.weblinkRenderConfig = 1;
|
|
331
|
+
break;
|
|
332
|
+
}
|
|
333
|
+
if (d.teeBotMetadata != null) {
|
|
334
|
+
if (typeof d.teeBotMetadata === "string")
|
|
335
|
+
$util.base64.decode(d.teeBotMetadata, m.teeBotMetadata = $util.newBuffer($util.base64.length(d.teeBotMetadata)), 0);
|
|
336
|
+
else if (d.teeBotMetadata.length >= 0)
|
|
337
|
+
m.teeBotMetadata = d.teeBotMetadata;
|
|
338
|
+
}
|
|
339
|
+
return m;
|
|
340
|
+
};
|
|
341
|
+
MessageContextInfo.toObject = function toObject(m, o) {
|
|
342
|
+
if (!o)
|
|
343
|
+
o = {};
|
|
344
|
+
var d = {};
|
|
345
|
+
if (o.arrays || o.defaults) {
|
|
346
|
+
d.threadId = [];
|
|
347
|
+
}
|
|
348
|
+
if (m.deviceListMetadata != null && m.hasOwnProperty("deviceListMetadata")) {
|
|
349
|
+
d.deviceListMetadata = $root.proto.DeviceListMetadata.toObject(m.deviceListMetadata, o);
|
|
350
|
+
if (o.oneofs)
|
|
351
|
+
d._deviceListMetadata = "deviceListMetadata";
|
|
352
|
+
}
|
|
353
|
+
if (m.deviceListMetadataVersion != null && m.hasOwnProperty("deviceListMetadataVersion")) {
|
|
354
|
+
d.deviceListMetadataVersion = m.deviceListMetadataVersion;
|
|
355
|
+
if (o.oneofs)
|
|
356
|
+
d._deviceListMetadataVersion = "deviceListMetadataVersion";
|
|
357
|
+
}
|
|
358
|
+
if (m.messageSecret != null && m.hasOwnProperty("messageSecret")) {
|
|
359
|
+
d.messageSecret = o.bytes === String ? $util.base64.encode(m.messageSecret, 0, m.messageSecret.length) : o.bytes === Array ? Array.prototype.slice.call(m.messageSecret) : m.messageSecret;
|
|
360
|
+
if (o.oneofs)
|
|
361
|
+
d._messageSecret = "messageSecret";
|
|
362
|
+
}
|
|
363
|
+
if (m.paddingBytes != null && m.hasOwnProperty("paddingBytes")) {
|
|
364
|
+
d.paddingBytes = o.bytes === String ? $util.base64.encode(m.paddingBytes, 0, m.paddingBytes.length) : o.bytes === Array ? Array.prototype.slice.call(m.paddingBytes) : m.paddingBytes;
|
|
365
|
+
if (o.oneofs)
|
|
366
|
+
d._paddingBytes = "paddingBytes";
|
|
367
|
+
}
|
|
368
|
+
if (m.messageAddOnDurationInSecs != null && m.hasOwnProperty("messageAddOnDurationInSecs")) {
|
|
369
|
+
d.messageAddOnDurationInSecs = m.messageAddOnDurationInSecs;
|
|
370
|
+
if (o.oneofs)
|
|
371
|
+
d._messageAddOnDurationInSecs = "messageAddOnDurationInSecs";
|
|
372
|
+
}
|
|
373
|
+
if (m.botMessageSecret != null && m.hasOwnProperty("botMessageSecret")) {
|
|
374
|
+
d.botMessageSecret = o.bytes === String ? $util.base64.encode(m.botMessageSecret, 0, m.botMessageSecret.length) : o.bytes === Array ? Array.prototype.slice.call(m.botMessageSecret) : m.botMessageSecret;
|
|
375
|
+
if (o.oneofs)
|
|
376
|
+
d._botMessageSecret = "botMessageSecret";
|
|
377
|
+
}
|
|
378
|
+
if (m.botMetadata != null && m.hasOwnProperty("botMetadata")) {
|
|
379
|
+
d.botMetadata = $root.proto.BotMetadata.toObject(m.botMetadata, o);
|
|
380
|
+
if (o.oneofs)
|
|
381
|
+
d._botMetadata = "botMetadata";
|
|
382
|
+
}
|
|
383
|
+
if (m.reportingTokenVersion != null && m.hasOwnProperty("reportingTokenVersion")) {
|
|
384
|
+
d.reportingTokenVersion = m.reportingTokenVersion;
|
|
385
|
+
if (o.oneofs)
|
|
386
|
+
d._reportingTokenVersion = "reportingTokenVersion";
|
|
387
|
+
}
|
|
388
|
+
if (m.messageAddOnExpiryType != null && m.hasOwnProperty("messageAddOnExpiryType")) {
|
|
389
|
+
d.messageAddOnExpiryType = o.enums === String ? $root.proto.MessageContextInfo.MessageAddonExpiryType[m.messageAddOnExpiryType] === undefined ? m.messageAddOnExpiryType : $root.proto.MessageContextInfo.MessageAddonExpiryType[m.messageAddOnExpiryType] : m.messageAddOnExpiryType;
|
|
390
|
+
if (o.oneofs)
|
|
391
|
+
d._messageAddOnExpiryType = "messageAddOnExpiryType";
|
|
392
|
+
}
|
|
393
|
+
if (m.messageAssociation != null && m.hasOwnProperty("messageAssociation")) {
|
|
394
|
+
d.messageAssociation = $root.proto.MessageAssociation.toObject(m.messageAssociation, o);
|
|
395
|
+
if (o.oneofs)
|
|
396
|
+
d._messageAssociation = "messageAssociation";
|
|
397
|
+
}
|
|
398
|
+
if (m.capiCreatedGroup != null && m.hasOwnProperty("capiCreatedGroup")) {
|
|
399
|
+
d.capiCreatedGroup = m.capiCreatedGroup;
|
|
400
|
+
if (o.oneofs)
|
|
401
|
+
d._capiCreatedGroup = "capiCreatedGroup";
|
|
402
|
+
}
|
|
403
|
+
if (m.supportPayload != null && m.hasOwnProperty("supportPayload")) {
|
|
404
|
+
d.supportPayload = m.supportPayload;
|
|
405
|
+
if (o.oneofs)
|
|
406
|
+
d._supportPayload = "supportPayload";
|
|
407
|
+
}
|
|
408
|
+
if (m.limitSharing != null && m.hasOwnProperty("limitSharing")) {
|
|
409
|
+
d.limitSharing = $root.proto.LimitSharing.toObject(m.limitSharing, o);
|
|
410
|
+
if (o.oneofs)
|
|
411
|
+
d._limitSharing = "limitSharing";
|
|
412
|
+
}
|
|
413
|
+
if (m.limitSharingV2 != null && m.hasOwnProperty("limitSharingV2")) {
|
|
414
|
+
d.limitSharingV2 = $root.proto.LimitSharing.toObject(m.limitSharingV2, o);
|
|
415
|
+
if (o.oneofs)
|
|
416
|
+
d._limitSharingV2 = "limitSharingV2";
|
|
417
|
+
}
|
|
418
|
+
if (m.threadId && m.threadId.length) {
|
|
419
|
+
d.threadId = [];
|
|
420
|
+
for (var j = 0; j < m.threadId.length; ++j) {
|
|
421
|
+
d.threadId[j] = $root.proto.ThreadID.toObject(m.threadId[j], o);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
if (m.weblinkRenderConfig != null && m.hasOwnProperty("weblinkRenderConfig")) {
|
|
425
|
+
d.weblinkRenderConfig = o.enums === String ? $root.proto.WebLinkRenderConfig[m.weblinkRenderConfig] === undefined ? m.weblinkRenderConfig : $root.proto.WebLinkRenderConfig[m.weblinkRenderConfig] : m.weblinkRenderConfig;
|
|
426
|
+
if (o.oneofs)
|
|
427
|
+
d._weblinkRenderConfig = "weblinkRenderConfig";
|
|
428
|
+
}
|
|
429
|
+
if (m.teeBotMetadata != null && m.hasOwnProperty("teeBotMetadata")) {
|
|
430
|
+
d.teeBotMetadata = o.bytes === String ? $util.base64.encode(m.teeBotMetadata, 0, m.teeBotMetadata.length) : o.bytes === Array ? Array.prototype.slice.call(m.teeBotMetadata) : m.teeBotMetadata;
|
|
431
|
+
if (o.oneofs)
|
|
432
|
+
d._teeBotMetadata = "teeBotMetadata";
|
|
433
|
+
}
|
|
434
|
+
return d;
|
|
435
|
+
};
|
|
436
|
+
MessageContextInfo.prototype.toJSON = function toJSON() {
|
|
437
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
438
|
+
};
|
|
439
|
+
MessageContextInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
440
|
+
if (typeUrlPrefix === undefined) {
|
|
441
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
442
|
+
}
|
|
443
|
+
return typeUrlPrefix + "/proto.MessageContextInfo";
|
|
444
|
+
};
|
|
445
|
+
$lazy(MessageContextInfo, "MessageAddonExpiryType", function() {
|
|
446
|
+
const valuesById = {}, values = Object.create(valuesById);
|
|
447
|
+
values[valuesById[1] = "STATIC"] = 1;
|
|
448
|
+
values[valuesById[2] = "DEPENDENT_ON_PARENT"] = 2;
|
|
449
|
+
return values;
|
|
450
|
+
});
|
|
451
|
+
return MessageContextInfo;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function MessageKey(p) {
|
|
3
|
+
if (p)
|
|
4
|
+
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
|
5
|
+
if (p[ks[i]] != null && ks[i] !== "__proto__")
|
|
6
|
+
this[ks[i]] = p[ks[i]];
|
|
7
|
+
}
|
|
8
|
+
MessageKey.prototype.remoteJid = null;
|
|
9
|
+
MessageKey.prototype.fromMe = null;
|
|
10
|
+
MessageKey.prototype.id = null;
|
|
11
|
+
MessageKey.prototype.participant = null;
|
|
12
|
+
let $oneOfFields;
|
|
13
|
+
Object.defineProperty(MessageKey.prototype, "_remoteJid", {
|
|
14
|
+
get: $util.oneOfGetter($oneOfFields = ["remoteJid"]),
|
|
15
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(MessageKey.prototype, "_fromMe", {
|
|
18
|
+
get: $util.oneOfGetter($oneOfFields = ["fromMe"]),
|
|
19
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(MessageKey.prototype, "_id", {
|
|
22
|
+
get: $util.oneOfGetter($oneOfFields = ["id"]),
|
|
23
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(MessageKey.prototype, "_participant", {
|
|
26
|
+
get: $util.oneOfGetter($oneOfFields = ["participant"]),
|
|
27
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
28
|
+
});
|
|
29
|
+
MessageKey.create = function create(properties) {
|
|
30
|
+
return new MessageKey(properties);
|
|
31
|
+
};
|
|
32
|
+
MessageKey.encode = function encode(m, w) {
|
|
33
|
+
if (!w)
|
|
34
|
+
w = $Writer.create();
|
|
35
|
+
if (m.remoteJid != null && Object.hasOwnProperty.call(m, "remoteJid"))
|
|
36
|
+
w.uint32(10).string(m.remoteJid);
|
|
37
|
+
if (m.fromMe != null && Object.hasOwnProperty.call(m, "fromMe"))
|
|
38
|
+
w.uint32(16).bool(m.fromMe);
|
|
39
|
+
if (m.id != null && Object.hasOwnProperty.call(m, "id"))
|
|
40
|
+
w.uint32(26).string(m.id);
|
|
41
|
+
if (m.participant != null && Object.hasOwnProperty.call(m, "participant"))
|
|
42
|
+
w.uint32(34).string(m.participant);
|
|
43
|
+
return w;
|
|
44
|
+
};
|
|
45
|
+
MessageKey.decode = function decode(r, l, e, n) {
|
|
46
|
+
if (!(r instanceof $Reader))
|
|
47
|
+
r = $Reader.create(r);
|
|
48
|
+
if (n === undefined)
|
|
49
|
+
n = 0;
|
|
50
|
+
if (n > $Reader.recursionLimit)
|
|
51
|
+
throw Error("maximum nesting depth exceeded");
|
|
52
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.MessageKey();
|
|
53
|
+
while (r.pos < c) {
|
|
54
|
+
var t = r.uint32();
|
|
55
|
+
if (t === e)
|
|
56
|
+
break;
|
|
57
|
+
switch (t >>> 3) {
|
|
58
|
+
case 1: {
|
|
59
|
+
m.remoteJid = r.string();
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
case 2: {
|
|
63
|
+
m.fromMe = r.bool();
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
case 3: {
|
|
67
|
+
m.id = r.string();
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
case 4: {
|
|
71
|
+
m.participant = r.string();
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
default:
|
|
75
|
+
r.skipType(t & 7, n);
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return m;
|
|
80
|
+
};
|
|
81
|
+
MessageKey.fromObject = function fromObject(d, n) {
|
|
82
|
+
if (d instanceof $root.proto.MessageKey)
|
|
83
|
+
return d;
|
|
84
|
+
if (n === undefined)
|
|
85
|
+
n = 0;
|
|
86
|
+
if (n > $util.recursionLimit)
|
|
87
|
+
throw Error("maximum nesting depth exceeded");
|
|
88
|
+
var m = new $root.proto.MessageKey();
|
|
89
|
+
if (d.remoteJid != null) {
|
|
90
|
+
m.remoteJid = String(d.remoteJid);
|
|
91
|
+
}
|
|
92
|
+
if (d.fromMe != null) {
|
|
93
|
+
m.fromMe = Boolean(d.fromMe);
|
|
94
|
+
}
|
|
95
|
+
if (d.id != null) {
|
|
96
|
+
m.id = String(d.id);
|
|
97
|
+
}
|
|
98
|
+
if (d.participant != null) {
|
|
99
|
+
m.participant = String(d.participant);
|
|
100
|
+
}
|
|
101
|
+
return m;
|
|
102
|
+
};
|
|
103
|
+
MessageKey.toObject = function toObject(m, o) {
|
|
104
|
+
if (!o)
|
|
105
|
+
o = {};
|
|
106
|
+
var d = {};
|
|
107
|
+
if (m.remoteJid != null && m.hasOwnProperty("remoteJid")) {
|
|
108
|
+
d.remoteJid = m.remoteJid;
|
|
109
|
+
if (o.oneofs)
|
|
110
|
+
d._remoteJid = "remoteJid";
|
|
111
|
+
}
|
|
112
|
+
if (m.fromMe != null && m.hasOwnProperty("fromMe")) {
|
|
113
|
+
d.fromMe = m.fromMe;
|
|
114
|
+
if (o.oneofs)
|
|
115
|
+
d._fromMe = "fromMe";
|
|
116
|
+
}
|
|
117
|
+
if (m.id != null && m.hasOwnProperty("id")) {
|
|
118
|
+
d.id = m.id;
|
|
119
|
+
if (o.oneofs)
|
|
120
|
+
d._id = "id";
|
|
121
|
+
}
|
|
122
|
+
if (m.participant != null && m.hasOwnProperty("participant")) {
|
|
123
|
+
d.participant = m.participant;
|
|
124
|
+
if (o.oneofs)
|
|
125
|
+
d._participant = "participant";
|
|
126
|
+
}
|
|
127
|
+
return d;
|
|
128
|
+
};
|
|
129
|
+
MessageKey.prototype.toJSON = function toJSON() {
|
|
130
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
131
|
+
};
|
|
132
|
+
MessageKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
133
|
+
if (typeUrlPrefix === undefined) {
|
|
134
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
135
|
+
}
|
|
136
|
+
return typeUrlPrefix + "/proto.MessageKey";
|
|
137
|
+
};
|
|
138
|
+
return MessageKey;
|