@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,605 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function HistorySync(p) {
|
|
3
|
+
this.conversations = [];
|
|
4
|
+
this.statusV3Messages = [];
|
|
5
|
+
this.pushnames = [];
|
|
6
|
+
this.recentStickers = [];
|
|
7
|
+
this.pastParticipants = [];
|
|
8
|
+
this.callLogRecords = [];
|
|
9
|
+
this.phoneNumberToLidMappings = [];
|
|
10
|
+
this.accounts = [];
|
|
11
|
+
this.inlineContacts = [];
|
|
12
|
+
if (p)
|
|
13
|
+
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
|
14
|
+
if (p[ks[i]] != null && ks[i] !== "__proto__")
|
|
15
|
+
this[ks[i]] = p[ks[i]];
|
|
16
|
+
}
|
|
17
|
+
HistorySync.prototype.syncType = 0;
|
|
18
|
+
HistorySync.prototype.conversations = $util.emptyArray;
|
|
19
|
+
HistorySync.prototype.statusV3Messages = $util.emptyArray;
|
|
20
|
+
HistorySync.prototype.chunkOrder = null;
|
|
21
|
+
HistorySync.prototype.progress = null;
|
|
22
|
+
HistorySync.prototype.pushnames = $util.emptyArray;
|
|
23
|
+
HistorySync.prototype.globalSettings = null;
|
|
24
|
+
HistorySync.prototype.threadIdUserSecret = null;
|
|
25
|
+
HistorySync.prototype.threadDsTimeframeOffset = null;
|
|
26
|
+
HistorySync.prototype.recentStickers = $util.emptyArray;
|
|
27
|
+
HistorySync.prototype.pastParticipants = $util.emptyArray;
|
|
28
|
+
HistorySync.prototype.callLogRecords = $util.emptyArray;
|
|
29
|
+
HistorySync.prototype.aiWaitListState = null;
|
|
30
|
+
HistorySync.prototype.phoneNumberToLidMappings = $util.emptyArray;
|
|
31
|
+
HistorySync.prototype.companionMetaNonce = null;
|
|
32
|
+
HistorySync.prototype.shareableChatIdentifierEncryptionKey = null;
|
|
33
|
+
HistorySync.prototype.accounts = $util.emptyArray;
|
|
34
|
+
HistorySync.prototype.nctSalt = null;
|
|
35
|
+
HistorySync.prototype.inlineContacts = $util.emptyArray;
|
|
36
|
+
HistorySync.prototype.inlineContactsProvided = null;
|
|
37
|
+
let $oneOfFields;
|
|
38
|
+
Object.defineProperty(HistorySync.prototype, "_chunkOrder", {
|
|
39
|
+
get: $util.oneOfGetter($oneOfFields = ["chunkOrder"]),
|
|
40
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(HistorySync.prototype, "_progress", {
|
|
43
|
+
get: $util.oneOfGetter($oneOfFields = ["progress"]),
|
|
44
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(HistorySync.prototype, "_globalSettings", {
|
|
47
|
+
get: $util.oneOfGetter($oneOfFields = ["globalSettings"]),
|
|
48
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(HistorySync.prototype, "_threadIdUserSecret", {
|
|
51
|
+
get: $util.oneOfGetter($oneOfFields = ["threadIdUserSecret"]),
|
|
52
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(HistorySync.prototype, "_threadDsTimeframeOffset", {
|
|
55
|
+
get: $util.oneOfGetter($oneOfFields = ["threadDsTimeframeOffset"]),
|
|
56
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
57
|
+
});
|
|
58
|
+
Object.defineProperty(HistorySync.prototype, "_aiWaitListState", {
|
|
59
|
+
get: $util.oneOfGetter($oneOfFields = ["aiWaitListState"]),
|
|
60
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(HistorySync.prototype, "_companionMetaNonce", {
|
|
63
|
+
get: $util.oneOfGetter($oneOfFields = ["companionMetaNonce"]),
|
|
64
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(HistorySync.prototype, "_shareableChatIdentifierEncryptionKey", {
|
|
67
|
+
get: $util.oneOfGetter($oneOfFields = ["shareableChatIdentifierEncryptionKey"]),
|
|
68
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
69
|
+
});
|
|
70
|
+
Object.defineProperty(HistorySync.prototype, "_nctSalt", {
|
|
71
|
+
get: $util.oneOfGetter($oneOfFields = ["nctSalt"]),
|
|
72
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(HistorySync.prototype, "_inlineContactsProvided", {
|
|
75
|
+
get: $util.oneOfGetter($oneOfFields = ["inlineContactsProvided"]),
|
|
76
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
77
|
+
});
|
|
78
|
+
HistorySync.create = function create(properties) {
|
|
79
|
+
return new HistorySync(properties);
|
|
80
|
+
};
|
|
81
|
+
HistorySync.encode = function encode(m, w) {
|
|
82
|
+
if (!w)
|
|
83
|
+
w = $Writer.create();
|
|
84
|
+
if (m.syncType != null && Object.hasOwnProperty.call(m, "syncType"))
|
|
85
|
+
w.uint32(8).int32(m.syncType);
|
|
86
|
+
if (m.conversations != null && m.conversations.length) {
|
|
87
|
+
for (var i = 0; i < m.conversations.length; ++i)
|
|
88
|
+
$root.proto.Conversation.encode(m.conversations[i], w.uint32(18).fork()).ldelim();
|
|
89
|
+
}
|
|
90
|
+
if (m.statusV3Messages != null && m.statusV3Messages.length) {
|
|
91
|
+
for (var i = 0; i < m.statusV3Messages.length; ++i)
|
|
92
|
+
$root.proto.WebMessageInfo.encode(m.statusV3Messages[i], w.uint32(26).fork()).ldelim();
|
|
93
|
+
}
|
|
94
|
+
if (m.chunkOrder != null && Object.hasOwnProperty.call(m, "chunkOrder"))
|
|
95
|
+
w.uint32(40).uint32(m.chunkOrder);
|
|
96
|
+
if (m.progress != null && Object.hasOwnProperty.call(m, "progress"))
|
|
97
|
+
w.uint32(48).uint32(m.progress);
|
|
98
|
+
if (m.pushnames != null && m.pushnames.length) {
|
|
99
|
+
for (var i = 0; i < m.pushnames.length; ++i)
|
|
100
|
+
$root.proto.Pushname.encode(m.pushnames[i], w.uint32(58).fork()).ldelim();
|
|
101
|
+
}
|
|
102
|
+
if (m.globalSettings != null && Object.hasOwnProperty.call(m, "globalSettings"))
|
|
103
|
+
$root.proto.GlobalSettings.encode(m.globalSettings, w.uint32(66).fork()).ldelim();
|
|
104
|
+
if (m.threadIdUserSecret != null && Object.hasOwnProperty.call(m, "threadIdUserSecret"))
|
|
105
|
+
w.uint32(74).bytes(m.threadIdUserSecret);
|
|
106
|
+
if (m.threadDsTimeframeOffset != null && Object.hasOwnProperty.call(m, "threadDsTimeframeOffset"))
|
|
107
|
+
w.uint32(80).uint32(m.threadDsTimeframeOffset);
|
|
108
|
+
if (m.recentStickers != null && m.recentStickers.length) {
|
|
109
|
+
for (var i = 0; i < m.recentStickers.length; ++i)
|
|
110
|
+
$root.proto.StickerMetadata.encode(m.recentStickers[i], w.uint32(90).fork()).ldelim();
|
|
111
|
+
}
|
|
112
|
+
if (m.pastParticipants != null && m.pastParticipants.length) {
|
|
113
|
+
for (var i = 0; i < m.pastParticipants.length; ++i)
|
|
114
|
+
$root.proto.PastParticipants.encode(m.pastParticipants[i], w.uint32(98).fork()).ldelim();
|
|
115
|
+
}
|
|
116
|
+
if (m.callLogRecords != null && m.callLogRecords.length) {
|
|
117
|
+
for (var i = 0; i < m.callLogRecords.length; ++i)
|
|
118
|
+
$root.proto.CallLogRecord.encode(m.callLogRecords[i], w.uint32(106).fork()).ldelim();
|
|
119
|
+
}
|
|
120
|
+
if (m.aiWaitListState != null && Object.hasOwnProperty.call(m, "aiWaitListState"))
|
|
121
|
+
w.uint32(112).int32(m.aiWaitListState);
|
|
122
|
+
if (m.phoneNumberToLidMappings != null && m.phoneNumberToLidMappings.length) {
|
|
123
|
+
for (var i = 0; i < m.phoneNumberToLidMappings.length; ++i)
|
|
124
|
+
$root.proto.PhoneNumberToLIDMapping.encode(m.phoneNumberToLidMappings[i], w.uint32(122).fork()).ldelim();
|
|
125
|
+
}
|
|
126
|
+
if (m.companionMetaNonce != null && Object.hasOwnProperty.call(m, "companionMetaNonce"))
|
|
127
|
+
w.uint32(130).string(m.companionMetaNonce);
|
|
128
|
+
if (m.shareableChatIdentifierEncryptionKey != null && Object.hasOwnProperty.call(m, "shareableChatIdentifierEncryptionKey"))
|
|
129
|
+
w.uint32(138).bytes(m.shareableChatIdentifierEncryptionKey);
|
|
130
|
+
if (m.accounts != null && m.accounts.length) {
|
|
131
|
+
for (var i = 0; i < m.accounts.length; ++i)
|
|
132
|
+
$root.proto.Account.encode(m.accounts[i], w.uint32(146).fork()).ldelim();
|
|
133
|
+
}
|
|
134
|
+
if (m.nctSalt != null && Object.hasOwnProperty.call(m, "nctSalt"))
|
|
135
|
+
w.uint32(154).bytes(m.nctSalt);
|
|
136
|
+
if (m.inlineContacts != null && m.inlineContacts.length) {
|
|
137
|
+
for (var i = 0; i < m.inlineContacts.length; ++i)
|
|
138
|
+
$root.proto.InlineContact.encode(m.inlineContacts[i], w.uint32(162).fork()).ldelim();
|
|
139
|
+
}
|
|
140
|
+
if (m.inlineContactsProvided != null && Object.hasOwnProperty.call(m, "inlineContactsProvided"))
|
|
141
|
+
w.uint32(168).bool(m.inlineContactsProvided);
|
|
142
|
+
return w;
|
|
143
|
+
};
|
|
144
|
+
HistorySync.decode = function decode(r, l, e, n) {
|
|
145
|
+
if (!(r instanceof $Reader))
|
|
146
|
+
r = $Reader.create(r);
|
|
147
|
+
if (n === undefined)
|
|
148
|
+
n = 0;
|
|
149
|
+
if (n > $Reader.recursionLimit)
|
|
150
|
+
throw Error("maximum nesting depth exceeded");
|
|
151
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.HistorySync();
|
|
152
|
+
while (r.pos < c) {
|
|
153
|
+
var t = r.uint32();
|
|
154
|
+
if (t === e)
|
|
155
|
+
break;
|
|
156
|
+
switch (t >>> 3) {
|
|
157
|
+
case 1: {
|
|
158
|
+
m.syncType = r.int32();
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
case 2: {
|
|
162
|
+
if (!(m.conversations && m.conversations.length))
|
|
163
|
+
m.conversations = [];
|
|
164
|
+
m.conversations.push($root.proto.Conversation.decode(r, r.uint32(), undefined, n + 1));
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
case 3: {
|
|
168
|
+
if (!(m.statusV3Messages && m.statusV3Messages.length))
|
|
169
|
+
m.statusV3Messages = [];
|
|
170
|
+
m.statusV3Messages.push($root.proto.WebMessageInfo.decode(r, r.uint32(), undefined, n + 1));
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
case 5: {
|
|
174
|
+
m.chunkOrder = r.uint32();
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
case 6: {
|
|
178
|
+
m.progress = r.uint32();
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
case 7: {
|
|
182
|
+
if (!(m.pushnames && m.pushnames.length))
|
|
183
|
+
m.pushnames = [];
|
|
184
|
+
m.pushnames.push($root.proto.Pushname.decode(r, r.uint32(), undefined, n + 1));
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
case 8: {
|
|
188
|
+
m.globalSettings = $root.proto.GlobalSettings.decode(r, r.uint32(), undefined, n + 1);
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
case 9: {
|
|
192
|
+
m.threadIdUserSecret = r.bytes();
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
case 10: {
|
|
196
|
+
m.threadDsTimeframeOffset = r.uint32();
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
case 11: {
|
|
200
|
+
if (!(m.recentStickers && m.recentStickers.length))
|
|
201
|
+
m.recentStickers = [];
|
|
202
|
+
m.recentStickers.push($root.proto.StickerMetadata.decode(r, r.uint32(), undefined, n + 1));
|
|
203
|
+
break;
|
|
204
|
+
}
|
|
205
|
+
case 12: {
|
|
206
|
+
if (!(m.pastParticipants && m.pastParticipants.length))
|
|
207
|
+
m.pastParticipants = [];
|
|
208
|
+
m.pastParticipants.push($root.proto.PastParticipants.decode(r, r.uint32(), undefined, n + 1));
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
case 13: {
|
|
212
|
+
if (!(m.callLogRecords && m.callLogRecords.length))
|
|
213
|
+
m.callLogRecords = [];
|
|
214
|
+
m.callLogRecords.push($root.proto.CallLogRecord.decode(r, r.uint32(), undefined, n + 1));
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
case 14: {
|
|
218
|
+
m.aiWaitListState = r.int32();
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
case 15: {
|
|
222
|
+
if (!(m.phoneNumberToLidMappings && m.phoneNumberToLidMappings.length))
|
|
223
|
+
m.phoneNumberToLidMappings = [];
|
|
224
|
+
m.phoneNumberToLidMappings.push($root.proto.PhoneNumberToLIDMapping.decode(r, r.uint32(), undefined, n + 1));
|
|
225
|
+
break;
|
|
226
|
+
}
|
|
227
|
+
case 16: {
|
|
228
|
+
m.companionMetaNonce = r.string();
|
|
229
|
+
break;
|
|
230
|
+
}
|
|
231
|
+
case 17: {
|
|
232
|
+
m.shareableChatIdentifierEncryptionKey = r.bytes();
|
|
233
|
+
break;
|
|
234
|
+
}
|
|
235
|
+
case 18: {
|
|
236
|
+
if (!(m.accounts && m.accounts.length))
|
|
237
|
+
m.accounts = [];
|
|
238
|
+
m.accounts.push($root.proto.Account.decode(r, r.uint32(), undefined, n + 1));
|
|
239
|
+
break;
|
|
240
|
+
}
|
|
241
|
+
case 19: {
|
|
242
|
+
m.nctSalt = r.bytes();
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
case 20: {
|
|
246
|
+
if (!(m.inlineContacts && m.inlineContacts.length))
|
|
247
|
+
m.inlineContacts = [];
|
|
248
|
+
m.inlineContacts.push($root.proto.InlineContact.decode(r, r.uint32(), undefined, n + 1));
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
251
|
+
case 21: {
|
|
252
|
+
m.inlineContactsProvided = r.bool();
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
default:
|
|
256
|
+
r.skipType(t & 7, n);
|
|
257
|
+
break;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return m;
|
|
261
|
+
};
|
|
262
|
+
HistorySync.fromObject = function fromObject(d, n) {
|
|
263
|
+
if (d instanceof $root.proto.HistorySync)
|
|
264
|
+
return d;
|
|
265
|
+
if (n === undefined)
|
|
266
|
+
n = 0;
|
|
267
|
+
if (n > $util.recursionLimit)
|
|
268
|
+
throw Error("maximum nesting depth exceeded");
|
|
269
|
+
var m = new $root.proto.HistorySync();
|
|
270
|
+
switch (d.syncType) {
|
|
271
|
+
default:
|
|
272
|
+
if (typeof d.syncType === "number") {
|
|
273
|
+
m.syncType = d.syncType;
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
break;
|
|
277
|
+
case "INITIAL_BOOTSTRAP":
|
|
278
|
+
case 0:
|
|
279
|
+
m.syncType = 0;
|
|
280
|
+
break;
|
|
281
|
+
case "INITIAL_STATUS_V3":
|
|
282
|
+
case 1:
|
|
283
|
+
m.syncType = 1;
|
|
284
|
+
break;
|
|
285
|
+
case "FULL":
|
|
286
|
+
case 2:
|
|
287
|
+
m.syncType = 2;
|
|
288
|
+
break;
|
|
289
|
+
case "RECENT":
|
|
290
|
+
case 3:
|
|
291
|
+
m.syncType = 3;
|
|
292
|
+
break;
|
|
293
|
+
case "PUSH_NAME":
|
|
294
|
+
case 4:
|
|
295
|
+
m.syncType = 4;
|
|
296
|
+
break;
|
|
297
|
+
case "NON_BLOCKING_DATA":
|
|
298
|
+
case 5:
|
|
299
|
+
m.syncType = 5;
|
|
300
|
+
break;
|
|
301
|
+
case "ON_DEMAND":
|
|
302
|
+
case 6:
|
|
303
|
+
m.syncType = 6;
|
|
304
|
+
break;
|
|
305
|
+
}
|
|
306
|
+
if (d.conversations) {
|
|
307
|
+
if (!Array.isArray(d.conversations))
|
|
308
|
+
throw TypeError(".proto.HistorySync.conversations: array expected");
|
|
309
|
+
m.conversations = [];
|
|
310
|
+
for (var i = 0; i < d.conversations.length; ++i) {
|
|
311
|
+
if (typeof d.conversations[i] !== "object")
|
|
312
|
+
throw TypeError(".proto.HistorySync.conversations: object expected");
|
|
313
|
+
m.conversations[i] = $root.proto.Conversation.fromObject(d.conversations[i], n + 1);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
if (d.statusV3Messages) {
|
|
317
|
+
if (!Array.isArray(d.statusV3Messages))
|
|
318
|
+
throw TypeError(".proto.HistorySync.statusV3Messages: array expected");
|
|
319
|
+
m.statusV3Messages = [];
|
|
320
|
+
for (var i = 0; i < d.statusV3Messages.length; ++i) {
|
|
321
|
+
if (typeof d.statusV3Messages[i] !== "object")
|
|
322
|
+
throw TypeError(".proto.HistorySync.statusV3Messages: object expected");
|
|
323
|
+
m.statusV3Messages[i] = $root.proto.WebMessageInfo.fromObject(d.statusV3Messages[i], n + 1);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
if (d.chunkOrder != null) {
|
|
327
|
+
m.chunkOrder = d.chunkOrder >>> 0;
|
|
328
|
+
}
|
|
329
|
+
if (d.progress != null) {
|
|
330
|
+
m.progress = d.progress >>> 0;
|
|
331
|
+
}
|
|
332
|
+
if (d.pushnames) {
|
|
333
|
+
if (!Array.isArray(d.pushnames))
|
|
334
|
+
throw TypeError(".proto.HistorySync.pushnames: array expected");
|
|
335
|
+
m.pushnames = [];
|
|
336
|
+
for (var i = 0; i < d.pushnames.length; ++i) {
|
|
337
|
+
if (typeof d.pushnames[i] !== "object")
|
|
338
|
+
throw TypeError(".proto.HistorySync.pushnames: object expected");
|
|
339
|
+
m.pushnames[i] = $root.proto.Pushname.fromObject(d.pushnames[i], n + 1);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
if (d.globalSettings != null) {
|
|
343
|
+
if (typeof d.globalSettings !== "object")
|
|
344
|
+
throw TypeError(".proto.HistorySync.globalSettings: object expected");
|
|
345
|
+
m.globalSettings = $root.proto.GlobalSettings.fromObject(d.globalSettings, n + 1);
|
|
346
|
+
}
|
|
347
|
+
if (d.threadIdUserSecret != null) {
|
|
348
|
+
if (typeof d.threadIdUserSecret === "string")
|
|
349
|
+
$util.base64.decode(d.threadIdUserSecret, m.threadIdUserSecret = $util.newBuffer($util.base64.length(d.threadIdUserSecret)), 0);
|
|
350
|
+
else if (d.threadIdUserSecret.length >= 0)
|
|
351
|
+
m.threadIdUserSecret = d.threadIdUserSecret;
|
|
352
|
+
}
|
|
353
|
+
if (d.threadDsTimeframeOffset != null) {
|
|
354
|
+
m.threadDsTimeframeOffset = d.threadDsTimeframeOffset >>> 0;
|
|
355
|
+
}
|
|
356
|
+
if (d.recentStickers) {
|
|
357
|
+
if (!Array.isArray(d.recentStickers))
|
|
358
|
+
throw TypeError(".proto.HistorySync.recentStickers: array expected");
|
|
359
|
+
m.recentStickers = [];
|
|
360
|
+
for (var i = 0; i < d.recentStickers.length; ++i) {
|
|
361
|
+
if (typeof d.recentStickers[i] !== "object")
|
|
362
|
+
throw TypeError(".proto.HistorySync.recentStickers: object expected");
|
|
363
|
+
m.recentStickers[i] = $root.proto.StickerMetadata.fromObject(d.recentStickers[i], n + 1);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
if (d.pastParticipants) {
|
|
367
|
+
if (!Array.isArray(d.pastParticipants))
|
|
368
|
+
throw TypeError(".proto.HistorySync.pastParticipants: array expected");
|
|
369
|
+
m.pastParticipants = [];
|
|
370
|
+
for (var i = 0; i < d.pastParticipants.length; ++i) {
|
|
371
|
+
if (typeof d.pastParticipants[i] !== "object")
|
|
372
|
+
throw TypeError(".proto.HistorySync.pastParticipants: object expected");
|
|
373
|
+
m.pastParticipants[i] = $root.proto.PastParticipants.fromObject(d.pastParticipants[i], n + 1);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
if (d.callLogRecords) {
|
|
377
|
+
if (!Array.isArray(d.callLogRecords))
|
|
378
|
+
throw TypeError(".proto.HistorySync.callLogRecords: array expected");
|
|
379
|
+
m.callLogRecords = [];
|
|
380
|
+
for (var i = 0; i < d.callLogRecords.length; ++i) {
|
|
381
|
+
if (typeof d.callLogRecords[i] !== "object")
|
|
382
|
+
throw TypeError(".proto.HistorySync.callLogRecords: object expected");
|
|
383
|
+
m.callLogRecords[i] = $root.proto.CallLogRecord.fromObject(d.callLogRecords[i], n + 1);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
switch (d.aiWaitListState) {
|
|
387
|
+
default:
|
|
388
|
+
if (typeof d.aiWaitListState === "number") {
|
|
389
|
+
m.aiWaitListState = d.aiWaitListState;
|
|
390
|
+
break;
|
|
391
|
+
}
|
|
392
|
+
break;
|
|
393
|
+
case "IN_WAITLIST":
|
|
394
|
+
case 0:
|
|
395
|
+
m.aiWaitListState = 0;
|
|
396
|
+
break;
|
|
397
|
+
case "AI_AVAILABLE":
|
|
398
|
+
case 1:
|
|
399
|
+
m.aiWaitListState = 1;
|
|
400
|
+
break;
|
|
401
|
+
}
|
|
402
|
+
if (d.phoneNumberToLidMappings) {
|
|
403
|
+
if (!Array.isArray(d.phoneNumberToLidMappings))
|
|
404
|
+
throw TypeError(".proto.HistorySync.phoneNumberToLidMappings: array expected");
|
|
405
|
+
m.phoneNumberToLidMappings = [];
|
|
406
|
+
for (var i = 0; i < d.phoneNumberToLidMappings.length; ++i) {
|
|
407
|
+
if (typeof d.phoneNumberToLidMappings[i] !== "object")
|
|
408
|
+
throw TypeError(".proto.HistorySync.phoneNumberToLidMappings: object expected");
|
|
409
|
+
m.phoneNumberToLidMappings[i] = $root.proto.PhoneNumberToLIDMapping.fromObject(d.phoneNumberToLidMappings[i], n + 1);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
if (d.companionMetaNonce != null) {
|
|
413
|
+
m.companionMetaNonce = String(d.companionMetaNonce);
|
|
414
|
+
}
|
|
415
|
+
if (d.shareableChatIdentifierEncryptionKey != null) {
|
|
416
|
+
if (typeof d.shareableChatIdentifierEncryptionKey === "string")
|
|
417
|
+
$util.base64.decode(d.shareableChatIdentifierEncryptionKey, m.shareableChatIdentifierEncryptionKey = $util.newBuffer($util.base64.length(d.shareableChatIdentifierEncryptionKey)), 0);
|
|
418
|
+
else if (d.shareableChatIdentifierEncryptionKey.length >= 0)
|
|
419
|
+
m.shareableChatIdentifierEncryptionKey = d.shareableChatIdentifierEncryptionKey;
|
|
420
|
+
}
|
|
421
|
+
if (d.accounts) {
|
|
422
|
+
if (!Array.isArray(d.accounts))
|
|
423
|
+
throw TypeError(".proto.HistorySync.accounts: array expected");
|
|
424
|
+
m.accounts = [];
|
|
425
|
+
for (var i = 0; i < d.accounts.length; ++i) {
|
|
426
|
+
if (typeof d.accounts[i] !== "object")
|
|
427
|
+
throw TypeError(".proto.HistorySync.accounts: object expected");
|
|
428
|
+
m.accounts[i] = $root.proto.Account.fromObject(d.accounts[i], n + 1);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
if (d.nctSalt != null) {
|
|
432
|
+
if (typeof d.nctSalt === "string")
|
|
433
|
+
$util.base64.decode(d.nctSalt, m.nctSalt = $util.newBuffer($util.base64.length(d.nctSalt)), 0);
|
|
434
|
+
else if (d.nctSalt.length >= 0)
|
|
435
|
+
m.nctSalt = d.nctSalt;
|
|
436
|
+
}
|
|
437
|
+
if (d.inlineContacts) {
|
|
438
|
+
if (!Array.isArray(d.inlineContacts))
|
|
439
|
+
throw TypeError(".proto.HistorySync.inlineContacts: array expected");
|
|
440
|
+
m.inlineContacts = [];
|
|
441
|
+
for (var i = 0; i < d.inlineContacts.length; ++i) {
|
|
442
|
+
if (typeof d.inlineContacts[i] !== "object")
|
|
443
|
+
throw TypeError(".proto.HistorySync.inlineContacts: object expected");
|
|
444
|
+
m.inlineContacts[i] = $root.proto.InlineContact.fromObject(d.inlineContacts[i], n + 1);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
if (d.inlineContactsProvided != null) {
|
|
448
|
+
m.inlineContactsProvided = Boolean(d.inlineContactsProvided);
|
|
449
|
+
}
|
|
450
|
+
return m;
|
|
451
|
+
};
|
|
452
|
+
HistorySync.toObject = function toObject(m, o) {
|
|
453
|
+
if (!o)
|
|
454
|
+
o = {};
|
|
455
|
+
var d = {};
|
|
456
|
+
if (o.arrays || o.defaults) {
|
|
457
|
+
d.conversations = [];
|
|
458
|
+
d.statusV3Messages = [];
|
|
459
|
+
d.pushnames = [];
|
|
460
|
+
d.recentStickers = [];
|
|
461
|
+
d.pastParticipants = [];
|
|
462
|
+
d.callLogRecords = [];
|
|
463
|
+
d.phoneNumberToLidMappings = [];
|
|
464
|
+
d.accounts = [];
|
|
465
|
+
d.inlineContacts = [];
|
|
466
|
+
}
|
|
467
|
+
if (o.defaults) {
|
|
468
|
+
d.syncType = o.enums === String ? "INITIAL_BOOTSTRAP" : 0;
|
|
469
|
+
}
|
|
470
|
+
if (m.syncType != null && m.hasOwnProperty("syncType")) {
|
|
471
|
+
d.syncType = o.enums === String ? $root.proto.HistorySync.HistorySyncType[m.syncType] === undefined ? m.syncType : $root.proto.HistorySync.HistorySyncType[m.syncType] : m.syncType;
|
|
472
|
+
}
|
|
473
|
+
if (m.conversations && m.conversations.length) {
|
|
474
|
+
d.conversations = [];
|
|
475
|
+
for (var j = 0; j < m.conversations.length; ++j) {
|
|
476
|
+
d.conversations[j] = $root.proto.Conversation.toObject(m.conversations[j], o);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
if (m.statusV3Messages && m.statusV3Messages.length) {
|
|
480
|
+
d.statusV3Messages = [];
|
|
481
|
+
for (var j = 0; j < m.statusV3Messages.length; ++j) {
|
|
482
|
+
d.statusV3Messages[j] = $root.proto.WebMessageInfo.toObject(m.statusV3Messages[j], o);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
if (m.chunkOrder != null && m.hasOwnProperty("chunkOrder")) {
|
|
486
|
+
d.chunkOrder = m.chunkOrder;
|
|
487
|
+
if (o.oneofs)
|
|
488
|
+
d._chunkOrder = "chunkOrder";
|
|
489
|
+
}
|
|
490
|
+
if (m.progress != null && m.hasOwnProperty("progress")) {
|
|
491
|
+
d.progress = m.progress;
|
|
492
|
+
if (o.oneofs)
|
|
493
|
+
d._progress = "progress";
|
|
494
|
+
}
|
|
495
|
+
if (m.pushnames && m.pushnames.length) {
|
|
496
|
+
d.pushnames = [];
|
|
497
|
+
for (var j = 0; j < m.pushnames.length; ++j) {
|
|
498
|
+
d.pushnames[j] = $root.proto.Pushname.toObject(m.pushnames[j], o);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
if (m.globalSettings != null && m.hasOwnProperty("globalSettings")) {
|
|
502
|
+
d.globalSettings = $root.proto.GlobalSettings.toObject(m.globalSettings, o);
|
|
503
|
+
if (o.oneofs)
|
|
504
|
+
d._globalSettings = "globalSettings";
|
|
505
|
+
}
|
|
506
|
+
if (m.threadIdUserSecret != null && m.hasOwnProperty("threadIdUserSecret")) {
|
|
507
|
+
d.threadIdUserSecret = o.bytes === String ? $util.base64.encode(m.threadIdUserSecret, 0, m.threadIdUserSecret.length) : o.bytes === Array ? Array.prototype.slice.call(m.threadIdUserSecret) : m.threadIdUserSecret;
|
|
508
|
+
if (o.oneofs)
|
|
509
|
+
d._threadIdUserSecret = "threadIdUserSecret";
|
|
510
|
+
}
|
|
511
|
+
if (m.threadDsTimeframeOffset != null && m.hasOwnProperty("threadDsTimeframeOffset")) {
|
|
512
|
+
d.threadDsTimeframeOffset = m.threadDsTimeframeOffset;
|
|
513
|
+
if (o.oneofs)
|
|
514
|
+
d._threadDsTimeframeOffset = "threadDsTimeframeOffset";
|
|
515
|
+
}
|
|
516
|
+
if (m.recentStickers && m.recentStickers.length) {
|
|
517
|
+
d.recentStickers = [];
|
|
518
|
+
for (var j = 0; j < m.recentStickers.length; ++j) {
|
|
519
|
+
d.recentStickers[j] = $root.proto.StickerMetadata.toObject(m.recentStickers[j], o);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
if (m.pastParticipants && m.pastParticipants.length) {
|
|
523
|
+
d.pastParticipants = [];
|
|
524
|
+
for (var j = 0; j < m.pastParticipants.length; ++j) {
|
|
525
|
+
d.pastParticipants[j] = $root.proto.PastParticipants.toObject(m.pastParticipants[j], o);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
if (m.callLogRecords && m.callLogRecords.length) {
|
|
529
|
+
d.callLogRecords = [];
|
|
530
|
+
for (var j = 0; j < m.callLogRecords.length; ++j) {
|
|
531
|
+
d.callLogRecords[j] = $root.proto.CallLogRecord.toObject(m.callLogRecords[j], o);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
if (m.aiWaitListState != null && m.hasOwnProperty("aiWaitListState")) {
|
|
535
|
+
d.aiWaitListState = o.enums === String ? $root.proto.HistorySync.BotAIWaitListState[m.aiWaitListState] === undefined ? m.aiWaitListState : $root.proto.HistorySync.BotAIWaitListState[m.aiWaitListState] : m.aiWaitListState;
|
|
536
|
+
if (o.oneofs)
|
|
537
|
+
d._aiWaitListState = "aiWaitListState";
|
|
538
|
+
}
|
|
539
|
+
if (m.phoneNumberToLidMappings && m.phoneNumberToLidMappings.length) {
|
|
540
|
+
d.phoneNumberToLidMappings = [];
|
|
541
|
+
for (var j = 0; j < m.phoneNumberToLidMappings.length; ++j) {
|
|
542
|
+
d.phoneNumberToLidMappings[j] = $root.proto.PhoneNumberToLIDMapping.toObject(m.phoneNumberToLidMappings[j], o);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
if (m.companionMetaNonce != null && m.hasOwnProperty("companionMetaNonce")) {
|
|
546
|
+
d.companionMetaNonce = m.companionMetaNonce;
|
|
547
|
+
if (o.oneofs)
|
|
548
|
+
d._companionMetaNonce = "companionMetaNonce";
|
|
549
|
+
}
|
|
550
|
+
if (m.shareableChatIdentifierEncryptionKey != null && m.hasOwnProperty("shareableChatIdentifierEncryptionKey")) {
|
|
551
|
+
d.shareableChatIdentifierEncryptionKey = o.bytes === String ? $util.base64.encode(m.shareableChatIdentifierEncryptionKey, 0, m.shareableChatIdentifierEncryptionKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.shareableChatIdentifierEncryptionKey) : m.shareableChatIdentifierEncryptionKey;
|
|
552
|
+
if (o.oneofs)
|
|
553
|
+
d._shareableChatIdentifierEncryptionKey = "shareableChatIdentifierEncryptionKey";
|
|
554
|
+
}
|
|
555
|
+
if (m.accounts && m.accounts.length) {
|
|
556
|
+
d.accounts = [];
|
|
557
|
+
for (var j = 0; j < m.accounts.length; ++j) {
|
|
558
|
+
d.accounts[j] = $root.proto.Account.toObject(m.accounts[j], o);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
if (m.nctSalt != null && m.hasOwnProperty("nctSalt")) {
|
|
562
|
+
d.nctSalt = o.bytes === String ? $util.base64.encode(m.nctSalt, 0, m.nctSalt.length) : o.bytes === Array ? Array.prototype.slice.call(m.nctSalt) : m.nctSalt;
|
|
563
|
+
if (o.oneofs)
|
|
564
|
+
d._nctSalt = "nctSalt";
|
|
565
|
+
}
|
|
566
|
+
if (m.inlineContacts && m.inlineContacts.length) {
|
|
567
|
+
d.inlineContacts = [];
|
|
568
|
+
for (var j = 0; j < m.inlineContacts.length; ++j) {
|
|
569
|
+
d.inlineContacts[j] = $root.proto.InlineContact.toObject(m.inlineContacts[j], o);
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
if (m.inlineContactsProvided != null && m.hasOwnProperty("inlineContactsProvided")) {
|
|
573
|
+
d.inlineContactsProvided = m.inlineContactsProvided;
|
|
574
|
+
if (o.oneofs)
|
|
575
|
+
d._inlineContactsProvided = "inlineContactsProvided";
|
|
576
|
+
}
|
|
577
|
+
return d;
|
|
578
|
+
};
|
|
579
|
+
HistorySync.prototype.toJSON = function toJSON() {
|
|
580
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
581
|
+
};
|
|
582
|
+
HistorySync.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
583
|
+
if (typeUrlPrefix === undefined) {
|
|
584
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
585
|
+
}
|
|
586
|
+
return typeUrlPrefix + "/proto.HistorySync";
|
|
587
|
+
};
|
|
588
|
+
$lazy(HistorySync, "BotAIWaitListState", function() {
|
|
589
|
+
const valuesById = {}, values = Object.create(valuesById);
|
|
590
|
+
values[valuesById[0] = "IN_WAITLIST"] = 0;
|
|
591
|
+
values[valuesById[1] = "AI_AVAILABLE"] = 1;
|
|
592
|
+
return values;
|
|
593
|
+
});
|
|
594
|
+
$lazy(HistorySync, "HistorySyncType", function() {
|
|
595
|
+
const valuesById = {}, values = Object.create(valuesById);
|
|
596
|
+
values[valuesById[0] = "INITIAL_BOOTSTRAP"] = 0;
|
|
597
|
+
values[valuesById[1] = "INITIAL_STATUS_V3"] = 1;
|
|
598
|
+
values[valuesById[2] = "FULL"] = 2;
|
|
599
|
+
values[valuesById[3] = "RECENT"] = 3;
|
|
600
|
+
values[valuesById[4] = "PUSH_NAME"] = 4;
|
|
601
|
+
values[valuesById[5] = "NON_BLOCKING_DATA"] = 5;
|
|
602
|
+
values[valuesById[6] = "ON_DEMAND"] = 6;
|
|
603
|
+
return values;
|
|
604
|
+
});
|
|
605
|
+
return HistorySync;
|