@hiroosy/baileys-lite 0.3.3 → 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.
Files changed (242) hide show
  1. package/WAProto/index.js +247 -113252
  2. package/WAProto/parts/ADVDeviceIdentity.part +201 -0
  3. package/WAProto/parts/ADVEncryptionType.part +6 -0
  4. package/WAProto/parts/ADVKeyIndexList.part +201 -0
  5. package/WAProto/parts/ADVSignedDeviceIdentity.part +150 -0
  6. package/WAProto/parts/ADVSignedDeviceIdentityHMAC.part +142 -0
  7. package/WAProto/parts/ADVSignedKeyIndexList.part +128 -0
  8. package/WAProto/parts/AIHomeState.part +405 -0
  9. package/WAProto/parts/AIMediaCollectionMessage.part +119 -0
  10. package/WAProto/parts/AIMediaCollectionMetadata.part +100 -0
  11. package/WAProto/parts/AIMetadataOperation.part +83 -0
  12. package/WAProto/parts/AIQueryFanout.part +133 -0
  13. package/WAProto/parts/AIRegenerateMetadata.part +112 -0
  14. package/WAProto/parts/AIRichResponseCodeMetadata.part +252 -0
  15. package/WAProto/parts/AIRichResponseContentItemsMetadata.part +354 -0
  16. package/WAProto/parts/AIRichResponseDynamicMetadata.part +172 -0
  17. package/WAProto/parts/AIRichResponseGridImageMetadata.part +114 -0
  18. package/WAProto/parts/AIRichResponseImageURL.part +119 -0
  19. package/WAProto/parts/AIRichResponseInlineImageMetadata.part +164 -0
  20. package/WAProto/parts/AIRichResponseLatexMetadata.part +346 -0
  21. package/WAProto/parts/AIRichResponseMapMetadata.part +346 -0
  22. package/WAProto/parts/AIRichResponseMessage.part +167 -0
  23. package/WAProto/parts/AIRichResponseMessageType.part +5 -0
  24. package/WAProto/parts/AIRichResponseSubMessage.part +313 -0
  25. package/WAProto/parts/AIRichResponseSubMessageType.part +13 -0
  26. package/WAProto/parts/AIRichResponseTableMetadata.part +223 -0
  27. package/WAProto/parts/AIRichResponseUnifiedResponse.part +84 -0
  28. package/WAProto/parts/AISubscriptionRequestType.part +7 -0
  29. package/WAProto/parts/AISubscriptionUpsellMetadata.part +102 -0
  30. package/WAProto/parts/AIThreadInfo.part +316 -0
  31. package/WAProto/parts/Account.part +138 -0
  32. package/WAProto/parts/ActionLink.part +100 -0
  33. package/WAProto/parts/AutoDownloadSettings.part +138 -0
  34. package/WAProto/parts/AvatarUserSettings.part +100 -0
  35. package/WAProto/parts/BizAccountLinkInfo.part +210 -0
  36. package/WAProto/parts/BizAccountPayload.part +105 -0
  37. package/WAProto/parts/BizIdentityInfo.part +298 -0
  38. package/WAProto/parts/BotAgeCollectionMetadata.part +138 -0
  39. package/WAProto/parts/BotAgentDeepLinkMetadata.part +81 -0
  40. package/WAProto/parts/BotAgentMetadata.part +83 -0
  41. package/WAProto/parts/BotCapabilityMetadata.part +437 -0
  42. package/WAProto/parts/BotCommandMetadata.part +119 -0
  43. package/WAProto/parts/BotDocumentMessageMetadata.part +100 -0
  44. package/WAProto/parts/BotFeedbackMessage.part +1366 -0
  45. package/WAProto/parts/BotGroupMetadata.part +92 -0
  46. package/WAProto/parts/BotGroupParticipantMetadata.part +81 -0
  47. package/WAProto/parts/BotImagineMetadata.part +134 -0
  48. package/WAProto/parts/BotInfrastructureDiagnostics.part +148 -0
  49. package/WAProto/parts/BotLinkedAccount.part +95 -0
  50. package/WAProto/parts/BotLinkedAccountsMetadata.part +134 -0
  51. package/WAProto/parts/BotMediaMetadata.part +229 -0
  52. package/WAProto/parts/BotMemoryFact.part +100 -0
  53. package/WAProto/parts/BotMemoryMetadata.part +141 -0
  54. package/WAProto/parts/BotMemuMetadata.part +92 -0
  55. package/WAProto/parts/BotMessageOrigin.part +95 -0
  56. package/WAProto/parts/BotMessageOriginMetadata.part +92 -0
  57. package/WAProto/parts/BotMessageSharingInfo.part +297 -0
  58. package/WAProto/parts/BotMetadata.part +934 -0
  59. package/WAProto/parts/BotMetricsEntryPoint.part +51 -0
  60. package/WAProto/parts/BotMetricsMetadata.part +341 -0
  61. package/WAProto/parts/BotMetricsThreadEntryPoint.part +8 -0
  62. package/WAProto/parts/BotModeSelectionMetadata.part +151 -0
  63. package/WAProto/parts/BotModelMetadata.part +167 -0
  64. package/WAProto/parts/BotPluginMetadata.part +379 -0
  65. package/WAProto/parts/BotProgressIndicatorMetadata.part +837 -0
  66. package/WAProto/parts/BotPromotionMessageMetadata.part +124 -0
  67. package/WAProto/parts/BotPromptSuggestion.part +100 -0
  68. package/WAProto/parts/BotPromptSuggestions.part +92 -0
  69. package/WAProto/parts/BotPttPromptMetadata.part +81 -0
  70. package/WAProto/parts/BotQuotaMetadata.part +241 -0
  71. package/WAProto/parts/BotReminderMetadata.part +232 -0
  72. package/WAProto/parts/BotRenderingConfigMetadata.part +100 -0
  73. package/WAProto/parts/BotRenderingMetadata.part +203 -0
  74. package/WAProto/parts/BotResolvedToolCallMetadata.part +100 -0
  75. package/WAProto/parts/BotSessionMetadata.part +137 -0
  76. package/WAProto/parts/BotSessionSource.part +11 -0
  77. package/WAProto/parts/BotSignatureVerificationMetadata.part +92 -0
  78. package/WAProto/parts/BotSignatureVerificationUseCaseProof.part +183 -0
  79. package/WAProto/parts/BotSourcesMetadata.part +322 -0
  80. package/WAProto/parts/BotSuggestedPromptMetadata.part +150 -0
  81. package/WAProto/parts/BotUnifiedResponseMutation.part +339 -0
  82. package/WAProto/parts/CallLogRecord.part +646 -0
  83. package/WAProto/parts/CertChain.part +392 -0
  84. package/WAProto/parts/ChatLockSettings.part +102 -0
  85. package/WAProto/parts/ChatRowOpaqueData.part +712 -0
  86. package/WAProto/parts/Citation.part +119 -0
  87. package/WAProto/parts/ClientPairingProps.part +160 -0
  88. package/WAProto/parts/ClientPayload.part +2892 -0
  89. package/WAProto/parts/CollectionName.part +9 -0
  90. package/WAProto/parts/CommentMetadata.part +102 -0
  91. package/WAProto/parts/CompanionCommitment.part +84 -0
  92. package/WAProto/parts/CompanionEphemeralIdentity.part +227 -0
  93. package/WAProto/parts/Config.part +136 -0
  94. package/WAProto/parts/ContextInfo.part +4137 -0
  95. package/WAProto/parts/Conversation.part +1472 -0
  96. package/WAProto/parts/DeviceCapabilities.part +670 -0
  97. package/WAProto/parts/DeviceConsistencyCodeMessage.part +103 -0
  98. package/WAProto/parts/DeviceListMetadata.part +306 -0
  99. package/WAProto/parts/DeviceProps.part +982 -0
  100. package/WAProto/parts/DisappearingMode.part +206 -0
  101. package/WAProto/parts/EmbeddedContent.part +100 -0
  102. package/WAProto/parts/EmbeddedMessage.part +102 -0
  103. package/WAProto/parts/EmbeddedMusic.part +370 -0
  104. package/WAProto/parts/EncryptedPairingRequest.part +106 -0
  105. package/WAProto/parts/EphemeralSetting.part +110 -0
  106. package/WAProto/parts/EventAdditionalMetadata.part +81 -0
  107. package/WAProto/parts/EventResponse.part +152 -0
  108. package/WAProto/parts/ExitCode.part +110 -0
  109. package/WAProto/parts/ExternalBlobReference.part +195 -0
  110. package/WAProto/parts/Field.part +193 -0
  111. package/WAProto/parts/ForwardedAIBotMessageInfo.part +119 -0
  112. package/WAProto/parts/GlobalSettings.part +497 -0
  113. package/WAProto/parts/GroupHistoryBundleInfo.part +141 -0
  114. package/WAProto/parts/GroupHistoryIndividualMessageInfo.part +102 -0
  115. package/WAProto/parts/GroupMention.part +100 -0
  116. package/WAProto/parts/GroupParticipant.part +142 -0
  117. package/WAProto/parts/GroupRootKeyShare.part +92 -0
  118. package/WAProto/parts/GroupRootKeyShareEntry.part +161 -0
  119. package/WAProto/parts/HandshakeMessage.part +815 -0
  120. package/WAProto/parts/HatchMetadataSync.part +132 -0
  121. package/WAProto/parts/HistorySync.part +605 -0
  122. package/WAProto/parts/HistorySyncMsg.part +112 -0
  123. package/WAProto/parts/HydratedTemplateButton.part +501 -0
  124. package/WAProto/parts/IdentityKeyPairStructure.part +106 -0
  125. package/WAProto/parts/InThreadSurveyMetadata.part +779 -0
  126. package/WAProto/parts/InlineContact.part +157 -0
  127. package/WAProto/parts/InteractiveAnnotation.part +246 -0
  128. package/WAProto/parts/InteractiveMessageAdditionalMetadata.part +81 -0
  129. package/WAProto/parts/KeepInChat.part +225 -0
  130. package/WAProto/parts/KeepType.part +6 -0
  131. package/WAProto/parts/KeyExchangeMessage.part +169 -0
  132. package/WAProto/parts/KeyId.part +84 -0
  133. package/WAProto/parts/LIDMigrationMapping.part +149 -0
  134. package/WAProto/parts/LIDMigrationMappingSyncMessage.part +84 -0
  135. package/WAProto/parts/LIDMigrationMappingSyncPayload.part +122 -0
  136. package/WAProto/parts/LegacyMessage.part +104 -0
  137. package/WAProto/parts/LimitSharing.part +177 -0
  138. package/WAProto/parts/LocalizedName.part +119 -0
  139. package/WAProto/parts/Location.part +119 -0
  140. package/WAProto/parts/MediaData.part +81 -0
  141. package/WAProto/parts/MediaDomainInfo.part +120 -0
  142. package/WAProto/parts/MediaKeyDomain.part +6 -0
  143. package/WAProto/parts/MediaNotifyMessage.part +132 -0
  144. package/WAProto/parts/MediaRetryNotification.part +170 -0
  145. package/WAProto/parts/MediaVisibility.part +6 -0
  146. package/WAProto/parts/MemberLabel.part +110 -0
  147. package/WAProto/parts/Message.part +32376 -0
  148. package/WAProto/parts/MessageAddOn.part +305 -0
  149. package/WAProto/parts/MessageAddOnContextInfo.part +113 -0
  150. package/WAProto/parts/MessageAssociation.part +235 -0
  151. package/WAProto/parts/MessageContextInfo.part +451 -0
  152. package/WAProto/parts/MessageKey.part +138 -0
  153. package/WAProto/parts/MessageSecretMessage.part +125 -0
  154. package/WAProto/parts/Money.part +129 -0
  155. package/WAProto/parts/MsgOpaqueData.part +1732 -0
  156. package/WAProto/parts/MsgRowOpaqueData.part +104 -0
  157. package/WAProto/parts/MutationProps.part +89 -0
  158. package/WAProto/parts/NoiseCertificate.part +277 -0
  159. package/WAProto/parts/NotificationMessageInfo.part +152 -0
  160. package/WAProto/parts/NotificationSettings.part +176 -0
  161. package/WAProto/parts/PairingRequest.part +128 -0
  162. package/WAProto/parts/PastParticipant.part +148 -0
  163. package/WAProto/parts/PastParticipants.part +112 -0
  164. package/WAProto/parts/PatchDebugData.part +358 -0
  165. package/WAProto/parts/PaymentBackground.part +460 -0
  166. package/WAProto/parts/PaymentInfo.part +602 -0
  167. package/WAProto/parts/PhoneNumberToLIDMapping.part +100 -0
  168. package/WAProto/parts/PhotoChange.part +125 -0
  169. package/WAProto/parts/PinInChat.part +205 -0
  170. package/WAProto/parts/Point.part +138 -0
  171. package/WAProto/parts/PollAdditionalMetadata.part +216 -0
  172. package/WAProto/parts/PollEncValue.part +106 -0
  173. package/WAProto/parts/PollUpdate.part +202 -0
  174. package/WAProto/parts/PreKeyRecordStructure.part +125 -0
  175. package/WAProto/parts/PreKeySignalMessage.part +185 -0
  176. package/WAProto/parts/PremiumMessageInfo.part +81 -0
  177. package/WAProto/parts/PrimaryEphemeralIdentity.part +106 -0
  178. package/WAProto/parts/PrivacySystemMessage.part +6 -0
  179. package/WAProto/parts/ProcessedVideo.part +266 -0
  180. package/WAProto/parts/ProloguePayload.part +105 -0
  181. package/WAProto/parts/Pushname.part +100 -0
  182. package/WAProto/parts/QuarantinedMessage.part +103 -0
  183. package/WAProto/parts/Reaction.part +169 -0
  184. package/WAProto/parts/RecentEmojiWeight.part +100 -0
  185. package/WAProto/parts/RecordStructure.part +114 -0
  186. package/WAProto/parts/Reportable.part +138 -0
  187. package/WAProto/parts/ReportingTokenInfo.part +84 -0
  188. package/WAProto/parts/ScheduledMessageMetadata.part +132 -0
  189. package/WAProto/parts/SenderKeyDistributionMessage.part +144 -0
  190. package/WAProto/parts/SenderKeyMessage.part +122 -0
  191. package/WAProto/parts/SenderKeyRecordStructure.part +92 -0
  192. package/WAProto/parts/SenderKeyStateStructure.part +469 -0
  193. package/WAProto/parts/ServerErrorReceipt.part +81 -0
  194. package/WAProto/parts/SessionStructure.part +1087 -0
  195. package/WAProto/parts/SessionTransparencyMetadata.part +132 -0
  196. package/WAProto/parts/SessionTransparencyType.part +5 -0
  197. package/WAProto/parts/SignalMessage.part +144 -0
  198. package/WAProto/parts/SignedPreKeyRecordStructure.part +176 -0
  199. package/WAProto/parts/StatusAttribution.part +1235 -0
  200. package/WAProto/parts/StatusMentionMessage.part +83 -0
  201. package/WAProto/parts/StatusPSA.part +121 -0
  202. package/WAProto/parts/StickerMetadata.part +357 -0
  203. package/WAProto/parts/SyncActionData.part +146 -0
  204. package/WAProto/parts/SyncActionValue.part +12959 -0
  205. package/WAProto/parts/SyncdIndex.part +84 -0
  206. package/WAProto/parts/SyncdMutation.part +121 -0
  207. package/WAProto/parts/SyncdMutations.part +92 -0
  208. package/WAProto/parts/SyncdPatch.part +262 -0
  209. package/WAProto/parts/SyncdRecord.part +125 -0
  210. package/WAProto/parts/SyncdSnapshot.part +157 -0
  211. package/WAProto/parts/SyncdValue.part +84 -0
  212. package/WAProto/parts/SyncdVersion.part +91 -0
  213. package/WAProto/parts/TapLinkAction.part +100 -0
  214. package/WAProto/parts/TemplateButton.part +449 -0
  215. package/WAProto/parts/ThreadID.part +126 -0
  216. package/WAProto/parts/UrlTrackingMap.part +231 -0
  217. package/WAProto/parts/UserPassword.part +399 -0
  218. package/WAProto/parts/UserReceipt.part +221 -0
  219. package/WAProto/parts/VerifiedNameCertificate.part +318 -0
  220. package/WAProto/parts/WallpaperSettings.part +119 -0
  221. package/WAProto/parts/WebFeatures.part +1870 -0
  222. package/WAProto/parts/WebLinkRenderConfig.part +5 -0
  223. package/WAProto/parts/WebMessageInfo.part +2851 -0
  224. package/WAProto/parts/WebNotificationsInfo.part +160 -0
  225. package/package.json +1 -1
  226. package/src/binary/wa-binary.js +4 -2
  227. package/src/defaults.js +2 -1
  228. package/src/foundation/cache.js +99 -24
  229. package/src/foundation/memory.js +103 -0
  230. package/src/signal/libsignal.js +1 -8
  231. package/src/signal/signal-repository.js +6 -4
  232. package/src/socket/chats.js +2 -0
  233. package/src/socket/messages-recv.js +5 -3
  234. package/src/socket/messages-send.js +2 -2
  235. package/src/socket/socket-core.js +3 -0
  236. package/src/utils/auth-state-core.js +2 -1
  237. package/src/utils/chat-sync.js +4 -0
  238. package/src/utils/media.js +13 -8
  239. package/src/utils/message-processing.js +22 -6
  240. package/src/utils/wa-protocol-core.js +6 -5
  241. package/src/wam/wam-constants.js +22 -22851
  242. package/src/wam/wam-data.json +1 -0
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ function ForwardedAIBotMessageInfo(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
+ ForwardedAIBotMessageInfo.prototype.botName = null;
9
+ ForwardedAIBotMessageInfo.prototype.botJid = null;
10
+ ForwardedAIBotMessageInfo.prototype.creatorName = null;
11
+ let $oneOfFields;
12
+ Object.defineProperty(ForwardedAIBotMessageInfo.prototype, "_botName", {
13
+ get: $util.oneOfGetter($oneOfFields = ["botName"]),
14
+ set: $util.oneOfSetter($oneOfFields)
15
+ });
16
+ Object.defineProperty(ForwardedAIBotMessageInfo.prototype, "_botJid", {
17
+ get: $util.oneOfGetter($oneOfFields = ["botJid"]),
18
+ set: $util.oneOfSetter($oneOfFields)
19
+ });
20
+ Object.defineProperty(ForwardedAIBotMessageInfo.prototype, "_creatorName", {
21
+ get: $util.oneOfGetter($oneOfFields = ["creatorName"]),
22
+ set: $util.oneOfSetter($oneOfFields)
23
+ });
24
+ ForwardedAIBotMessageInfo.create = function create(properties) {
25
+ return new ForwardedAIBotMessageInfo(properties);
26
+ };
27
+ ForwardedAIBotMessageInfo.encode = function encode(m, w) {
28
+ if (!w)
29
+ w = $Writer.create();
30
+ if (m.botName != null && Object.hasOwnProperty.call(m, "botName"))
31
+ w.uint32(10).string(m.botName);
32
+ if (m.botJid != null && Object.hasOwnProperty.call(m, "botJid"))
33
+ w.uint32(18).string(m.botJid);
34
+ if (m.creatorName != null && Object.hasOwnProperty.call(m, "creatorName"))
35
+ w.uint32(26).string(m.creatorName);
36
+ return w;
37
+ };
38
+ ForwardedAIBotMessageInfo.decode = function decode(r, l, e, n) {
39
+ if (!(r instanceof $Reader))
40
+ r = $Reader.create(r);
41
+ if (n === undefined)
42
+ n = 0;
43
+ if (n > $Reader.recursionLimit)
44
+ throw Error("maximum nesting depth exceeded");
45
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.ForwardedAIBotMessageInfo();
46
+ while (r.pos < c) {
47
+ var t = r.uint32();
48
+ if (t === e)
49
+ break;
50
+ switch (t >>> 3) {
51
+ case 1: {
52
+ m.botName = r.string();
53
+ break;
54
+ }
55
+ case 2: {
56
+ m.botJid = r.string();
57
+ break;
58
+ }
59
+ case 3: {
60
+ m.creatorName = r.string();
61
+ break;
62
+ }
63
+ default:
64
+ r.skipType(t & 7, n);
65
+ break;
66
+ }
67
+ }
68
+ return m;
69
+ };
70
+ ForwardedAIBotMessageInfo.fromObject = function fromObject(d, n) {
71
+ if (d instanceof $root.proto.ForwardedAIBotMessageInfo)
72
+ return d;
73
+ if (n === undefined)
74
+ n = 0;
75
+ if (n > $util.recursionLimit)
76
+ throw Error("maximum nesting depth exceeded");
77
+ var m = new $root.proto.ForwardedAIBotMessageInfo();
78
+ if (d.botName != null) {
79
+ m.botName = String(d.botName);
80
+ }
81
+ if (d.botJid != null) {
82
+ m.botJid = String(d.botJid);
83
+ }
84
+ if (d.creatorName != null) {
85
+ m.creatorName = String(d.creatorName);
86
+ }
87
+ return m;
88
+ };
89
+ ForwardedAIBotMessageInfo.toObject = function toObject(m, o) {
90
+ if (!o)
91
+ o = {};
92
+ var d = {};
93
+ if (m.botName != null && m.hasOwnProperty("botName")) {
94
+ d.botName = m.botName;
95
+ if (o.oneofs)
96
+ d._botName = "botName";
97
+ }
98
+ if (m.botJid != null && m.hasOwnProperty("botJid")) {
99
+ d.botJid = m.botJid;
100
+ if (o.oneofs)
101
+ d._botJid = "botJid";
102
+ }
103
+ if (m.creatorName != null && m.hasOwnProperty("creatorName")) {
104
+ d.creatorName = m.creatorName;
105
+ if (o.oneofs)
106
+ d._creatorName = "creatorName";
107
+ }
108
+ return d;
109
+ };
110
+ ForwardedAIBotMessageInfo.prototype.toJSON = function toJSON() {
111
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
112
+ };
113
+ ForwardedAIBotMessageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
114
+ if (typeUrlPrefix === undefined) {
115
+ typeUrlPrefix = "type.googleapis.com";
116
+ }
117
+ return typeUrlPrefix + "/proto.ForwardedAIBotMessageInfo";
118
+ };
119
+ return ForwardedAIBotMessageInfo;
@@ -0,0 +1,497 @@
1
+ "use strict";
2
+ function GlobalSettings(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
+ GlobalSettings.prototype.lightThemeWallpaper = null;
9
+ GlobalSettings.prototype.mediaVisibility = null;
10
+ GlobalSettings.prototype.darkThemeWallpaper = null;
11
+ GlobalSettings.prototype.autoDownloadWiFi = null;
12
+ GlobalSettings.prototype.autoDownloadCellular = null;
13
+ GlobalSettings.prototype.autoDownloadRoaming = null;
14
+ GlobalSettings.prototype.showIndividualNotificationsPreview = null;
15
+ GlobalSettings.prototype.showGroupNotificationsPreview = null;
16
+ GlobalSettings.prototype.disappearingModeDuration = null;
17
+ GlobalSettings.prototype.disappearingModeTimestamp = null;
18
+ GlobalSettings.prototype.avatarUserSettings = null;
19
+ GlobalSettings.prototype.fontSize = null;
20
+ GlobalSettings.prototype.securityNotifications = null;
21
+ GlobalSettings.prototype.autoUnarchiveChats = null;
22
+ GlobalSettings.prototype.videoQualityMode = null;
23
+ GlobalSettings.prototype.photoQualityMode = null;
24
+ GlobalSettings.prototype.individualNotificationSettings = null;
25
+ GlobalSettings.prototype.groupNotificationSettings = null;
26
+ GlobalSettings.prototype.chatLockSettings = null;
27
+ GlobalSettings.prototype.chatDbLidMigrationTimestamp = null;
28
+ let $oneOfFields;
29
+ Object.defineProperty(GlobalSettings.prototype, "_lightThemeWallpaper", {
30
+ get: $util.oneOfGetter($oneOfFields = ["lightThemeWallpaper"]),
31
+ set: $util.oneOfSetter($oneOfFields)
32
+ });
33
+ Object.defineProperty(GlobalSettings.prototype, "_mediaVisibility", {
34
+ get: $util.oneOfGetter($oneOfFields = ["mediaVisibility"]),
35
+ set: $util.oneOfSetter($oneOfFields)
36
+ });
37
+ Object.defineProperty(GlobalSettings.prototype, "_darkThemeWallpaper", {
38
+ get: $util.oneOfGetter($oneOfFields = ["darkThemeWallpaper"]),
39
+ set: $util.oneOfSetter($oneOfFields)
40
+ });
41
+ Object.defineProperty(GlobalSettings.prototype, "_autoDownloadWiFi", {
42
+ get: $util.oneOfGetter($oneOfFields = ["autoDownloadWiFi"]),
43
+ set: $util.oneOfSetter($oneOfFields)
44
+ });
45
+ Object.defineProperty(GlobalSettings.prototype, "_autoDownloadCellular", {
46
+ get: $util.oneOfGetter($oneOfFields = ["autoDownloadCellular"]),
47
+ set: $util.oneOfSetter($oneOfFields)
48
+ });
49
+ Object.defineProperty(GlobalSettings.prototype, "_autoDownloadRoaming", {
50
+ get: $util.oneOfGetter($oneOfFields = ["autoDownloadRoaming"]),
51
+ set: $util.oneOfSetter($oneOfFields)
52
+ });
53
+ Object.defineProperty(GlobalSettings.prototype, "_showIndividualNotificationsPreview", {
54
+ get: $util.oneOfGetter($oneOfFields = ["showIndividualNotificationsPreview"]),
55
+ set: $util.oneOfSetter($oneOfFields)
56
+ });
57
+ Object.defineProperty(GlobalSettings.prototype, "_showGroupNotificationsPreview", {
58
+ get: $util.oneOfGetter($oneOfFields = ["showGroupNotificationsPreview"]),
59
+ set: $util.oneOfSetter($oneOfFields)
60
+ });
61
+ Object.defineProperty(GlobalSettings.prototype, "_disappearingModeDuration", {
62
+ get: $util.oneOfGetter($oneOfFields = ["disappearingModeDuration"]),
63
+ set: $util.oneOfSetter($oneOfFields)
64
+ });
65
+ Object.defineProperty(GlobalSettings.prototype, "_disappearingModeTimestamp", {
66
+ get: $util.oneOfGetter($oneOfFields = ["disappearingModeTimestamp"]),
67
+ set: $util.oneOfSetter($oneOfFields)
68
+ });
69
+ Object.defineProperty(GlobalSettings.prototype, "_avatarUserSettings", {
70
+ get: $util.oneOfGetter($oneOfFields = ["avatarUserSettings"]),
71
+ set: $util.oneOfSetter($oneOfFields)
72
+ });
73
+ Object.defineProperty(GlobalSettings.prototype, "_fontSize", {
74
+ get: $util.oneOfGetter($oneOfFields = ["fontSize"]),
75
+ set: $util.oneOfSetter($oneOfFields)
76
+ });
77
+ Object.defineProperty(GlobalSettings.prototype, "_securityNotifications", {
78
+ get: $util.oneOfGetter($oneOfFields = ["securityNotifications"]),
79
+ set: $util.oneOfSetter($oneOfFields)
80
+ });
81
+ Object.defineProperty(GlobalSettings.prototype, "_autoUnarchiveChats", {
82
+ get: $util.oneOfGetter($oneOfFields = ["autoUnarchiveChats"]),
83
+ set: $util.oneOfSetter($oneOfFields)
84
+ });
85
+ Object.defineProperty(GlobalSettings.prototype, "_videoQualityMode", {
86
+ get: $util.oneOfGetter($oneOfFields = ["videoQualityMode"]),
87
+ set: $util.oneOfSetter($oneOfFields)
88
+ });
89
+ Object.defineProperty(GlobalSettings.prototype, "_photoQualityMode", {
90
+ get: $util.oneOfGetter($oneOfFields = ["photoQualityMode"]),
91
+ set: $util.oneOfSetter($oneOfFields)
92
+ });
93
+ Object.defineProperty(GlobalSettings.prototype, "_individualNotificationSettings", {
94
+ get: $util.oneOfGetter($oneOfFields = ["individualNotificationSettings"]),
95
+ set: $util.oneOfSetter($oneOfFields)
96
+ });
97
+ Object.defineProperty(GlobalSettings.prototype, "_groupNotificationSettings", {
98
+ get: $util.oneOfGetter($oneOfFields = ["groupNotificationSettings"]),
99
+ set: $util.oneOfSetter($oneOfFields)
100
+ });
101
+ Object.defineProperty(GlobalSettings.prototype, "_chatLockSettings", {
102
+ get: $util.oneOfGetter($oneOfFields = ["chatLockSettings"]),
103
+ set: $util.oneOfSetter($oneOfFields)
104
+ });
105
+ Object.defineProperty(GlobalSettings.prototype, "_chatDbLidMigrationTimestamp", {
106
+ get: $util.oneOfGetter($oneOfFields = ["chatDbLidMigrationTimestamp"]),
107
+ set: $util.oneOfSetter($oneOfFields)
108
+ });
109
+ GlobalSettings.create = function create(properties) {
110
+ return new GlobalSettings(properties);
111
+ };
112
+ GlobalSettings.encode = function encode(m, w) {
113
+ if (!w)
114
+ w = $Writer.create();
115
+ if (m.lightThemeWallpaper != null && Object.hasOwnProperty.call(m, "lightThemeWallpaper"))
116
+ $root.proto.WallpaperSettings.encode(m.lightThemeWallpaper, w.uint32(10).fork()).ldelim();
117
+ if (m.mediaVisibility != null && Object.hasOwnProperty.call(m, "mediaVisibility"))
118
+ w.uint32(16).int32(m.mediaVisibility);
119
+ if (m.darkThemeWallpaper != null && Object.hasOwnProperty.call(m, "darkThemeWallpaper"))
120
+ $root.proto.WallpaperSettings.encode(m.darkThemeWallpaper, w.uint32(26).fork()).ldelim();
121
+ if (m.autoDownloadWiFi != null && Object.hasOwnProperty.call(m, "autoDownloadWiFi"))
122
+ $root.proto.AutoDownloadSettings.encode(m.autoDownloadWiFi, w.uint32(34).fork()).ldelim();
123
+ if (m.autoDownloadCellular != null && Object.hasOwnProperty.call(m, "autoDownloadCellular"))
124
+ $root.proto.AutoDownloadSettings.encode(m.autoDownloadCellular, w.uint32(42).fork()).ldelim();
125
+ if (m.autoDownloadRoaming != null && Object.hasOwnProperty.call(m, "autoDownloadRoaming"))
126
+ $root.proto.AutoDownloadSettings.encode(m.autoDownloadRoaming, w.uint32(50).fork()).ldelim();
127
+ if (m.showIndividualNotificationsPreview != null && Object.hasOwnProperty.call(m, "showIndividualNotificationsPreview"))
128
+ w.uint32(56).bool(m.showIndividualNotificationsPreview);
129
+ if (m.showGroupNotificationsPreview != null && Object.hasOwnProperty.call(m, "showGroupNotificationsPreview"))
130
+ w.uint32(64).bool(m.showGroupNotificationsPreview);
131
+ if (m.disappearingModeDuration != null && Object.hasOwnProperty.call(m, "disappearingModeDuration"))
132
+ w.uint32(72).int32(m.disappearingModeDuration);
133
+ if (m.disappearingModeTimestamp != null && Object.hasOwnProperty.call(m, "disappearingModeTimestamp"))
134
+ w.uint32(80).int64(m.disappearingModeTimestamp);
135
+ if (m.avatarUserSettings != null && Object.hasOwnProperty.call(m, "avatarUserSettings"))
136
+ $root.proto.AvatarUserSettings.encode(m.avatarUserSettings, w.uint32(90).fork()).ldelim();
137
+ if (m.fontSize != null && Object.hasOwnProperty.call(m, "fontSize"))
138
+ w.uint32(96).int32(m.fontSize);
139
+ if (m.securityNotifications != null && Object.hasOwnProperty.call(m, "securityNotifications"))
140
+ w.uint32(104).bool(m.securityNotifications);
141
+ if (m.autoUnarchiveChats != null && Object.hasOwnProperty.call(m, "autoUnarchiveChats"))
142
+ w.uint32(112).bool(m.autoUnarchiveChats);
143
+ if (m.videoQualityMode != null && Object.hasOwnProperty.call(m, "videoQualityMode"))
144
+ w.uint32(120).int32(m.videoQualityMode);
145
+ if (m.photoQualityMode != null && Object.hasOwnProperty.call(m, "photoQualityMode"))
146
+ w.uint32(128).int32(m.photoQualityMode);
147
+ if (m.individualNotificationSettings != null && Object.hasOwnProperty.call(m, "individualNotificationSettings"))
148
+ $root.proto.NotificationSettings.encode(m.individualNotificationSettings, w.uint32(138).fork()).ldelim();
149
+ if (m.groupNotificationSettings != null && Object.hasOwnProperty.call(m, "groupNotificationSettings"))
150
+ $root.proto.NotificationSettings.encode(m.groupNotificationSettings, w.uint32(146).fork()).ldelim();
151
+ if (m.chatLockSettings != null && Object.hasOwnProperty.call(m, "chatLockSettings"))
152
+ $root.proto.ChatLockSettings.encode(m.chatLockSettings, w.uint32(154).fork()).ldelim();
153
+ if (m.chatDbLidMigrationTimestamp != null && Object.hasOwnProperty.call(m, "chatDbLidMigrationTimestamp"))
154
+ w.uint32(160).int64(m.chatDbLidMigrationTimestamp);
155
+ return w;
156
+ };
157
+ GlobalSettings.decode = function decode(r, l, e, n) {
158
+ if (!(r instanceof $Reader))
159
+ r = $Reader.create(r);
160
+ if (n === undefined)
161
+ n = 0;
162
+ if (n > $Reader.recursionLimit)
163
+ throw Error("maximum nesting depth exceeded");
164
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.GlobalSettings();
165
+ while (r.pos < c) {
166
+ var t = r.uint32();
167
+ if (t === e)
168
+ break;
169
+ switch (t >>> 3) {
170
+ case 1: {
171
+ m.lightThemeWallpaper = $root.proto.WallpaperSettings.decode(r, r.uint32(), undefined, n + 1);
172
+ break;
173
+ }
174
+ case 2: {
175
+ m.mediaVisibility = r.int32();
176
+ break;
177
+ }
178
+ case 3: {
179
+ m.darkThemeWallpaper = $root.proto.WallpaperSettings.decode(r, r.uint32(), undefined, n + 1);
180
+ break;
181
+ }
182
+ case 4: {
183
+ m.autoDownloadWiFi = $root.proto.AutoDownloadSettings.decode(r, r.uint32(), undefined, n + 1);
184
+ break;
185
+ }
186
+ case 5: {
187
+ m.autoDownloadCellular = $root.proto.AutoDownloadSettings.decode(r, r.uint32(), undefined, n + 1);
188
+ break;
189
+ }
190
+ case 6: {
191
+ m.autoDownloadRoaming = $root.proto.AutoDownloadSettings.decode(r, r.uint32(), undefined, n + 1);
192
+ break;
193
+ }
194
+ case 7: {
195
+ m.showIndividualNotificationsPreview = r.bool();
196
+ break;
197
+ }
198
+ case 8: {
199
+ m.showGroupNotificationsPreview = r.bool();
200
+ break;
201
+ }
202
+ case 9: {
203
+ m.disappearingModeDuration = r.int32();
204
+ break;
205
+ }
206
+ case 10: {
207
+ m.disappearingModeTimestamp = r.int64();
208
+ break;
209
+ }
210
+ case 11: {
211
+ m.avatarUserSettings = $root.proto.AvatarUserSettings.decode(r, r.uint32(), undefined, n + 1);
212
+ break;
213
+ }
214
+ case 12: {
215
+ m.fontSize = r.int32();
216
+ break;
217
+ }
218
+ case 13: {
219
+ m.securityNotifications = r.bool();
220
+ break;
221
+ }
222
+ case 14: {
223
+ m.autoUnarchiveChats = r.bool();
224
+ break;
225
+ }
226
+ case 15: {
227
+ m.videoQualityMode = r.int32();
228
+ break;
229
+ }
230
+ case 16: {
231
+ m.photoQualityMode = r.int32();
232
+ break;
233
+ }
234
+ case 17: {
235
+ m.individualNotificationSettings = $root.proto.NotificationSettings.decode(r, r.uint32(), undefined, n + 1);
236
+ break;
237
+ }
238
+ case 18: {
239
+ m.groupNotificationSettings = $root.proto.NotificationSettings.decode(r, r.uint32(), undefined, n + 1);
240
+ break;
241
+ }
242
+ case 19: {
243
+ m.chatLockSettings = $root.proto.ChatLockSettings.decode(r, r.uint32(), undefined, n + 1);
244
+ break;
245
+ }
246
+ case 20: {
247
+ m.chatDbLidMigrationTimestamp = r.int64();
248
+ break;
249
+ }
250
+ default:
251
+ r.skipType(t & 7, n);
252
+ break;
253
+ }
254
+ }
255
+ return m;
256
+ };
257
+ GlobalSettings.fromObject = function fromObject(d, n) {
258
+ if (d instanceof $root.proto.GlobalSettings)
259
+ return d;
260
+ if (n === undefined)
261
+ n = 0;
262
+ if (n > $util.recursionLimit)
263
+ throw Error("maximum nesting depth exceeded");
264
+ var m = new $root.proto.GlobalSettings();
265
+ if (d.lightThemeWallpaper != null) {
266
+ if (typeof d.lightThemeWallpaper !== "object")
267
+ throw TypeError(".proto.GlobalSettings.lightThemeWallpaper: object expected");
268
+ m.lightThemeWallpaper = $root.proto.WallpaperSettings.fromObject(d.lightThemeWallpaper, n + 1);
269
+ }
270
+ switch (d.mediaVisibility) {
271
+ default:
272
+ if (typeof d.mediaVisibility === "number") {
273
+ m.mediaVisibility = d.mediaVisibility;
274
+ break;
275
+ }
276
+ break;
277
+ case "DEFAULT":
278
+ case 0:
279
+ m.mediaVisibility = 0;
280
+ break;
281
+ case "OFF":
282
+ case 1:
283
+ m.mediaVisibility = 1;
284
+ break;
285
+ case "ON":
286
+ case 2:
287
+ m.mediaVisibility = 2;
288
+ break;
289
+ }
290
+ if (d.darkThemeWallpaper != null) {
291
+ if (typeof d.darkThemeWallpaper !== "object")
292
+ throw TypeError(".proto.GlobalSettings.darkThemeWallpaper: object expected");
293
+ m.darkThemeWallpaper = $root.proto.WallpaperSettings.fromObject(d.darkThemeWallpaper, n + 1);
294
+ }
295
+ if (d.autoDownloadWiFi != null) {
296
+ if (typeof d.autoDownloadWiFi !== "object")
297
+ throw TypeError(".proto.GlobalSettings.autoDownloadWiFi: object expected");
298
+ m.autoDownloadWiFi = $root.proto.AutoDownloadSettings.fromObject(d.autoDownloadWiFi, n + 1);
299
+ }
300
+ if (d.autoDownloadCellular != null) {
301
+ if (typeof d.autoDownloadCellular !== "object")
302
+ throw TypeError(".proto.GlobalSettings.autoDownloadCellular: object expected");
303
+ m.autoDownloadCellular = $root.proto.AutoDownloadSettings.fromObject(d.autoDownloadCellular, n + 1);
304
+ }
305
+ if (d.autoDownloadRoaming != null) {
306
+ if (typeof d.autoDownloadRoaming !== "object")
307
+ throw TypeError(".proto.GlobalSettings.autoDownloadRoaming: object expected");
308
+ m.autoDownloadRoaming = $root.proto.AutoDownloadSettings.fromObject(d.autoDownloadRoaming, n + 1);
309
+ }
310
+ if (d.showIndividualNotificationsPreview != null) {
311
+ m.showIndividualNotificationsPreview = Boolean(d.showIndividualNotificationsPreview);
312
+ }
313
+ if (d.showGroupNotificationsPreview != null) {
314
+ m.showGroupNotificationsPreview = Boolean(d.showGroupNotificationsPreview);
315
+ }
316
+ if (d.disappearingModeDuration != null) {
317
+ m.disappearingModeDuration = d.disappearingModeDuration | 0;
318
+ }
319
+ if (d.disappearingModeTimestamp != null) {
320
+ if ($util.Long)
321
+ (m.disappearingModeTimestamp = $util.Long.fromValue(d.disappearingModeTimestamp)).unsigned = false;
322
+ else if (typeof d.disappearingModeTimestamp === "string")
323
+ m.disappearingModeTimestamp = parseInt(d.disappearingModeTimestamp, 10);
324
+ else if (typeof d.disappearingModeTimestamp === "number")
325
+ m.disappearingModeTimestamp = d.disappearingModeTimestamp;
326
+ else if (typeof d.disappearingModeTimestamp === "object")
327
+ m.disappearingModeTimestamp = new $util.LongBits(d.disappearingModeTimestamp.low >>> 0, d.disappearingModeTimestamp.high >>> 0).toNumber();
328
+ }
329
+ if (d.avatarUserSettings != null) {
330
+ if (typeof d.avatarUserSettings !== "object")
331
+ throw TypeError(".proto.GlobalSettings.avatarUserSettings: object expected");
332
+ m.avatarUserSettings = $root.proto.AvatarUserSettings.fromObject(d.avatarUserSettings, n + 1);
333
+ }
334
+ if (d.fontSize != null) {
335
+ m.fontSize = d.fontSize | 0;
336
+ }
337
+ if (d.securityNotifications != null) {
338
+ m.securityNotifications = Boolean(d.securityNotifications);
339
+ }
340
+ if (d.autoUnarchiveChats != null) {
341
+ m.autoUnarchiveChats = Boolean(d.autoUnarchiveChats);
342
+ }
343
+ if (d.videoQualityMode != null) {
344
+ m.videoQualityMode = d.videoQualityMode | 0;
345
+ }
346
+ if (d.photoQualityMode != null) {
347
+ m.photoQualityMode = d.photoQualityMode | 0;
348
+ }
349
+ if (d.individualNotificationSettings != null) {
350
+ if (typeof d.individualNotificationSettings !== "object")
351
+ throw TypeError(".proto.GlobalSettings.individualNotificationSettings: object expected");
352
+ m.individualNotificationSettings = $root.proto.NotificationSettings.fromObject(d.individualNotificationSettings, n + 1);
353
+ }
354
+ if (d.groupNotificationSettings != null) {
355
+ if (typeof d.groupNotificationSettings !== "object")
356
+ throw TypeError(".proto.GlobalSettings.groupNotificationSettings: object expected");
357
+ m.groupNotificationSettings = $root.proto.NotificationSettings.fromObject(d.groupNotificationSettings, n + 1);
358
+ }
359
+ if (d.chatLockSettings != null) {
360
+ if (typeof d.chatLockSettings !== "object")
361
+ throw TypeError(".proto.GlobalSettings.chatLockSettings: object expected");
362
+ m.chatLockSettings = $root.proto.ChatLockSettings.fromObject(d.chatLockSettings, n + 1);
363
+ }
364
+ if (d.chatDbLidMigrationTimestamp != null) {
365
+ if ($util.Long)
366
+ (m.chatDbLidMigrationTimestamp = $util.Long.fromValue(d.chatDbLidMigrationTimestamp)).unsigned = false;
367
+ else if (typeof d.chatDbLidMigrationTimestamp === "string")
368
+ m.chatDbLidMigrationTimestamp = parseInt(d.chatDbLidMigrationTimestamp, 10);
369
+ else if (typeof d.chatDbLidMigrationTimestamp === "number")
370
+ m.chatDbLidMigrationTimestamp = d.chatDbLidMigrationTimestamp;
371
+ else if (typeof d.chatDbLidMigrationTimestamp === "object")
372
+ m.chatDbLidMigrationTimestamp = new $util.LongBits(d.chatDbLidMigrationTimestamp.low >>> 0, d.chatDbLidMigrationTimestamp.high >>> 0).toNumber();
373
+ }
374
+ return m;
375
+ };
376
+ GlobalSettings.toObject = function toObject(m, o) {
377
+ if (!o)
378
+ o = {};
379
+ var d = {};
380
+ if (m.lightThemeWallpaper != null && m.hasOwnProperty("lightThemeWallpaper")) {
381
+ d.lightThemeWallpaper = $root.proto.WallpaperSettings.toObject(m.lightThemeWallpaper, o);
382
+ if (o.oneofs)
383
+ d._lightThemeWallpaper = "lightThemeWallpaper";
384
+ }
385
+ if (m.mediaVisibility != null && m.hasOwnProperty("mediaVisibility")) {
386
+ d.mediaVisibility = o.enums === String ? $root.proto.MediaVisibility[m.mediaVisibility] === undefined ? m.mediaVisibility : $root.proto.MediaVisibility[m.mediaVisibility] : m.mediaVisibility;
387
+ if (o.oneofs)
388
+ d._mediaVisibility = "mediaVisibility";
389
+ }
390
+ if (m.darkThemeWallpaper != null && m.hasOwnProperty("darkThemeWallpaper")) {
391
+ d.darkThemeWallpaper = $root.proto.WallpaperSettings.toObject(m.darkThemeWallpaper, o);
392
+ if (o.oneofs)
393
+ d._darkThemeWallpaper = "darkThemeWallpaper";
394
+ }
395
+ if (m.autoDownloadWiFi != null && m.hasOwnProperty("autoDownloadWiFi")) {
396
+ d.autoDownloadWiFi = $root.proto.AutoDownloadSettings.toObject(m.autoDownloadWiFi, o);
397
+ if (o.oneofs)
398
+ d._autoDownloadWiFi = "autoDownloadWiFi";
399
+ }
400
+ if (m.autoDownloadCellular != null && m.hasOwnProperty("autoDownloadCellular")) {
401
+ d.autoDownloadCellular = $root.proto.AutoDownloadSettings.toObject(m.autoDownloadCellular, o);
402
+ if (o.oneofs)
403
+ d._autoDownloadCellular = "autoDownloadCellular";
404
+ }
405
+ if (m.autoDownloadRoaming != null && m.hasOwnProperty("autoDownloadRoaming")) {
406
+ d.autoDownloadRoaming = $root.proto.AutoDownloadSettings.toObject(m.autoDownloadRoaming, o);
407
+ if (o.oneofs)
408
+ d._autoDownloadRoaming = "autoDownloadRoaming";
409
+ }
410
+ if (m.showIndividualNotificationsPreview != null && m.hasOwnProperty("showIndividualNotificationsPreview")) {
411
+ d.showIndividualNotificationsPreview = m.showIndividualNotificationsPreview;
412
+ if (o.oneofs)
413
+ d._showIndividualNotificationsPreview = "showIndividualNotificationsPreview";
414
+ }
415
+ if (m.showGroupNotificationsPreview != null && m.hasOwnProperty("showGroupNotificationsPreview")) {
416
+ d.showGroupNotificationsPreview = m.showGroupNotificationsPreview;
417
+ if (o.oneofs)
418
+ d._showGroupNotificationsPreview = "showGroupNotificationsPreview";
419
+ }
420
+ if (m.disappearingModeDuration != null && m.hasOwnProperty("disappearingModeDuration")) {
421
+ d.disappearingModeDuration = m.disappearingModeDuration;
422
+ if (o.oneofs)
423
+ d._disappearingModeDuration = "disappearingModeDuration";
424
+ }
425
+ if (m.disappearingModeTimestamp != null && m.hasOwnProperty("disappearingModeTimestamp")) {
426
+ if (typeof m.disappearingModeTimestamp === "number")
427
+ d.disappearingModeTimestamp = o.longs === String ? String(m.disappearingModeTimestamp) : m.disappearingModeTimestamp;
428
+ else
429
+ d.disappearingModeTimestamp = o.longs === String ? longToString(m.disappearingModeTimestamp) : o.longs === Number ? longToNumber(m.disappearingModeTimestamp) : m.disappearingModeTimestamp;
430
+ if (o.oneofs)
431
+ d._disappearingModeTimestamp = "disappearingModeTimestamp";
432
+ }
433
+ if (m.avatarUserSettings != null && m.hasOwnProperty("avatarUserSettings")) {
434
+ d.avatarUserSettings = $root.proto.AvatarUserSettings.toObject(m.avatarUserSettings, o);
435
+ if (o.oneofs)
436
+ d._avatarUserSettings = "avatarUserSettings";
437
+ }
438
+ if (m.fontSize != null && m.hasOwnProperty("fontSize")) {
439
+ d.fontSize = m.fontSize;
440
+ if (o.oneofs)
441
+ d._fontSize = "fontSize";
442
+ }
443
+ if (m.securityNotifications != null && m.hasOwnProperty("securityNotifications")) {
444
+ d.securityNotifications = m.securityNotifications;
445
+ if (o.oneofs)
446
+ d._securityNotifications = "securityNotifications";
447
+ }
448
+ if (m.autoUnarchiveChats != null && m.hasOwnProperty("autoUnarchiveChats")) {
449
+ d.autoUnarchiveChats = m.autoUnarchiveChats;
450
+ if (o.oneofs)
451
+ d._autoUnarchiveChats = "autoUnarchiveChats";
452
+ }
453
+ if (m.videoQualityMode != null && m.hasOwnProperty("videoQualityMode")) {
454
+ d.videoQualityMode = m.videoQualityMode;
455
+ if (o.oneofs)
456
+ d._videoQualityMode = "videoQualityMode";
457
+ }
458
+ if (m.photoQualityMode != null && m.hasOwnProperty("photoQualityMode")) {
459
+ d.photoQualityMode = m.photoQualityMode;
460
+ if (o.oneofs)
461
+ d._photoQualityMode = "photoQualityMode";
462
+ }
463
+ if (m.individualNotificationSettings != null && m.hasOwnProperty("individualNotificationSettings")) {
464
+ d.individualNotificationSettings = $root.proto.NotificationSettings.toObject(m.individualNotificationSettings, o);
465
+ if (o.oneofs)
466
+ d._individualNotificationSettings = "individualNotificationSettings";
467
+ }
468
+ if (m.groupNotificationSettings != null && m.hasOwnProperty("groupNotificationSettings")) {
469
+ d.groupNotificationSettings = $root.proto.NotificationSettings.toObject(m.groupNotificationSettings, o);
470
+ if (o.oneofs)
471
+ d._groupNotificationSettings = "groupNotificationSettings";
472
+ }
473
+ if (m.chatLockSettings != null && m.hasOwnProperty("chatLockSettings")) {
474
+ d.chatLockSettings = $root.proto.ChatLockSettings.toObject(m.chatLockSettings, o);
475
+ if (o.oneofs)
476
+ d._chatLockSettings = "chatLockSettings";
477
+ }
478
+ if (m.chatDbLidMigrationTimestamp != null && m.hasOwnProperty("chatDbLidMigrationTimestamp")) {
479
+ if (typeof m.chatDbLidMigrationTimestamp === "number")
480
+ d.chatDbLidMigrationTimestamp = o.longs === String ? String(m.chatDbLidMigrationTimestamp) : m.chatDbLidMigrationTimestamp;
481
+ else
482
+ d.chatDbLidMigrationTimestamp = o.longs === String ? longToString(m.chatDbLidMigrationTimestamp) : o.longs === Number ? longToNumber(m.chatDbLidMigrationTimestamp) : m.chatDbLidMigrationTimestamp;
483
+ if (o.oneofs)
484
+ d._chatDbLidMigrationTimestamp = "chatDbLidMigrationTimestamp";
485
+ }
486
+ return d;
487
+ };
488
+ GlobalSettings.prototype.toJSON = function toJSON() {
489
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
490
+ };
491
+ GlobalSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
492
+ if (typeUrlPrefix === undefined) {
493
+ typeUrlPrefix = "type.googleapis.com";
494
+ }
495
+ return typeUrlPrefix + "/proto.GlobalSettings";
496
+ };
497
+ return GlobalSettings;