@tgsnake/skema 3.1.0 → 3.2.1-browser.0
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/README.md +1 -1
- package/dist/src/deps.d.ts +4 -3
- package/dist/src/deps.js +4 -4
- package/dist/src/errors/RpcError.js +3 -1
- package/dist/src/helpers.js +19 -34
- package/dist/src/raw/class/All.d.ts +49 -5
- package/dist/src/raw/class/All.js +2783 -2739
- package/dist/src/raw/class/Raw.d.ts +7856 -7518
- package/dist/src/raw/class/Raw.js +27367 -20433
- package/dist/src/raw/class/tl/account.d.ts +841 -841
- package/dist/src/raw/class/tl/account.js +1983 -1813
- package/dist/src/raw/class/tl/aicompose.d.ts +51 -51
- package/dist/src/raw/class/tl/aicompose.js +128 -117
- package/dist/src/raw/class/tl/auth.d.ts +296 -296
- package/dist/src/raw/class/tl/auth.js +849 -714
- package/dist/src/raw/class/tl/bots.d.ts +353 -232
- package/dist/src/raw/class/tl/bots.js +871 -504
- package/dist/src/raw/class/tl/channels.d.ts +351 -331
- package/dist/src/raw/class/tl/channels.js +873 -735
- package/dist/src/raw/class/tl/chatlists.d.ts +81 -81
- package/dist/src/raw/class/tl/chatlists.js +196 -183
- package/dist/src/raw/class/tl/communities.d.ts +56 -56
- package/dist/src/raw/class/tl/communities.js +159 -138
- package/dist/src/raw/class/tl/contacts.d.ts +216 -216
- package/dist/src/raw/class/tl/contacts.js +537 -492
- package/dist/src/raw/class/tl/ephemeral.d.ts +51 -51
- package/dist/src/raw/class/tl/ephemeral.js +204 -152
- package/dist/src/raw/class/tl/feed.d.ts +278 -0
- package/dist/src/raw/class/tl/feed.js +671 -0
- package/dist/src/raw/class/tl/folders.d.ts +6 -6
- package/dist/src/raw/class/tl/folders.js +11 -11
- package/dist/src/raw/class/tl/fragment.d.ts +11 -11
- package/dist/src/raw/class/tl/fragment.js +32 -25
- package/dist/src/raw/class/tl/help.d.ts +286 -286
- package/dist/src/raw/class/tl/help.js +686 -618
- package/dist/src/raw/class/tl/langpack.d.ts +26 -26
- package/dist/src/raw/class/tl/langpack.js +57 -57
- package/dist/src/raw/class/tl/messages.d.ts +1901 -1851
- package/dist/src/raw/class/tl/messages.js +6043 -4855
- package/dist/src/raw/class/tl/payments.d.ts +677 -641
- package/dist/src/raw/class/tl/payments.js +2312 -1734
- package/dist/src/raw/class/tl/phone.d.ts +256 -256
- package/dist/src/raw/class/tl/phone.js +779 -644
- package/dist/src/raw/class/tl/photos.d.ts +41 -41
- package/dist/src/raw/class/tl/photos.js +139 -116
- package/dist/src/raw/class/tl/premium.d.ts +41 -41
- package/dist/src/raw/class/tl/premium.js +133 -111
- package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
- package/dist/src/raw/class/tl/smsjobs.js +115 -97
- package/dist/src/raw/class/tl/stats.d.ts +71 -71
- package/dist/src/raw/class/tl/stats.js +268 -169
- package/dist/src/raw/class/tl/stickers.d.ts +61 -61
- package/dist/src/raw/class/tl/stickers.js +173 -144
- package/dist/src/raw/class/tl/storage.d.ts +51 -51
- package/dist/src/raw/class/tl/storage.js +71 -71
- package/dist/src/raw/class/tl/stories.d.ts +221 -221
- package/dist/src/raw/class/tl/stories.js +781 -622
- package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
- package/dist/src/raw/class/tl/toncenter.js +52 -47
- package/dist/src/raw/class/tl/updates.d.ts +56 -56
- package/dist/src/raw/class/tl/updates.js +246 -175
- package/dist/src/raw/class/tl/upload.d.ts +66 -66
- package/dist/src/raw/class/tl/upload.js +178 -155
- package/dist/src/raw/class/tl/users.d.ts +61 -61
- package/dist/src/raw/class/tl/users.js +124 -124
- package/dist/src/raw/class/tl/wallet.d.ts +257 -206
- package/dist/src/raw/class/tl/wallet.js +701 -525
- package/dist/src/raw/class/types.d.ts +3 -2
- package/dist/src/raw/class/types.js +1 -1
- package/dist/src/raw/core/GzipPacked.d.ts +4 -0
- package/dist/src/raw/core/GzipPacked.js +9 -1
- package/dist/src/raw/core/primitive/Bytes.js +26 -4
- package/dist/src/raw/core/primitive/Vector.js +11 -3
- package/package.json +7 -5
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* tgsnake is a free software: you can redistribute it and/or modify
|
|
8
8
|
* it under the terms of the MIT License as published.
|
|
9
|
-
*/
|
|
9
|
+
*/
|
|
10
10
|
// This file is auto generate. All change made in this file will be lost!
|
|
11
11
|
import { TLObject, Primitive } from '../../core/index.js';
|
|
12
12
|
import { BytesIO } from '../../../deps.js';
|
|
@@ -15,27 +15,27 @@ export class PhoneCall extends TLObject {
|
|
|
15
15
|
users;
|
|
16
16
|
constructor(params) {
|
|
17
17
|
super();
|
|
18
|
-
this.classType =
|
|
19
|
-
this.className =
|
|
18
|
+
this.classType = 'types';
|
|
19
|
+
this.className = 'phone.PhoneCall';
|
|
20
20
|
this.constructorId = 0xec82e140;
|
|
21
21
|
this.subclassOfId = 0xd48afe4f;
|
|
22
|
-
this._slots = [
|
|
22
|
+
this._slots = ['phoneCall', 'users'];
|
|
23
23
|
this.phoneCall = params.phoneCall;
|
|
24
24
|
this.users = params.users;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
* Generate the TLObject from buffer.
|
|
28
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
29
|
+
*/
|
|
30
30
|
static async read(_data, ..._args) {
|
|
31
31
|
// no flags
|
|
32
32
|
let phoneCall = await TLObject.read(_data);
|
|
33
33
|
let users = await TLObject.read(_data);
|
|
34
|
-
return new PhoneCall({
|
|
34
|
+
return new PhoneCall({ phoneCall: phoneCall, users: users });
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
* Generate buffer from TLObject.
|
|
38
|
+
*/
|
|
39
39
|
write() {
|
|
40
40
|
const b = new BytesIO();
|
|
41
41
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -44,7 +44,7 @@ export class PhoneCall extends TLObject {
|
|
|
44
44
|
b.write(this.phoneCall.write());
|
|
45
45
|
}
|
|
46
46
|
if (this.users) {
|
|
47
|
-
b.write(
|
|
47
|
+
b.write(Primitive.Vector.write(this.users));
|
|
48
48
|
}
|
|
49
49
|
return b.buffer;
|
|
50
50
|
}
|
|
@@ -57,11 +57,11 @@ export class GroupCall extends TLObject {
|
|
|
57
57
|
users;
|
|
58
58
|
constructor(params) {
|
|
59
59
|
super();
|
|
60
|
-
this.classType =
|
|
61
|
-
this.className =
|
|
60
|
+
this.classType = 'types';
|
|
61
|
+
this.className = 'phone.GroupCall';
|
|
62
62
|
this.constructorId = 0x9e727aad;
|
|
63
63
|
this.subclassOfId = 0x304116be;
|
|
64
|
-
this._slots = [
|
|
64
|
+
this._slots = ['call', 'participants', 'participantsNextOffset', 'chats', 'users'];
|
|
65
65
|
this.call = params.call;
|
|
66
66
|
this.participants = params.participants;
|
|
67
67
|
this.participantsNextOffset = params.participantsNextOffset;
|
|
@@ -69,9 +69,9 @@ export class GroupCall extends TLObject {
|
|
|
69
69
|
this.users = params.users;
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
* Generate the TLObject from buffer.
|
|
73
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
74
|
+
*/
|
|
75
75
|
static async read(_data, ..._args) {
|
|
76
76
|
// no flags
|
|
77
77
|
let call = await TLObject.read(_data);
|
|
@@ -79,11 +79,17 @@ export class GroupCall extends TLObject {
|
|
|
79
79
|
let participantsNextOffset = await Primitive.String.read(_data);
|
|
80
80
|
let chats = await TLObject.read(_data);
|
|
81
81
|
let users = await TLObject.read(_data);
|
|
82
|
-
return new GroupCall({
|
|
82
|
+
return new GroupCall({
|
|
83
|
+
call: call,
|
|
84
|
+
participants: participants,
|
|
85
|
+
participantsNextOffset: participantsNextOffset,
|
|
86
|
+
chats: chats,
|
|
87
|
+
users: users,
|
|
88
|
+
});
|
|
83
89
|
}
|
|
84
90
|
/**
|
|
85
|
-
|
|
86
|
-
|
|
91
|
+
* Generate buffer from TLObject.
|
|
92
|
+
*/
|
|
87
93
|
write() {
|
|
88
94
|
const b = new BytesIO();
|
|
89
95
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -92,16 +98,16 @@ export class GroupCall extends TLObject {
|
|
|
92
98
|
b.write(this.call.write());
|
|
93
99
|
}
|
|
94
100
|
if (this.participants) {
|
|
95
|
-
b.write(
|
|
101
|
+
b.write(Primitive.Vector.write(this.participants));
|
|
96
102
|
}
|
|
97
103
|
if (this.participantsNextOffset !== undefined) {
|
|
98
|
-
b.write(
|
|
104
|
+
b.write(Primitive.String.write(this.participantsNextOffset));
|
|
99
105
|
}
|
|
100
106
|
if (this.chats) {
|
|
101
|
-
b.write(
|
|
107
|
+
b.write(Primitive.Vector.write(this.chats));
|
|
102
108
|
}
|
|
103
109
|
if (this.users) {
|
|
104
|
-
b.write(
|
|
110
|
+
b.write(Primitive.Vector.write(this.users));
|
|
105
111
|
}
|
|
106
112
|
return b.buffer;
|
|
107
113
|
}
|
|
@@ -115,11 +121,11 @@ export class GroupParticipants extends TLObject {
|
|
|
115
121
|
version;
|
|
116
122
|
constructor(params) {
|
|
117
123
|
super();
|
|
118
|
-
this.classType =
|
|
119
|
-
this.className =
|
|
124
|
+
this.classType = 'types';
|
|
125
|
+
this.className = 'phone.GroupParticipants';
|
|
120
126
|
this.constructorId = 0xf47751b6;
|
|
121
127
|
this.subclassOfId = 0x72d304f4;
|
|
122
|
-
this._slots = [
|
|
128
|
+
this._slots = ['count', 'participants', 'nextOffset', 'chats', 'users', 'version'];
|
|
123
129
|
this.count = params.count;
|
|
124
130
|
this.participants = params.participants;
|
|
125
131
|
this.nextOffset = params.nextOffset;
|
|
@@ -128,9 +134,9 @@ export class GroupParticipants extends TLObject {
|
|
|
128
134
|
this.version = params.version;
|
|
129
135
|
}
|
|
130
136
|
/**
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
137
|
+
* Generate the TLObject from buffer.
|
|
138
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
139
|
+
*/
|
|
134
140
|
static async read(_data, ..._args) {
|
|
135
141
|
// no flags
|
|
136
142
|
let count = await Primitive.Int.read(_data);
|
|
@@ -139,32 +145,39 @@ export class GroupParticipants extends TLObject {
|
|
|
139
145
|
let chats = await TLObject.read(_data);
|
|
140
146
|
let users = await TLObject.read(_data);
|
|
141
147
|
let version = await Primitive.Int.read(_data);
|
|
142
|
-
return new GroupParticipants({
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
148
|
+
return new GroupParticipants({
|
|
149
|
+
count: count,
|
|
150
|
+
participants: participants,
|
|
151
|
+
nextOffset: nextOffset,
|
|
152
|
+
chats: chats,
|
|
153
|
+
users: users,
|
|
154
|
+
version: version,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Generate buffer from TLObject.
|
|
159
|
+
*/
|
|
147
160
|
write() {
|
|
148
161
|
const b = new BytesIO();
|
|
149
162
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
150
163
|
// no flags
|
|
151
164
|
if (this.count !== undefined) {
|
|
152
|
-
b.write(
|
|
165
|
+
b.write(Primitive.Int.write(this.count));
|
|
153
166
|
}
|
|
154
167
|
if (this.participants) {
|
|
155
|
-
b.write(
|
|
168
|
+
b.write(Primitive.Vector.write(this.participants));
|
|
156
169
|
}
|
|
157
170
|
if (this.nextOffset !== undefined) {
|
|
158
|
-
b.write(
|
|
171
|
+
b.write(Primitive.String.write(this.nextOffset));
|
|
159
172
|
}
|
|
160
173
|
if (this.chats) {
|
|
161
|
-
b.write(
|
|
174
|
+
b.write(Primitive.Vector.write(this.chats));
|
|
162
175
|
}
|
|
163
176
|
if (this.users) {
|
|
164
|
-
b.write(
|
|
177
|
+
b.write(Primitive.Vector.write(this.users));
|
|
165
178
|
}
|
|
166
179
|
if (this.version !== undefined) {
|
|
167
|
-
b.write(
|
|
180
|
+
b.write(Primitive.Int.write(this.version));
|
|
168
181
|
}
|
|
169
182
|
return b.buffer;
|
|
170
183
|
}
|
|
@@ -175,41 +188,41 @@ export class JoinAsPeers extends TLObject {
|
|
|
175
188
|
users;
|
|
176
189
|
constructor(params) {
|
|
177
190
|
super();
|
|
178
|
-
this.classType =
|
|
179
|
-
this.className =
|
|
191
|
+
this.classType = 'types';
|
|
192
|
+
this.className = 'phone.JoinAsPeers';
|
|
180
193
|
this.constructorId = 0xafe5623f;
|
|
181
194
|
this.subclassOfId = 0xb4b770fb;
|
|
182
|
-
this._slots = [
|
|
195
|
+
this._slots = ['peers', 'chats', 'users'];
|
|
183
196
|
this.peers = params.peers;
|
|
184
197
|
this.chats = params.chats;
|
|
185
198
|
this.users = params.users;
|
|
186
199
|
}
|
|
187
200
|
/**
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
201
|
+
* Generate the TLObject from buffer.
|
|
202
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
203
|
+
*/
|
|
191
204
|
static async read(_data, ..._args) {
|
|
192
205
|
// no flags
|
|
193
206
|
let peers = await TLObject.read(_data);
|
|
194
207
|
let chats = await TLObject.read(_data);
|
|
195
208
|
let users = await TLObject.read(_data);
|
|
196
|
-
return new JoinAsPeers({
|
|
209
|
+
return new JoinAsPeers({ peers: peers, chats: chats, users: users });
|
|
197
210
|
}
|
|
198
211
|
/**
|
|
199
|
-
|
|
200
|
-
|
|
212
|
+
* Generate buffer from TLObject.
|
|
213
|
+
*/
|
|
201
214
|
write() {
|
|
202
215
|
const b = new BytesIO();
|
|
203
216
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
204
217
|
// no flags
|
|
205
218
|
if (this.peers) {
|
|
206
|
-
b.write(
|
|
219
|
+
b.write(Primitive.Vector.write(this.peers));
|
|
207
220
|
}
|
|
208
221
|
if (this.chats) {
|
|
209
|
-
b.write(
|
|
222
|
+
b.write(Primitive.Vector.write(this.chats));
|
|
210
223
|
}
|
|
211
224
|
if (this.users) {
|
|
212
|
-
b.write(
|
|
225
|
+
b.write(Primitive.Vector.write(this.users));
|
|
213
226
|
}
|
|
214
227
|
return b.buffer;
|
|
215
228
|
}
|
|
@@ -218,31 +231,31 @@ export class ExportedGroupCallInvite extends TLObject {
|
|
|
218
231
|
link;
|
|
219
232
|
constructor(params) {
|
|
220
233
|
super();
|
|
221
|
-
this.classType =
|
|
222
|
-
this.className =
|
|
234
|
+
this.classType = 'types';
|
|
235
|
+
this.className = 'phone.ExportedGroupCallInvite';
|
|
223
236
|
this.constructorId = 0x204bd158;
|
|
224
237
|
this.subclassOfId = 0x3b3bfe8f;
|
|
225
|
-
this._slots = [
|
|
238
|
+
this._slots = ['link'];
|
|
226
239
|
this.link = params.link;
|
|
227
240
|
}
|
|
228
241
|
/**
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
242
|
+
* Generate the TLObject from buffer.
|
|
243
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
244
|
+
*/
|
|
232
245
|
static async read(_data, ..._args) {
|
|
233
246
|
// no flags
|
|
234
247
|
let link = await Primitive.String.read(_data);
|
|
235
|
-
return new ExportedGroupCallInvite({
|
|
248
|
+
return new ExportedGroupCallInvite({ link: link });
|
|
236
249
|
}
|
|
237
250
|
/**
|
|
238
|
-
|
|
239
|
-
|
|
251
|
+
* Generate buffer from TLObject.
|
|
252
|
+
*/
|
|
240
253
|
write() {
|
|
241
254
|
const b = new BytesIO();
|
|
242
255
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
243
256
|
// no flags
|
|
244
257
|
if (this.link !== undefined) {
|
|
245
|
-
b.write(
|
|
258
|
+
b.write(Primitive.String.write(this.link));
|
|
246
259
|
}
|
|
247
260
|
return b.buffer;
|
|
248
261
|
}
|
|
@@ -251,31 +264,31 @@ export class GroupCallStreamChannels extends TLObject {
|
|
|
251
264
|
channels;
|
|
252
265
|
constructor(params) {
|
|
253
266
|
super();
|
|
254
|
-
this.classType =
|
|
255
|
-
this.className =
|
|
267
|
+
this.classType = 'types';
|
|
268
|
+
this.className = 'phone.GroupCallStreamChannels';
|
|
256
269
|
this.constructorId = 0xd0e482b2;
|
|
257
270
|
this.subclassOfId = 0x9157c5e4;
|
|
258
|
-
this._slots = [
|
|
271
|
+
this._slots = ['channels'];
|
|
259
272
|
this.channels = params.channels;
|
|
260
273
|
}
|
|
261
274
|
/**
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
275
|
+
* Generate the TLObject from buffer.
|
|
276
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
277
|
+
*/
|
|
265
278
|
static async read(_data, ..._args) {
|
|
266
279
|
// no flags
|
|
267
280
|
let channels = await TLObject.read(_data);
|
|
268
|
-
return new GroupCallStreamChannels({
|
|
281
|
+
return new GroupCallStreamChannels({ channels: channels });
|
|
269
282
|
}
|
|
270
283
|
/**
|
|
271
|
-
|
|
272
|
-
|
|
284
|
+
* Generate buffer from TLObject.
|
|
285
|
+
*/
|
|
273
286
|
write() {
|
|
274
287
|
const b = new BytesIO();
|
|
275
288
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
276
289
|
// no flags
|
|
277
290
|
if (this.channels) {
|
|
278
|
-
b.write(
|
|
291
|
+
b.write(Primitive.Vector.write(this.channels));
|
|
279
292
|
}
|
|
280
293
|
return b.buffer;
|
|
281
294
|
}
|
|
@@ -285,36 +298,36 @@ export class GroupCallStreamRtmpUrl extends TLObject {
|
|
|
285
298
|
key;
|
|
286
299
|
constructor(params) {
|
|
287
300
|
super();
|
|
288
|
-
this.classType =
|
|
289
|
-
this.className =
|
|
301
|
+
this.classType = 'types';
|
|
302
|
+
this.className = 'phone.GroupCallStreamRtmpUrl';
|
|
290
303
|
this.constructorId = 0x2dbf3432;
|
|
291
304
|
this.subclassOfId = 0xd1f515cb;
|
|
292
|
-
this._slots = [
|
|
305
|
+
this._slots = ['url', 'key'];
|
|
293
306
|
this.url = params.url;
|
|
294
307
|
this.key = params.key;
|
|
295
308
|
}
|
|
296
309
|
/**
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
310
|
+
* Generate the TLObject from buffer.
|
|
311
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
312
|
+
*/
|
|
300
313
|
static async read(_data, ..._args) {
|
|
301
314
|
// no flags
|
|
302
315
|
let url = await Primitive.String.read(_data);
|
|
303
316
|
let key = await Primitive.String.read(_data);
|
|
304
|
-
return new GroupCallStreamRtmpUrl({
|
|
317
|
+
return new GroupCallStreamRtmpUrl({ url: url, key: key });
|
|
305
318
|
}
|
|
306
319
|
/**
|
|
307
|
-
|
|
308
|
-
|
|
320
|
+
* Generate buffer from TLObject.
|
|
321
|
+
*/
|
|
309
322
|
write() {
|
|
310
323
|
const b = new BytesIO();
|
|
311
324
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
312
325
|
// no flags
|
|
313
326
|
if (this.url !== undefined) {
|
|
314
|
-
b.write(
|
|
327
|
+
b.write(Primitive.String.write(this.url));
|
|
315
328
|
}
|
|
316
329
|
if (this.key !== undefined) {
|
|
317
|
-
b.write(
|
|
330
|
+
b.write(Primitive.String.write(this.key));
|
|
318
331
|
}
|
|
319
332
|
return b.buffer;
|
|
320
333
|
}
|
|
@@ -326,46 +339,51 @@ export class GroupCallStars extends TLObject {
|
|
|
326
339
|
users;
|
|
327
340
|
constructor(params) {
|
|
328
341
|
super();
|
|
329
|
-
this.classType =
|
|
330
|
-
this.className =
|
|
342
|
+
this.classType = 'types';
|
|
343
|
+
this.className = 'phone.GroupCallStars';
|
|
331
344
|
this.constructorId = 0x9d1dbd26;
|
|
332
345
|
this.subclassOfId = 0xb447801a;
|
|
333
|
-
this._slots = [
|
|
346
|
+
this._slots = ['totalStars', 'topDonors', 'chats', 'users'];
|
|
334
347
|
this.totalStars = params.totalStars;
|
|
335
348
|
this.topDonors = params.topDonors;
|
|
336
349
|
this.chats = params.chats;
|
|
337
350
|
this.users = params.users;
|
|
338
351
|
}
|
|
339
352
|
/**
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
353
|
+
* Generate the TLObject from buffer.
|
|
354
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
355
|
+
*/
|
|
343
356
|
static async read(_data, ..._args) {
|
|
344
357
|
// no flags
|
|
345
358
|
let totalStars = await Primitive.Long.read(_data);
|
|
346
359
|
let topDonors = await TLObject.read(_data);
|
|
347
360
|
let chats = await TLObject.read(_data);
|
|
348
361
|
let users = await TLObject.read(_data);
|
|
349
|
-
return new GroupCallStars({
|
|
362
|
+
return new GroupCallStars({
|
|
363
|
+
totalStars: totalStars,
|
|
364
|
+
topDonors: topDonors,
|
|
365
|
+
chats: chats,
|
|
366
|
+
users: users,
|
|
367
|
+
});
|
|
350
368
|
}
|
|
351
369
|
/**
|
|
352
|
-
|
|
353
|
-
|
|
370
|
+
* Generate buffer from TLObject.
|
|
371
|
+
*/
|
|
354
372
|
write() {
|
|
355
373
|
const b = new BytesIO();
|
|
356
374
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
357
375
|
// no flags
|
|
358
376
|
if (this.totalStars !== undefined) {
|
|
359
|
-
b.write(
|
|
377
|
+
b.write(Primitive.Long.write(this.totalStars));
|
|
360
378
|
}
|
|
361
379
|
if (this.topDonors) {
|
|
362
|
-
b.write(
|
|
380
|
+
b.write(Primitive.Vector.write(this.topDonors));
|
|
363
381
|
}
|
|
364
382
|
if (this.chats) {
|
|
365
|
-
b.write(
|
|
383
|
+
b.write(Primitive.Vector.write(this.chats));
|
|
366
384
|
}
|
|
367
385
|
if (this.users) {
|
|
368
|
-
b.write(
|
|
386
|
+
b.write(Primitive.Vector.write(this.users));
|
|
369
387
|
}
|
|
370
388
|
return b.buffer;
|
|
371
389
|
}
|
|
@@ -374,23 +392,23 @@ export class GetCallConfig extends TLObject {
|
|
|
374
392
|
__response__;
|
|
375
393
|
constructor() {
|
|
376
394
|
super();
|
|
377
|
-
this.classType =
|
|
378
|
-
this.className =
|
|
395
|
+
this.classType = 'functions';
|
|
396
|
+
this.className = 'phone.GetCallConfig';
|
|
379
397
|
this.constructorId = 0x55451fa9;
|
|
380
398
|
this.subclassOfId = 0xad0352e8;
|
|
381
399
|
this._slots = [];
|
|
382
400
|
}
|
|
383
401
|
/**
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
402
|
+
* Generate the TLObject from buffer.
|
|
403
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
404
|
+
*/
|
|
387
405
|
static async read(_data, ..._args) {
|
|
388
406
|
// no flags
|
|
389
407
|
return new GetCallConfig();
|
|
390
408
|
}
|
|
391
409
|
/**
|
|
392
|
-
|
|
393
|
-
|
|
410
|
+
* Generate buffer from TLObject.
|
|
411
|
+
*/
|
|
394
412
|
write() {
|
|
395
413
|
const b = new BytesIO();
|
|
396
414
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -407,11 +425,11 @@ export class RequestCall extends TLObject {
|
|
|
407
425
|
protocol;
|
|
408
426
|
constructor(params) {
|
|
409
427
|
super();
|
|
410
|
-
this.classType =
|
|
411
|
-
this.className =
|
|
428
|
+
this.classType = 'functions';
|
|
429
|
+
this.className = 'phone.RequestCall';
|
|
412
430
|
this.constructorId = 0x42ff96ed;
|
|
413
431
|
this.subclassOfId = 0xd48afe4f;
|
|
414
|
-
this._slots = [
|
|
432
|
+
this._slots = ['video', 'userId', 'randomId', 'gAHash', 'protocol'];
|
|
415
433
|
this.video = params.video;
|
|
416
434
|
this.userId = params.userId;
|
|
417
435
|
this.randomId = params.randomId;
|
|
@@ -419,37 +437,43 @@ export class RequestCall extends TLObject {
|
|
|
419
437
|
this.protocol = params.protocol;
|
|
420
438
|
}
|
|
421
439
|
/**
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
440
|
+
* Generate the TLObject from buffer.
|
|
441
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
442
|
+
*/
|
|
425
443
|
static async read(_data, ..._args) {
|
|
426
444
|
// @ts-ignore
|
|
427
445
|
let flags = await Primitive.Int.read(_data);
|
|
428
|
-
let video =
|
|
446
|
+
let video = flags & (1 << 0) ? true : false;
|
|
429
447
|
let userId = await TLObject.read(_data);
|
|
430
448
|
let randomId = await Primitive.Int.read(_data);
|
|
431
449
|
let gAHash = await Primitive.Bytes.read(_data);
|
|
432
450
|
let protocol = await TLObject.read(_data);
|
|
433
|
-
return new RequestCall({
|
|
451
|
+
return new RequestCall({
|
|
452
|
+
video: video,
|
|
453
|
+
userId: userId,
|
|
454
|
+
randomId: randomId,
|
|
455
|
+
gAHash: gAHash,
|
|
456
|
+
protocol: protocol,
|
|
457
|
+
});
|
|
434
458
|
}
|
|
435
459
|
/**
|
|
436
|
-
|
|
437
|
-
|
|
460
|
+
* Generate buffer from TLObject.
|
|
461
|
+
*/
|
|
438
462
|
write() {
|
|
439
463
|
const b = new BytesIO();
|
|
440
464
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
441
465
|
// @ts-ignore
|
|
442
466
|
let flags = 0;
|
|
443
|
-
flags |= this.video ?
|
|
444
|
-
b.write(
|
|
467
|
+
flags |= this.video ? 1 << 0 : 0;
|
|
468
|
+
b.write(Primitive.Int.write(flags));
|
|
445
469
|
if (this.userId !== undefined) {
|
|
446
470
|
b.write(this.userId.write());
|
|
447
471
|
}
|
|
448
472
|
if (this.randomId !== undefined) {
|
|
449
|
-
b.write(
|
|
473
|
+
b.write(Primitive.Int.write(this.randomId));
|
|
450
474
|
}
|
|
451
475
|
if (this.gAHash !== undefined) {
|
|
452
|
-
b.write(
|
|
476
|
+
b.write(Primitive.Bytes.write(this.gAHash));
|
|
453
477
|
}
|
|
454
478
|
if (this.protocol !== undefined) {
|
|
455
479
|
b.write(this.protocol.write());
|
|
@@ -464,29 +488,29 @@ export class AcceptCall extends TLObject {
|
|
|
464
488
|
protocol;
|
|
465
489
|
constructor(params) {
|
|
466
490
|
super();
|
|
467
|
-
this.classType =
|
|
468
|
-
this.className =
|
|
491
|
+
this.classType = 'functions';
|
|
492
|
+
this.className = 'phone.AcceptCall';
|
|
469
493
|
this.constructorId = 0x3bd2b4a0;
|
|
470
494
|
this.subclassOfId = 0xd48afe4f;
|
|
471
|
-
this._slots = [
|
|
495
|
+
this._slots = ['peer', 'gB', 'protocol'];
|
|
472
496
|
this.peer = params.peer;
|
|
473
497
|
this.gB = params.gB;
|
|
474
498
|
this.protocol = params.protocol;
|
|
475
499
|
}
|
|
476
500
|
/**
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
501
|
+
* Generate the TLObject from buffer.
|
|
502
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
503
|
+
*/
|
|
480
504
|
static async read(_data, ..._args) {
|
|
481
505
|
// no flags
|
|
482
506
|
let peer = await TLObject.read(_data);
|
|
483
507
|
let gB = await Primitive.Bytes.read(_data);
|
|
484
508
|
let protocol = await TLObject.read(_data);
|
|
485
|
-
return new AcceptCall({
|
|
509
|
+
return new AcceptCall({ peer: peer, gB: gB, protocol: protocol });
|
|
486
510
|
}
|
|
487
511
|
/**
|
|
488
|
-
|
|
489
|
-
|
|
512
|
+
* Generate buffer from TLObject.
|
|
513
|
+
*/
|
|
490
514
|
write() {
|
|
491
515
|
const b = new BytesIO();
|
|
492
516
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -495,7 +519,7 @@ export class AcceptCall extends TLObject {
|
|
|
495
519
|
b.write(this.peer.write());
|
|
496
520
|
}
|
|
497
521
|
if (this.gB !== undefined) {
|
|
498
|
-
b.write(
|
|
522
|
+
b.write(Primitive.Bytes.write(this.gB));
|
|
499
523
|
}
|
|
500
524
|
if (this.protocol !== undefined) {
|
|
501
525
|
b.write(this.protocol.write());
|
|
@@ -511,31 +535,36 @@ export class ConfirmCall extends TLObject {
|
|
|
511
535
|
protocol;
|
|
512
536
|
constructor(params) {
|
|
513
537
|
super();
|
|
514
|
-
this.classType =
|
|
515
|
-
this.className =
|
|
538
|
+
this.classType = 'functions';
|
|
539
|
+
this.className = 'phone.ConfirmCall';
|
|
516
540
|
this.constructorId = 0x2efe1722;
|
|
517
541
|
this.subclassOfId = 0xd48afe4f;
|
|
518
|
-
this._slots = [
|
|
542
|
+
this._slots = ['peer', 'gA', 'keyFingerprint', 'protocol'];
|
|
519
543
|
this.peer = params.peer;
|
|
520
544
|
this.gA = params.gA;
|
|
521
545
|
this.keyFingerprint = params.keyFingerprint;
|
|
522
546
|
this.protocol = params.protocol;
|
|
523
547
|
}
|
|
524
548
|
/**
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
549
|
+
* Generate the TLObject from buffer.
|
|
550
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
551
|
+
*/
|
|
528
552
|
static async read(_data, ..._args) {
|
|
529
553
|
// no flags
|
|
530
554
|
let peer = await TLObject.read(_data);
|
|
531
555
|
let gA = await Primitive.Bytes.read(_data);
|
|
532
556
|
let keyFingerprint = await Primitive.Long.read(_data);
|
|
533
557
|
let protocol = await TLObject.read(_data);
|
|
534
|
-
return new ConfirmCall({
|
|
558
|
+
return new ConfirmCall({
|
|
559
|
+
peer: peer,
|
|
560
|
+
gA: gA,
|
|
561
|
+
keyFingerprint: keyFingerprint,
|
|
562
|
+
protocol: protocol,
|
|
563
|
+
});
|
|
535
564
|
}
|
|
536
565
|
/**
|
|
537
|
-
|
|
538
|
-
|
|
566
|
+
* Generate buffer from TLObject.
|
|
567
|
+
*/
|
|
539
568
|
write() {
|
|
540
569
|
const b = new BytesIO();
|
|
541
570
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -544,10 +573,10 @@ export class ConfirmCall extends TLObject {
|
|
|
544
573
|
b.write(this.peer.write());
|
|
545
574
|
}
|
|
546
575
|
if (this.gA !== undefined) {
|
|
547
|
-
b.write(
|
|
576
|
+
b.write(Primitive.Bytes.write(this.gA));
|
|
548
577
|
}
|
|
549
578
|
if (this.keyFingerprint !== undefined) {
|
|
550
|
-
b.write(
|
|
579
|
+
b.write(Primitive.Long.write(this.keyFingerprint));
|
|
551
580
|
}
|
|
552
581
|
if (this.protocol !== undefined) {
|
|
553
582
|
b.write(this.protocol.write());
|
|
@@ -560,25 +589,25 @@ export class ReceivedCall extends TLObject {
|
|
|
560
589
|
peer;
|
|
561
590
|
constructor(params) {
|
|
562
591
|
super();
|
|
563
|
-
this.classType =
|
|
564
|
-
this.className =
|
|
592
|
+
this.classType = 'functions';
|
|
593
|
+
this.className = 'phone.ReceivedCall';
|
|
565
594
|
this.constructorId = 0x17d54f61;
|
|
566
595
|
this.subclassOfId = 0xf5b399ac;
|
|
567
|
-
this._slots = [
|
|
596
|
+
this._slots = ['peer'];
|
|
568
597
|
this.peer = params.peer;
|
|
569
598
|
}
|
|
570
599
|
/**
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
600
|
+
* Generate the TLObject from buffer.
|
|
601
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
602
|
+
*/
|
|
574
603
|
static async read(_data, ..._args) {
|
|
575
604
|
// no flags
|
|
576
605
|
let peer = await TLObject.read(_data);
|
|
577
|
-
return new ReceivedCall({
|
|
606
|
+
return new ReceivedCall({ peer: peer });
|
|
578
607
|
}
|
|
579
608
|
/**
|
|
580
|
-
|
|
581
|
-
|
|
609
|
+
* Generate buffer from TLObject.
|
|
610
|
+
*/
|
|
582
611
|
write() {
|
|
583
612
|
const b = new BytesIO();
|
|
584
613
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -598,11 +627,11 @@ export class DiscardCall extends TLObject {
|
|
|
598
627
|
connectionId;
|
|
599
628
|
constructor(params) {
|
|
600
629
|
super();
|
|
601
|
-
this.classType =
|
|
602
|
-
this.className =
|
|
630
|
+
this.classType = 'functions';
|
|
631
|
+
this.className = 'phone.DiscardCall';
|
|
603
632
|
this.constructorId = 0xb2cbc1c0;
|
|
604
633
|
this.subclassOfId = 0x8af52aac;
|
|
605
|
-
this._slots = [
|
|
634
|
+
this._slots = ['video', 'peer', 'duration', 'reason', 'connectionId'];
|
|
606
635
|
this.video = params.video;
|
|
607
636
|
this.peer = params.peer;
|
|
608
637
|
this.duration = params.duration;
|
|
@@ -610,40 +639,46 @@ export class DiscardCall extends TLObject {
|
|
|
610
639
|
this.connectionId = params.connectionId;
|
|
611
640
|
}
|
|
612
641
|
/**
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
642
|
+
* Generate the TLObject from buffer.
|
|
643
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
644
|
+
*/
|
|
616
645
|
static async read(_data, ..._args) {
|
|
617
646
|
// @ts-ignore
|
|
618
647
|
let flags = await Primitive.Int.read(_data);
|
|
619
|
-
let video =
|
|
648
|
+
let video = flags & (1 << 0) ? true : false;
|
|
620
649
|
let peer = await TLObject.read(_data);
|
|
621
650
|
let duration = await Primitive.Int.read(_data);
|
|
622
651
|
let reason = await TLObject.read(_data);
|
|
623
652
|
let connectionId = await Primitive.Long.read(_data);
|
|
624
|
-
return new DiscardCall({
|
|
653
|
+
return new DiscardCall({
|
|
654
|
+
video: video,
|
|
655
|
+
peer: peer,
|
|
656
|
+
duration: duration,
|
|
657
|
+
reason: reason,
|
|
658
|
+
connectionId: connectionId,
|
|
659
|
+
});
|
|
625
660
|
}
|
|
626
661
|
/**
|
|
627
|
-
|
|
628
|
-
|
|
662
|
+
* Generate buffer from TLObject.
|
|
663
|
+
*/
|
|
629
664
|
write() {
|
|
630
665
|
const b = new BytesIO();
|
|
631
666
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
632
667
|
// @ts-ignore
|
|
633
668
|
let flags = 0;
|
|
634
|
-
flags |= this.video ?
|
|
635
|
-
b.write(
|
|
669
|
+
flags |= this.video ? 1 << 0 : 0;
|
|
670
|
+
b.write(Primitive.Int.write(flags));
|
|
636
671
|
if (this.peer !== undefined) {
|
|
637
672
|
b.write(this.peer.write());
|
|
638
673
|
}
|
|
639
674
|
if (this.duration !== undefined) {
|
|
640
|
-
b.write(
|
|
675
|
+
b.write(Primitive.Int.write(this.duration));
|
|
641
676
|
}
|
|
642
677
|
if (this.reason !== undefined) {
|
|
643
678
|
b.write(this.reason.write());
|
|
644
679
|
}
|
|
645
680
|
if (this.connectionId !== undefined) {
|
|
646
|
-
b.write(
|
|
681
|
+
b.write(Primitive.Long.write(this.connectionId));
|
|
647
682
|
}
|
|
648
683
|
return b.buffer;
|
|
649
684
|
}
|
|
@@ -656,47 +691,52 @@ export class SetCallRating extends TLObject {
|
|
|
656
691
|
comment;
|
|
657
692
|
constructor(params) {
|
|
658
693
|
super();
|
|
659
|
-
this.classType =
|
|
660
|
-
this.className =
|
|
694
|
+
this.classType = 'functions';
|
|
695
|
+
this.className = 'phone.SetCallRating';
|
|
661
696
|
this.constructorId = 0x59ead627;
|
|
662
697
|
this.subclassOfId = 0x8af52aac;
|
|
663
|
-
this._slots = [
|
|
698
|
+
this._slots = ['userInitiative', 'peer', 'rating', 'comment'];
|
|
664
699
|
this.userInitiative = params.userInitiative;
|
|
665
700
|
this.peer = params.peer;
|
|
666
701
|
this.rating = params.rating;
|
|
667
702
|
this.comment = params.comment;
|
|
668
703
|
}
|
|
669
704
|
/**
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
705
|
+
* Generate the TLObject from buffer.
|
|
706
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
707
|
+
*/
|
|
673
708
|
static async read(_data, ..._args) {
|
|
674
709
|
// @ts-ignore
|
|
675
710
|
let flags = await Primitive.Int.read(_data);
|
|
676
|
-
let userInitiative =
|
|
711
|
+
let userInitiative = flags & (1 << 0) ? true : false;
|
|
677
712
|
let peer = await TLObject.read(_data);
|
|
678
713
|
let rating = await Primitive.Int.read(_data);
|
|
679
714
|
let comment = await Primitive.String.read(_data);
|
|
680
|
-
return new SetCallRating({
|
|
715
|
+
return new SetCallRating({
|
|
716
|
+
userInitiative: userInitiative,
|
|
717
|
+
peer: peer,
|
|
718
|
+
rating: rating,
|
|
719
|
+
comment: comment,
|
|
720
|
+
});
|
|
681
721
|
}
|
|
682
722
|
/**
|
|
683
|
-
|
|
684
|
-
|
|
723
|
+
* Generate buffer from TLObject.
|
|
724
|
+
*/
|
|
685
725
|
write() {
|
|
686
726
|
const b = new BytesIO();
|
|
687
727
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
688
728
|
// @ts-ignore
|
|
689
729
|
let flags = 0;
|
|
690
|
-
flags |= this.userInitiative ?
|
|
691
|
-
b.write(
|
|
730
|
+
flags |= this.userInitiative ? 1 << 0 : 0;
|
|
731
|
+
b.write(Primitive.Int.write(flags));
|
|
692
732
|
if (this.peer !== undefined) {
|
|
693
733
|
b.write(this.peer.write());
|
|
694
734
|
}
|
|
695
735
|
if (this.rating !== undefined) {
|
|
696
|
-
b.write(
|
|
736
|
+
b.write(Primitive.Int.write(this.rating));
|
|
697
737
|
}
|
|
698
738
|
if (this.comment !== undefined) {
|
|
699
|
-
b.write(
|
|
739
|
+
b.write(Primitive.String.write(this.comment));
|
|
700
740
|
}
|
|
701
741
|
return b.buffer;
|
|
702
742
|
}
|
|
@@ -707,27 +747,27 @@ export class SaveCallDebug extends TLObject {
|
|
|
707
747
|
debug;
|
|
708
748
|
constructor(params) {
|
|
709
749
|
super();
|
|
710
|
-
this.classType =
|
|
711
|
-
this.className =
|
|
750
|
+
this.classType = 'functions';
|
|
751
|
+
this.className = 'phone.SaveCallDebug';
|
|
712
752
|
this.constructorId = 0x277add7e;
|
|
713
753
|
this.subclassOfId = 0xf5b399ac;
|
|
714
|
-
this._slots = [
|
|
754
|
+
this._slots = ['peer', 'debug'];
|
|
715
755
|
this.peer = params.peer;
|
|
716
756
|
this.debug = params.debug;
|
|
717
757
|
}
|
|
718
758
|
/**
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
759
|
+
* Generate the TLObject from buffer.
|
|
760
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
761
|
+
*/
|
|
722
762
|
static async read(_data, ..._args) {
|
|
723
763
|
// no flags
|
|
724
764
|
let peer = await TLObject.read(_data);
|
|
725
765
|
let debug = await TLObject.read(_data);
|
|
726
|
-
return new SaveCallDebug({
|
|
766
|
+
return new SaveCallDebug({ peer: peer, debug: debug });
|
|
727
767
|
}
|
|
728
768
|
/**
|
|
729
|
-
|
|
730
|
-
|
|
769
|
+
* Generate buffer from TLObject.
|
|
770
|
+
*/
|
|
731
771
|
write() {
|
|
732
772
|
const b = new BytesIO();
|
|
733
773
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -747,27 +787,27 @@ export class SendSignalingData extends TLObject {
|
|
|
747
787
|
data;
|
|
748
788
|
constructor(params) {
|
|
749
789
|
super();
|
|
750
|
-
this.classType =
|
|
751
|
-
this.className =
|
|
790
|
+
this.classType = 'functions';
|
|
791
|
+
this.className = 'phone.SendSignalingData';
|
|
752
792
|
this.constructorId = 0xff7a9383;
|
|
753
793
|
this.subclassOfId = 0xf5b399ac;
|
|
754
|
-
this._slots = [
|
|
794
|
+
this._slots = ['peer', 'data'];
|
|
755
795
|
this.peer = params.peer;
|
|
756
796
|
this.data = params.data;
|
|
757
797
|
}
|
|
758
798
|
/**
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
799
|
+
* Generate the TLObject from buffer.
|
|
800
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
801
|
+
*/
|
|
762
802
|
static async read(_data, ..._args) {
|
|
763
803
|
// no flags
|
|
764
804
|
let peer = await TLObject.read(_data);
|
|
765
805
|
let data = await Primitive.Bytes.read(_data);
|
|
766
|
-
return new SendSignalingData({
|
|
806
|
+
return new SendSignalingData({ peer: peer, data: data });
|
|
767
807
|
}
|
|
768
808
|
/**
|
|
769
|
-
|
|
770
|
-
|
|
809
|
+
* Generate buffer from TLObject.
|
|
810
|
+
*/
|
|
771
811
|
write() {
|
|
772
812
|
const b = new BytesIO();
|
|
773
813
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -776,7 +816,7 @@ export class SendSignalingData extends TLObject {
|
|
|
776
816
|
b.write(this.peer.write());
|
|
777
817
|
}
|
|
778
818
|
if (this.data !== undefined) {
|
|
779
|
-
b.write(
|
|
819
|
+
b.write(Primitive.Bytes.write(this.data));
|
|
780
820
|
}
|
|
781
821
|
return b.buffer;
|
|
782
822
|
}
|
|
@@ -790,11 +830,11 @@ export class CreateGroupCall extends TLObject {
|
|
|
790
830
|
scheduleDate;
|
|
791
831
|
constructor(params) {
|
|
792
832
|
super();
|
|
793
|
-
this.classType =
|
|
794
|
-
this.className =
|
|
833
|
+
this.classType = 'functions';
|
|
834
|
+
this.className = 'phone.CreateGroupCall';
|
|
795
835
|
this.constructorId = 0x48cdc6d8;
|
|
796
836
|
this.subclassOfId = 0x8af52aac;
|
|
797
|
-
this._slots = [
|
|
837
|
+
this._slots = ['rtmpStream', 'peer', 'randomId', 'title', 'scheduleDate'];
|
|
798
838
|
this.rtmpStream = params.rtmpStream;
|
|
799
839
|
this.peer = params.peer;
|
|
800
840
|
this.randomId = params.randomId;
|
|
@@ -802,42 +842,48 @@ export class CreateGroupCall extends TLObject {
|
|
|
802
842
|
this.scheduleDate = params.scheduleDate;
|
|
803
843
|
}
|
|
804
844
|
/**
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
845
|
+
* Generate the TLObject from buffer.
|
|
846
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
847
|
+
*/
|
|
808
848
|
static async read(_data, ..._args) {
|
|
809
849
|
// @ts-ignore
|
|
810
850
|
let flags = await Primitive.Int.read(_data);
|
|
811
|
-
let rtmpStream =
|
|
851
|
+
let rtmpStream = flags & (1 << 2) ? true : false;
|
|
812
852
|
let peer = await TLObject.read(_data);
|
|
813
853
|
let randomId = await Primitive.Int.read(_data);
|
|
814
|
-
let title =
|
|
815
|
-
let scheduleDate =
|
|
816
|
-
return new CreateGroupCall({
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
854
|
+
let title = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
855
|
+
let scheduleDate = flags & (1 << 1) ? await Primitive.Int.read(_data) : undefined;
|
|
856
|
+
return new CreateGroupCall({
|
|
857
|
+
rtmpStream: rtmpStream,
|
|
858
|
+
peer: peer,
|
|
859
|
+
randomId: randomId,
|
|
860
|
+
title: title,
|
|
861
|
+
scheduleDate: scheduleDate,
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
/**
|
|
865
|
+
* Generate buffer from TLObject.
|
|
866
|
+
*/
|
|
821
867
|
write() {
|
|
822
868
|
const b = new BytesIO();
|
|
823
869
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
824
870
|
// @ts-ignore
|
|
825
871
|
let flags = 0;
|
|
826
|
-
flags |= this.rtmpStream ?
|
|
827
|
-
flags |= this.title !== undefined ?
|
|
828
|
-
flags |= this.scheduleDate !== undefined ?
|
|
829
|
-
b.write(
|
|
872
|
+
flags |= this.rtmpStream ? 1 << 2 : 0;
|
|
873
|
+
flags |= this.title !== undefined ? 1 << 0 : 0;
|
|
874
|
+
flags |= this.scheduleDate !== undefined ? 1 << 1 : 0;
|
|
875
|
+
b.write(Primitive.Int.write(flags));
|
|
830
876
|
if (this.peer !== undefined) {
|
|
831
877
|
b.write(this.peer.write());
|
|
832
878
|
}
|
|
833
879
|
if (this.randomId !== undefined) {
|
|
834
|
-
b.write(
|
|
880
|
+
b.write(Primitive.Int.write(this.randomId));
|
|
835
881
|
}
|
|
836
882
|
if (this.title !== undefined) {
|
|
837
|
-
b.write(
|
|
883
|
+
b.write(Primitive.String.write(this.title));
|
|
838
884
|
}
|
|
839
885
|
if (this.scheduleDate !== undefined) {
|
|
840
|
-
b.write(
|
|
886
|
+
b.write(Primitive.Int.write(this.scheduleDate));
|
|
841
887
|
}
|
|
842
888
|
return b.buffer;
|
|
843
889
|
}
|
|
@@ -854,11 +900,20 @@ export class JoinGroupCall extends TLObject {
|
|
|
854
900
|
params;
|
|
855
901
|
constructor(params) {
|
|
856
902
|
super();
|
|
857
|
-
this.classType =
|
|
858
|
-
this.className =
|
|
903
|
+
this.classType = 'functions';
|
|
904
|
+
this.className = 'phone.JoinGroupCall';
|
|
859
905
|
this.constructorId = 0x8fb53057;
|
|
860
906
|
this.subclassOfId = 0x8af52aac;
|
|
861
|
-
this._slots = [
|
|
907
|
+
this._slots = [
|
|
908
|
+
'muted',
|
|
909
|
+
'videoStopped',
|
|
910
|
+
'call',
|
|
911
|
+
'joinAs',
|
|
912
|
+
'inviteHash',
|
|
913
|
+
'publicKey',
|
|
914
|
+
'block',
|
|
915
|
+
'params',
|
|
916
|
+
];
|
|
862
917
|
this.muted = params.muted;
|
|
863
918
|
this.videoStopped = params.videoStopped;
|
|
864
919
|
this.call = params.call;
|
|
@@ -869,36 +924,45 @@ export class JoinGroupCall extends TLObject {
|
|
|
869
924
|
this.params = params.params;
|
|
870
925
|
}
|
|
871
926
|
/**
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
927
|
+
* Generate the TLObject from buffer.
|
|
928
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
929
|
+
*/
|
|
875
930
|
static async read(_data, ..._args) {
|
|
876
931
|
// @ts-ignore
|
|
877
932
|
let flags = await Primitive.Int.read(_data);
|
|
878
|
-
let muted =
|
|
879
|
-
let videoStopped =
|
|
933
|
+
let muted = flags & (1 << 0) ? true : false;
|
|
934
|
+
let videoStopped = flags & (1 << 2) ? true : false;
|
|
880
935
|
let call = await TLObject.read(_data);
|
|
881
936
|
let joinAs = await TLObject.read(_data);
|
|
882
|
-
let inviteHash =
|
|
883
|
-
let publicKey =
|
|
884
|
-
let block =
|
|
937
|
+
let inviteHash = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
|
|
938
|
+
let publicKey = flags & (1 << 3) ? await Primitive.Int256.read(_data) : undefined;
|
|
939
|
+
let block = flags & (1 << 3) ? await Primitive.Bytes.read(_data) : undefined;
|
|
885
940
|
let params = await TLObject.read(_data);
|
|
886
|
-
return new JoinGroupCall({
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
941
|
+
return new JoinGroupCall({
|
|
942
|
+
muted: muted,
|
|
943
|
+
videoStopped: videoStopped,
|
|
944
|
+
call: call,
|
|
945
|
+
joinAs: joinAs,
|
|
946
|
+
inviteHash: inviteHash,
|
|
947
|
+
publicKey: publicKey,
|
|
948
|
+
block: block,
|
|
949
|
+
params: params,
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
/**
|
|
953
|
+
* Generate buffer from TLObject.
|
|
954
|
+
*/
|
|
891
955
|
write() {
|
|
892
956
|
const b = new BytesIO();
|
|
893
957
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
894
958
|
// @ts-ignore
|
|
895
959
|
let flags = 0;
|
|
896
|
-
flags |= this.muted ?
|
|
897
|
-
flags |= this.videoStopped ?
|
|
898
|
-
flags |= this.inviteHash !== undefined ?
|
|
899
|
-
flags |= this.publicKey !== undefined ?
|
|
900
|
-
flags |= this.block !== undefined ?
|
|
901
|
-
b.write(
|
|
960
|
+
flags |= this.muted ? 1 << 0 : 0;
|
|
961
|
+
flags |= this.videoStopped ? 1 << 2 : 0;
|
|
962
|
+
flags |= this.inviteHash !== undefined ? 1 << 1 : 0;
|
|
963
|
+
flags |= this.publicKey !== undefined ? 1 << 3 : 0;
|
|
964
|
+
flags |= this.block !== undefined ? 1 << 3 : 0;
|
|
965
|
+
b.write(Primitive.Int.write(flags));
|
|
902
966
|
if (this.call !== undefined) {
|
|
903
967
|
b.write(this.call.write());
|
|
904
968
|
}
|
|
@@ -906,13 +970,13 @@ export class JoinGroupCall extends TLObject {
|
|
|
906
970
|
b.write(this.joinAs.write());
|
|
907
971
|
}
|
|
908
972
|
if (this.inviteHash !== undefined) {
|
|
909
|
-
b.write(
|
|
973
|
+
b.write(Primitive.String.write(this.inviteHash));
|
|
910
974
|
}
|
|
911
975
|
if (this.publicKey !== undefined) {
|
|
912
|
-
b.write(
|
|
976
|
+
b.write(Primitive.Int256.write(this.publicKey));
|
|
913
977
|
}
|
|
914
978
|
if (this.block !== undefined) {
|
|
915
|
-
b.write(
|
|
979
|
+
b.write(Primitive.Bytes.write(this.block));
|
|
916
980
|
}
|
|
917
981
|
if (this.params !== undefined) {
|
|
918
982
|
b.write(this.params.write());
|
|
@@ -926,27 +990,27 @@ export class LeaveGroupCall extends TLObject {
|
|
|
926
990
|
source;
|
|
927
991
|
constructor(params) {
|
|
928
992
|
super();
|
|
929
|
-
this.classType =
|
|
930
|
-
this.className =
|
|
993
|
+
this.classType = 'functions';
|
|
994
|
+
this.className = 'phone.LeaveGroupCall';
|
|
931
995
|
this.constructorId = 0x500377f9;
|
|
932
996
|
this.subclassOfId = 0x8af52aac;
|
|
933
|
-
this._slots = [
|
|
997
|
+
this._slots = ['call', 'source'];
|
|
934
998
|
this.call = params.call;
|
|
935
999
|
this.source = params.source;
|
|
936
1000
|
}
|
|
937
1001
|
/**
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
1002
|
+
* Generate the TLObject from buffer.
|
|
1003
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1004
|
+
*/
|
|
941
1005
|
static async read(_data, ..._args) {
|
|
942
1006
|
// no flags
|
|
943
1007
|
let call = await TLObject.read(_data);
|
|
944
1008
|
let source = await Primitive.Int.read(_data);
|
|
945
|
-
return new LeaveGroupCall({
|
|
1009
|
+
return new LeaveGroupCall({ call: call, source: source });
|
|
946
1010
|
}
|
|
947
1011
|
/**
|
|
948
|
-
|
|
949
|
-
|
|
1012
|
+
* Generate buffer from TLObject.
|
|
1013
|
+
*/
|
|
950
1014
|
write() {
|
|
951
1015
|
const b = new BytesIO();
|
|
952
1016
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -955,7 +1019,7 @@ export class LeaveGroupCall extends TLObject {
|
|
|
955
1019
|
b.write(this.call.write());
|
|
956
1020
|
}
|
|
957
1021
|
if (this.source !== undefined) {
|
|
958
|
-
b.write(
|
|
1022
|
+
b.write(Primitive.Int.write(this.source));
|
|
959
1023
|
}
|
|
960
1024
|
return b.buffer;
|
|
961
1025
|
}
|
|
@@ -966,27 +1030,27 @@ export class InviteToGroupCall extends TLObject {
|
|
|
966
1030
|
users;
|
|
967
1031
|
constructor(params) {
|
|
968
1032
|
super();
|
|
969
|
-
this.classType =
|
|
970
|
-
this.className =
|
|
1033
|
+
this.classType = 'functions';
|
|
1034
|
+
this.className = 'phone.InviteToGroupCall';
|
|
971
1035
|
this.constructorId = 0x7b393160;
|
|
972
1036
|
this.subclassOfId = 0x8af52aac;
|
|
973
|
-
this._slots = [
|
|
1037
|
+
this._slots = ['call', 'users'];
|
|
974
1038
|
this.call = params.call;
|
|
975
1039
|
this.users = params.users;
|
|
976
1040
|
}
|
|
977
1041
|
/**
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
1042
|
+
* Generate the TLObject from buffer.
|
|
1043
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1044
|
+
*/
|
|
981
1045
|
static async read(_data, ..._args) {
|
|
982
1046
|
// no flags
|
|
983
1047
|
let call = await TLObject.read(_data);
|
|
984
1048
|
let users = await TLObject.read(_data);
|
|
985
|
-
return new InviteToGroupCall({
|
|
1049
|
+
return new InviteToGroupCall({ call: call, users: users });
|
|
986
1050
|
}
|
|
987
1051
|
/**
|
|
988
|
-
|
|
989
|
-
|
|
1052
|
+
* Generate buffer from TLObject.
|
|
1053
|
+
*/
|
|
990
1054
|
write() {
|
|
991
1055
|
const b = new BytesIO();
|
|
992
1056
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -995,7 +1059,7 @@ export class InviteToGroupCall extends TLObject {
|
|
|
995
1059
|
b.write(this.call.write());
|
|
996
1060
|
}
|
|
997
1061
|
if (this.users) {
|
|
998
|
-
b.write(
|
|
1062
|
+
b.write(Primitive.Vector.write(this.users));
|
|
999
1063
|
}
|
|
1000
1064
|
return b.buffer;
|
|
1001
1065
|
}
|
|
@@ -1005,25 +1069,25 @@ export class DiscardGroupCall extends TLObject {
|
|
|
1005
1069
|
call;
|
|
1006
1070
|
constructor(params) {
|
|
1007
1071
|
super();
|
|
1008
|
-
this.classType =
|
|
1009
|
-
this.className =
|
|
1072
|
+
this.classType = 'functions';
|
|
1073
|
+
this.className = 'phone.DiscardGroupCall';
|
|
1010
1074
|
this.constructorId = 0x7a777135;
|
|
1011
1075
|
this.subclassOfId = 0x8af52aac;
|
|
1012
|
-
this._slots = [
|
|
1076
|
+
this._slots = ['call'];
|
|
1013
1077
|
this.call = params.call;
|
|
1014
1078
|
}
|
|
1015
1079
|
/**
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1080
|
+
* Generate the TLObject from buffer.
|
|
1081
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1082
|
+
*/
|
|
1019
1083
|
static async read(_data, ..._args) {
|
|
1020
1084
|
// no flags
|
|
1021
1085
|
let call = await TLObject.read(_data);
|
|
1022
|
-
return new DiscardGroupCall({
|
|
1086
|
+
return new DiscardGroupCall({ call: call });
|
|
1023
1087
|
}
|
|
1024
1088
|
/**
|
|
1025
|
-
|
|
1026
|
-
|
|
1089
|
+
* Generate buffer from TLObject.
|
|
1090
|
+
*/
|
|
1027
1091
|
write() {
|
|
1028
1092
|
const b = new BytesIO();
|
|
1029
1093
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1043,11 +1107,17 @@ export class ToggleGroupCallSettings extends TLObject {
|
|
|
1043
1107
|
sendPaidMessagesStars;
|
|
1044
1108
|
constructor(params) {
|
|
1045
1109
|
super();
|
|
1046
|
-
this.classType =
|
|
1047
|
-
this.className =
|
|
1110
|
+
this.classType = 'functions';
|
|
1111
|
+
this.className = 'phone.ToggleGroupCallSettings';
|
|
1048
1112
|
this.constructorId = 0x974392f2;
|
|
1049
1113
|
this.subclassOfId = 0x8af52aac;
|
|
1050
|
-
this._slots = [
|
|
1114
|
+
this._slots = [
|
|
1115
|
+
'resetInviteHash',
|
|
1116
|
+
'call',
|
|
1117
|
+
'joinMuted',
|
|
1118
|
+
'messagesEnabled',
|
|
1119
|
+
'sendPaidMessagesStars',
|
|
1120
|
+
];
|
|
1051
1121
|
this.resetInviteHash = params.resetInviteHash;
|
|
1052
1122
|
this.call = params.call;
|
|
1053
1123
|
this.joinMuted = params.joinMuted;
|
|
@@ -1055,43 +1125,49 @@ export class ToggleGroupCallSettings extends TLObject {
|
|
|
1055
1125
|
this.sendPaidMessagesStars = params.sendPaidMessagesStars;
|
|
1056
1126
|
}
|
|
1057
1127
|
/**
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1128
|
+
* Generate the TLObject from buffer.
|
|
1129
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1130
|
+
*/
|
|
1061
1131
|
static async read(_data, ..._args) {
|
|
1062
1132
|
// @ts-ignore
|
|
1063
1133
|
let flags = await Primitive.Int.read(_data);
|
|
1064
|
-
let resetInviteHash =
|
|
1134
|
+
let resetInviteHash = flags & (1 << 1) ? true : false;
|
|
1065
1135
|
let call = await TLObject.read(_data);
|
|
1066
|
-
let joinMuted =
|
|
1067
|
-
let messagesEnabled =
|
|
1068
|
-
let sendPaidMessagesStars =
|
|
1069
|
-
return new ToggleGroupCallSettings({
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1136
|
+
let joinMuted = flags & (1 << 0) ? await Primitive.Bool.read(_data) : undefined;
|
|
1137
|
+
let messagesEnabled = flags & (1 << 2) ? await Primitive.Bool.read(_data) : undefined;
|
|
1138
|
+
let sendPaidMessagesStars = flags & (1 << 3) ? await Primitive.Long.read(_data) : undefined;
|
|
1139
|
+
return new ToggleGroupCallSettings({
|
|
1140
|
+
resetInviteHash: resetInviteHash,
|
|
1141
|
+
call: call,
|
|
1142
|
+
joinMuted: joinMuted,
|
|
1143
|
+
messagesEnabled: messagesEnabled,
|
|
1144
|
+
sendPaidMessagesStars: sendPaidMessagesStars,
|
|
1145
|
+
});
|
|
1146
|
+
}
|
|
1147
|
+
/**
|
|
1148
|
+
* Generate buffer from TLObject.
|
|
1149
|
+
*/
|
|
1074
1150
|
write() {
|
|
1075
1151
|
const b = new BytesIO();
|
|
1076
1152
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1077
1153
|
// @ts-ignore
|
|
1078
1154
|
let flags = 0;
|
|
1079
|
-
flags |= this.resetInviteHash ?
|
|
1080
|
-
flags |= this.joinMuted !== undefined ?
|
|
1081
|
-
flags |= this.messagesEnabled !== undefined ?
|
|
1082
|
-
flags |= this.sendPaidMessagesStars !== undefined ?
|
|
1083
|
-
b.write(
|
|
1155
|
+
flags |= this.resetInviteHash ? 1 << 1 : 0;
|
|
1156
|
+
flags |= this.joinMuted !== undefined ? 1 << 0 : 0;
|
|
1157
|
+
flags |= this.messagesEnabled !== undefined ? 1 << 2 : 0;
|
|
1158
|
+
flags |= this.sendPaidMessagesStars !== undefined ? 1 << 3 : 0;
|
|
1159
|
+
b.write(Primitive.Int.write(flags));
|
|
1084
1160
|
if (this.call !== undefined) {
|
|
1085
1161
|
b.write(this.call.write());
|
|
1086
1162
|
}
|
|
1087
1163
|
if (this.joinMuted !== undefined) {
|
|
1088
|
-
b.write(
|
|
1164
|
+
b.write(Primitive.Bool.write(this.joinMuted));
|
|
1089
1165
|
}
|
|
1090
1166
|
if (this.messagesEnabled !== undefined) {
|
|
1091
|
-
b.write(
|
|
1167
|
+
b.write(Primitive.Bool.write(this.messagesEnabled));
|
|
1092
1168
|
}
|
|
1093
1169
|
if (this.sendPaidMessagesStars !== undefined) {
|
|
1094
|
-
b.write(
|
|
1170
|
+
b.write(Primitive.Long.write(this.sendPaidMessagesStars));
|
|
1095
1171
|
}
|
|
1096
1172
|
return b.buffer;
|
|
1097
1173
|
}
|
|
@@ -1102,27 +1178,27 @@ export class GetGroupCall extends TLObject {
|
|
|
1102
1178
|
limit;
|
|
1103
1179
|
constructor(params) {
|
|
1104
1180
|
super();
|
|
1105
|
-
this.classType =
|
|
1106
|
-
this.className =
|
|
1181
|
+
this.classType = 'functions';
|
|
1182
|
+
this.className = 'phone.GetGroupCall';
|
|
1107
1183
|
this.constructorId = 0x41845db;
|
|
1108
1184
|
this.subclassOfId = 0x304116be;
|
|
1109
|
-
this._slots = [
|
|
1185
|
+
this._slots = ['call', 'limit'];
|
|
1110
1186
|
this.call = params.call;
|
|
1111
1187
|
this.limit = params.limit;
|
|
1112
1188
|
}
|
|
1113
1189
|
/**
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1190
|
+
* Generate the TLObject from buffer.
|
|
1191
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1192
|
+
*/
|
|
1117
1193
|
static async read(_data, ..._args) {
|
|
1118
1194
|
// no flags
|
|
1119
1195
|
let call = await TLObject.read(_data);
|
|
1120
1196
|
let limit = await Primitive.Int.read(_data);
|
|
1121
|
-
return new GetGroupCall({
|
|
1197
|
+
return new GetGroupCall({ call: call, limit: limit });
|
|
1122
1198
|
}
|
|
1123
1199
|
/**
|
|
1124
|
-
|
|
1125
|
-
|
|
1200
|
+
* Generate buffer from TLObject.
|
|
1201
|
+
*/
|
|
1126
1202
|
write() {
|
|
1127
1203
|
const b = new BytesIO();
|
|
1128
1204
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1131,7 +1207,7 @@ export class GetGroupCall extends TLObject {
|
|
|
1131
1207
|
b.write(this.call.write());
|
|
1132
1208
|
}
|
|
1133
1209
|
if (this.limit !== undefined) {
|
|
1134
|
-
b.write(
|
|
1210
|
+
b.write(Primitive.Int.write(this.limit));
|
|
1135
1211
|
}
|
|
1136
1212
|
return b.buffer;
|
|
1137
1213
|
}
|
|
@@ -1145,11 +1221,11 @@ export class GetGroupParticipants extends TLObject {
|
|
|
1145
1221
|
limit;
|
|
1146
1222
|
constructor(params) {
|
|
1147
1223
|
super();
|
|
1148
|
-
this.classType =
|
|
1149
|
-
this.className =
|
|
1224
|
+
this.classType = 'functions';
|
|
1225
|
+
this.className = 'phone.GetGroupParticipants';
|
|
1150
1226
|
this.constructorId = 0xc558d8ab;
|
|
1151
1227
|
this.subclassOfId = 0x72d304f4;
|
|
1152
|
-
this._slots = [
|
|
1228
|
+
this._slots = ['call', 'ids', 'sources', 'offset', 'limit'];
|
|
1153
1229
|
this.call = params.call;
|
|
1154
1230
|
this.ids = params.ids;
|
|
1155
1231
|
this.sources = params.sources;
|
|
@@ -1157,9 +1233,9 @@ export class GetGroupParticipants extends TLObject {
|
|
|
1157
1233
|
this.limit = params.limit;
|
|
1158
1234
|
}
|
|
1159
1235
|
/**
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1236
|
+
* Generate the TLObject from buffer.
|
|
1237
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1238
|
+
*/
|
|
1163
1239
|
static async read(_data, ..._args) {
|
|
1164
1240
|
// no flags
|
|
1165
1241
|
let call = await TLObject.read(_data);
|
|
@@ -1167,11 +1243,17 @@ export class GetGroupParticipants extends TLObject {
|
|
|
1167
1243
|
let sources = await TLObject.read(_data, Primitive.Int);
|
|
1168
1244
|
let offset = await Primitive.String.read(_data);
|
|
1169
1245
|
let limit = await Primitive.Int.read(_data);
|
|
1170
|
-
return new GetGroupParticipants({
|
|
1246
|
+
return new GetGroupParticipants({
|
|
1247
|
+
call: call,
|
|
1248
|
+
ids: ids,
|
|
1249
|
+
sources: sources,
|
|
1250
|
+
offset: offset,
|
|
1251
|
+
limit: limit,
|
|
1252
|
+
});
|
|
1171
1253
|
}
|
|
1172
1254
|
/**
|
|
1173
|
-
|
|
1174
|
-
|
|
1255
|
+
* Generate buffer from TLObject.
|
|
1256
|
+
*/
|
|
1175
1257
|
write() {
|
|
1176
1258
|
const b = new BytesIO();
|
|
1177
1259
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1180,16 +1262,16 @@ export class GetGroupParticipants extends TLObject {
|
|
|
1180
1262
|
b.write(this.call.write());
|
|
1181
1263
|
}
|
|
1182
1264
|
if (this.ids) {
|
|
1183
|
-
b.write(
|
|
1265
|
+
b.write(Primitive.Vector.write(this.ids));
|
|
1184
1266
|
}
|
|
1185
1267
|
if (this.sources) {
|
|
1186
|
-
b.write(
|
|
1268
|
+
b.write(Primitive.Vector.write(this.sources, Primitive.Int));
|
|
1187
1269
|
}
|
|
1188
1270
|
if (this.offset !== undefined) {
|
|
1189
|
-
b.write(
|
|
1271
|
+
b.write(Primitive.String.write(this.offset));
|
|
1190
1272
|
}
|
|
1191
1273
|
if (this.limit !== undefined) {
|
|
1192
|
-
b.write(
|
|
1274
|
+
b.write(Primitive.Int.write(this.limit));
|
|
1193
1275
|
}
|
|
1194
1276
|
return b.buffer;
|
|
1195
1277
|
}
|
|
@@ -1200,27 +1282,27 @@ export class CheckGroupCall extends TLObject {
|
|
|
1200
1282
|
sources;
|
|
1201
1283
|
constructor(params) {
|
|
1202
1284
|
super();
|
|
1203
|
-
this.classType =
|
|
1204
|
-
this.className =
|
|
1285
|
+
this.classType = 'functions';
|
|
1286
|
+
this.className = 'phone.CheckGroupCall';
|
|
1205
1287
|
this.constructorId = 0xb59cf977;
|
|
1206
1288
|
this.subclassOfId = 0x5026710f;
|
|
1207
|
-
this._slots = [
|
|
1289
|
+
this._slots = ['call', 'sources'];
|
|
1208
1290
|
this.call = params.call;
|
|
1209
1291
|
this.sources = params.sources;
|
|
1210
1292
|
}
|
|
1211
1293
|
/**
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1294
|
+
* Generate the TLObject from buffer.
|
|
1295
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1296
|
+
*/
|
|
1215
1297
|
static async read(_data, ..._args) {
|
|
1216
1298
|
// no flags
|
|
1217
1299
|
let call = await TLObject.read(_data);
|
|
1218
1300
|
let sources = await TLObject.read(_data, Primitive.Int);
|
|
1219
|
-
return new CheckGroupCall({
|
|
1301
|
+
return new CheckGroupCall({ call: call, sources: sources });
|
|
1220
1302
|
}
|
|
1221
1303
|
/**
|
|
1222
|
-
|
|
1223
|
-
|
|
1304
|
+
* Generate buffer from TLObject.
|
|
1305
|
+
*/
|
|
1224
1306
|
write() {
|
|
1225
1307
|
const b = new BytesIO();
|
|
1226
1308
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1229,7 +1311,7 @@ export class CheckGroupCall extends TLObject {
|
|
|
1229
1311
|
b.write(this.call.write());
|
|
1230
1312
|
}
|
|
1231
1313
|
if (this.sources) {
|
|
1232
|
-
b.write(
|
|
1314
|
+
b.write(Primitive.Vector.write(this.sources, Primitive.Int));
|
|
1233
1315
|
}
|
|
1234
1316
|
return b.buffer;
|
|
1235
1317
|
}
|
|
@@ -1243,11 +1325,11 @@ export class ToggleGroupCallRecord extends TLObject {
|
|
|
1243
1325
|
videoPortrait;
|
|
1244
1326
|
constructor(params) {
|
|
1245
1327
|
super();
|
|
1246
|
-
this.classType =
|
|
1247
|
-
this.className =
|
|
1328
|
+
this.classType = 'functions';
|
|
1329
|
+
this.className = 'phone.ToggleGroupCallRecord';
|
|
1248
1330
|
this.constructorId = 0xf128c708;
|
|
1249
1331
|
this.subclassOfId = 0x8af52aac;
|
|
1250
|
-
this._slots = [
|
|
1332
|
+
this._slots = ['start', 'video', 'call', 'title', 'videoPortrait'];
|
|
1251
1333
|
this.start = params.start;
|
|
1252
1334
|
this.video = params.video;
|
|
1253
1335
|
this.call = params.call;
|
|
@@ -1255,40 +1337,46 @@ export class ToggleGroupCallRecord extends TLObject {
|
|
|
1255
1337
|
this.videoPortrait = params.videoPortrait;
|
|
1256
1338
|
}
|
|
1257
1339
|
/**
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1340
|
+
* Generate the TLObject from buffer.
|
|
1341
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1342
|
+
*/
|
|
1261
1343
|
static async read(_data, ..._args) {
|
|
1262
1344
|
// @ts-ignore
|
|
1263
1345
|
let flags = await Primitive.Int.read(_data);
|
|
1264
|
-
let start =
|
|
1265
|
-
let video =
|
|
1346
|
+
let start = flags & (1 << 0) ? true : false;
|
|
1347
|
+
let video = flags & (1 << 2) ? true : false;
|
|
1266
1348
|
let call = await TLObject.read(_data);
|
|
1267
|
-
let title =
|
|
1268
|
-
let videoPortrait =
|
|
1269
|
-
return new ToggleGroupCallRecord({
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1349
|
+
let title = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
|
|
1350
|
+
let videoPortrait = flags & (1 << 2) ? await Primitive.Bool.read(_data) : undefined;
|
|
1351
|
+
return new ToggleGroupCallRecord({
|
|
1352
|
+
start: start,
|
|
1353
|
+
video: video,
|
|
1354
|
+
call: call,
|
|
1355
|
+
title: title,
|
|
1356
|
+
videoPortrait: videoPortrait,
|
|
1357
|
+
});
|
|
1358
|
+
}
|
|
1359
|
+
/**
|
|
1360
|
+
* Generate buffer from TLObject.
|
|
1361
|
+
*/
|
|
1274
1362
|
write() {
|
|
1275
1363
|
const b = new BytesIO();
|
|
1276
1364
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1277
1365
|
// @ts-ignore
|
|
1278
1366
|
let flags = 0;
|
|
1279
|
-
flags |= this.start ?
|
|
1280
|
-
flags |= this.video ?
|
|
1281
|
-
flags |= this.title !== undefined ?
|
|
1282
|
-
flags |= this.videoPortrait !== undefined ?
|
|
1283
|
-
b.write(
|
|
1367
|
+
flags |= this.start ? 1 << 0 : 0;
|
|
1368
|
+
flags |= this.video ? 1 << 2 : 0;
|
|
1369
|
+
flags |= this.title !== undefined ? 1 << 1 : 0;
|
|
1370
|
+
flags |= this.videoPortrait !== undefined ? 1 << 2 : 0;
|
|
1371
|
+
b.write(Primitive.Int.write(flags));
|
|
1284
1372
|
if (this.call !== undefined) {
|
|
1285
1373
|
b.write(this.call.write());
|
|
1286
1374
|
}
|
|
1287
1375
|
if (this.title !== undefined) {
|
|
1288
|
-
b.write(
|
|
1376
|
+
b.write(Primitive.String.write(this.title));
|
|
1289
1377
|
}
|
|
1290
1378
|
if (this.videoPortrait !== undefined) {
|
|
1291
|
-
b.write(
|
|
1379
|
+
b.write(Primitive.Bool.write(this.videoPortrait));
|
|
1292
1380
|
}
|
|
1293
1381
|
return b.buffer;
|
|
1294
1382
|
}
|
|
@@ -1305,11 +1393,20 @@ export class EditGroupCallParticipant extends TLObject {
|
|
|
1305
1393
|
presentationPaused;
|
|
1306
1394
|
constructor(params) {
|
|
1307
1395
|
super();
|
|
1308
|
-
this.classType =
|
|
1309
|
-
this.className =
|
|
1396
|
+
this.classType = 'functions';
|
|
1397
|
+
this.className = 'phone.EditGroupCallParticipant';
|
|
1310
1398
|
this.constructorId = 0xa5273abf;
|
|
1311
1399
|
this.subclassOfId = 0x8af52aac;
|
|
1312
|
-
this._slots = [
|
|
1400
|
+
this._slots = [
|
|
1401
|
+
'call',
|
|
1402
|
+
'participant',
|
|
1403
|
+
'muted',
|
|
1404
|
+
'volume',
|
|
1405
|
+
'raiseHand',
|
|
1406
|
+
'videoStopped',
|
|
1407
|
+
'videoPaused',
|
|
1408
|
+
'presentationPaused',
|
|
1409
|
+
];
|
|
1313
1410
|
this.call = params.call;
|
|
1314
1411
|
this.participant = params.participant;
|
|
1315
1412
|
this.muted = params.muted;
|
|
@@ -1320,37 +1417,46 @@ export class EditGroupCallParticipant extends TLObject {
|
|
|
1320
1417
|
this.presentationPaused = params.presentationPaused;
|
|
1321
1418
|
}
|
|
1322
1419
|
/**
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1420
|
+
* Generate the TLObject from buffer.
|
|
1421
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1422
|
+
*/
|
|
1326
1423
|
static async read(_data, ..._args) {
|
|
1327
1424
|
// @ts-ignore
|
|
1328
1425
|
let flags = await Primitive.Int.read(_data);
|
|
1329
1426
|
let call = await TLObject.read(_data);
|
|
1330
1427
|
let participant = await TLObject.read(_data);
|
|
1331
|
-
let muted =
|
|
1332
|
-
let volume =
|
|
1333
|
-
let raiseHand =
|
|
1334
|
-
let videoStopped =
|
|
1335
|
-
let videoPaused =
|
|
1336
|
-
let presentationPaused =
|
|
1337
|
-
return new EditGroupCallParticipant({
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1428
|
+
let muted = flags & (1 << 0) ? await Primitive.Bool.read(_data) : undefined;
|
|
1429
|
+
let volume = flags & (1 << 1) ? await Primitive.Int.read(_data) : undefined;
|
|
1430
|
+
let raiseHand = flags & (1 << 2) ? await Primitive.Bool.read(_data) : undefined;
|
|
1431
|
+
let videoStopped = flags & (1 << 3) ? await Primitive.Bool.read(_data) : undefined;
|
|
1432
|
+
let videoPaused = flags & (1 << 4) ? await Primitive.Bool.read(_data) : undefined;
|
|
1433
|
+
let presentationPaused = flags & (1 << 5) ? await Primitive.Bool.read(_data) : undefined;
|
|
1434
|
+
return new EditGroupCallParticipant({
|
|
1435
|
+
call: call,
|
|
1436
|
+
participant: participant,
|
|
1437
|
+
muted: muted,
|
|
1438
|
+
volume: volume,
|
|
1439
|
+
raiseHand: raiseHand,
|
|
1440
|
+
videoStopped: videoStopped,
|
|
1441
|
+
videoPaused: videoPaused,
|
|
1442
|
+
presentationPaused: presentationPaused,
|
|
1443
|
+
});
|
|
1444
|
+
}
|
|
1445
|
+
/**
|
|
1446
|
+
* Generate buffer from TLObject.
|
|
1447
|
+
*/
|
|
1342
1448
|
write() {
|
|
1343
1449
|
const b = new BytesIO();
|
|
1344
1450
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1345
1451
|
// @ts-ignore
|
|
1346
1452
|
let flags = 0;
|
|
1347
|
-
flags |= this.muted !== undefined ?
|
|
1348
|
-
flags |= this.volume !== undefined ?
|
|
1349
|
-
flags |= this.raiseHand !== undefined ?
|
|
1350
|
-
flags |= this.videoStopped !== undefined ?
|
|
1351
|
-
flags |= this.videoPaused !== undefined ?
|
|
1352
|
-
flags |= this.presentationPaused !== undefined ?
|
|
1353
|
-
b.write(
|
|
1453
|
+
flags |= this.muted !== undefined ? 1 << 0 : 0;
|
|
1454
|
+
flags |= this.volume !== undefined ? 1 << 1 : 0;
|
|
1455
|
+
flags |= this.raiseHand !== undefined ? 1 << 2 : 0;
|
|
1456
|
+
flags |= this.videoStopped !== undefined ? 1 << 3 : 0;
|
|
1457
|
+
flags |= this.videoPaused !== undefined ? 1 << 4 : 0;
|
|
1458
|
+
flags |= this.presentationPaused !== undefined ? 1 << 5 : 0;
|
|
1459
|
+
b.write(Primitive.Int.write(flags));
|
|
1354
1460
|
if (this.call !== undefined) {
|
|
1355
1461
|
b.write(this.call.write());
|
|
1356
1462
|
}
|
|
@@ -1358,22 +1464,22 @@ export class EditGroupCallParticipant extends TLObject {
|
|
|
1358
1464
|
b.write(this.participant.write());
|
|
1359
1465
|
}
|
|
1360
1466
|
if (this.muted !== undefined) {
|
|
1361
|
-
b.write(
|
|
1467
|
+
b.write(Primitive.Bool.write(this.muted));
|
|
1362
1468
|
}
|
|
1363
1469
|
if (this.volume !== undefined) {
|
|
1364
|
-
b.write(
|
|
1470
|
+
b.write(Primitive.Int.write(this.volume));
|
|
1365
1471
|
}
|
|
1366
1472
|
if (this.raiseHand !== undefined) {
|
|
1367
|
-
b.write(
|
|
1473
|
+
b.write(Primitive.Bool.write(this.raiseHand));
|
|
1368
1474
|
}
|
|
1369
1475
|
if (this.videoStopped !== undefined) {
|
|
1370
|
-
b.write(
|
|
1476
|
+
b.write(Primitive.Bool.write(this.videoStopped));
|
|
1371
1477
|
}
|
|
1372
1478
|
if (this.videoPaused !== undefined) {
|
|
1373
|
-
b.write(
|
|
1479
|
+
b.write(Primitive.Bool.write(this.videoPaused));
|
|
1374
1480
|
}
|
|
1375
1481
|
if (this.presentationPaused !== undefined) {
|
|
1376
|
-
b.write(
|
|
1482
|
+
b.write(Primitive.Bool.write(this.presentationPaused));
|
|
1377
1483
|
}
|
|
1378
1484
|
return b.buffer;
|
|
1379
1485
|
}
|
|
@@ -1384,27 +1490,27 @@ export class EditGroupCallTitle extends TLObject {
|
|
|
1384
1490
|
title;
|
|
1385
1491
|
constructor(params) {
|
|
1386
1492
|
super();
|
|
1387
|
-
this.classType =
|
|
1388
|
-
this.className =
|
|
1493
|
+
this.classType = 'functions';
|
|
1494
|
+
this.className = 'phone.EditGroupCallTitle';
|
|
1389
1495
|
this.constructorId = 0x1ca6ac0a;
|
|
1390
1496
|
this.subclassOfId = 0x8af52aac;
|
|
1391
|
-
this._slots = [
|
|
1497
|
+
this._slots = ['call', 'title'];
|
|
1392
1498
|
this.call = params.call;
|
|
1393
1499
|
this.title = params.title;
|
|
1394
1500
|
}
|
|
1395
1501
|
/**
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1502
|
+
* Generate the TLObject from buffer.
|
|
1503
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1504
|
+
*/
|
|
1399
1505
|
static async read(_data, ..._args) {
|
|
1400
1506
|
// no flags
|
|
1401
1507
|
let call = await TLObject.read(_data);
|
|
1402
1508
|
let title = await Primitive.String.read(_data);
|
|
1403
|
-
return new EditGroupCallTitle({
|
|
1509
|
+
return new EditGroupCallTitle({ call: call, title: title });
|
|
1404
1510
|
}
|
|
1405
1511
|
/**
|
|
1406
|
-
|
|
1407
|
-
|
|
1512
|
+
* Generate buffer from TLObject.
|
|
1513
|
+
*/
|
|
1408
1514
|
write() {
|
|
1409
1515
|
const b = new BytesIO();
|
|
1410
1516
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1413,7 +1519,7 @@ export class EditGroupCallTitle extends TLObject {
|
|
|
1413
1519
|
b.write(this.call.write());
|
|
1414
1520
|
}
|
|
1415
1521
|
if (this.title !== undefined) {
|
|
1416
|
-
b.write(
|
|
1522
|
+
b.write(Primitive.String.write(this.title));
|
|
1417
1523
|
}
|
|
1418
1524
|
return b.buffer;
|
|
1419
1525
|
}
|
|
@@ -1423,25 +1529,25 @@ export class GetGroupCallJoinAs extends TLObject {
|
|
|
1423
1529
|
peer;
|
|
1424
1530
|
constructor(params) {
|
|
1425
1531
|
super();
|
|
1426
|
-
this.classType =
|
|
1427
|
-
this.className =
|
|
1532
|
+
this.classType = 'functions';
|
|
1533
|
+
this.className = 'phone.GetGroupCallJoinAs';
|
|
1428
1534
|
this.constructorId = 0xef7c213a;
|
|
1429
1535
|
this.subclassOfId = 0xb4b770fb;
|
|
1430
|
-
this._slots = [
|
|
1536
|
+
this._slots = ['peer'];
|
|
1431
1537
|
this.peer = params.peer;
|
|
1432
1538
|
}
|
|
1433
1539
|
/**
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1540
|
+
* Generate the TLObject from buffer.
|
|
1541
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1542
|
+
*/
|
|
1437
1543
|
static async read(_data, ..._args) {
|
|
1438
1544
|
// no flags
|
|
1439
1545
|
let peer = await TLObject.read(_data);
|
|
1440
|
-
return new GetGroupCallJoinAs({
|
|
1546
|
+
return new GetGroupCallJoinAs({ peer: peer });
|
|
1441
1547
|
}
|
|
1442
1548
|
/**
|
|
1443
|
-
|
|
1444
|
-
|
|
1549
|
+
* Generate buffer from TLObject.
|
|
1550
|
+
*/
|
|
1445
1551
|
write() {
|
|
1446
1552
|
const b = new BytesIO();
|
|
1447
1553
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1458,35 +1564,35 @@ export class ExportGroupCallInvite extends TLObject {
|
|
|
1458
1564
|
call;
|
|
1459
1565
|
constructor(params) {
|
|
1460
1566
|
super();
|
|
1461
|
-
this.classType =
|
|
1462
|
-
this.className =
|
|
1567
|
+
this.classType = 'functions';
|
|
1568
|
+
this.className = 'phone.ExportGroupCallInvite';
|
|
1463
1569
|
this.constructorId = 0xe6aa647f;
|
|
1464
1570
|
this.subclassOfId = 0x3b3bfe8f;
|
|
1465
|
-
this._slots = [
|
|
1571
|
+
this._slots = ['canSelfUnmute', 'call'];
|
|
1466
1572
|
this.canSelfUnmute = params.canSelfUnmute;
|
|
1467
1573
|
this.call = params.call;
|
|
1468
1574
|
}
|
|
1469
1575
|
/**
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1576
|
+
* Generate the TLObject from buffer.
|
|
1577
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1578
|
+
*/
|
|
1473
1579
|
static async read(_data, ..._args) {
|
|
1474
1580
|
// @ts-ignore
|
|
1475
1581
|
let flags = await Primitive.Int.read(_data);
|
|
1476
|
-
let canSelfUnmute =
|
|
1582
|
+
let canSelfUnmute = flags & (1 << 0) ? true : false;
|
|
1477
1583
|
let call = await TLObject.read(_data);
|
|
1478
|
-
return new ExportGroupCallInvite({
|
|
1584
|
+
return new ExportGroupCallInvite({ canSelfUnmute: canSelfUnmute, call: call });
|
|
1479
1585
|
}
|
|
1480
1586
|
/**
|
|
1481
|
-
|
|
1482
|
-
|
|
1587
|
+
* Generate buffer from TLObject.
|
|
1588
|
+
*/
|
|
1483
1589
|
write() {
|
|
1484
1590
|
const b = new BytesIO();
|
|
1485
1591
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1486
1592
|
// @ts-ignore
|
|
1487
1593
|
let flags = 0;
|
|
1488
|
-
flags |= this.canSelfUnmute ?
|
|
1489
|
-
b.write(
|
|
1594
|
+
flags |= this.canSelfUnmute ? 1 << 0 : 0;
|
|
1595
|
+
b.write(Primitive.Int.write(flags));
|
|
1490
1596
|
if (this.call !== undefined) {
|
|
1491
1597
|
b.write(this.call.write());
|
|
1492
1598
|
}
|
|
@@ -1499,27 +1605,27 @@ export class ToggleGroupCallStartSubscription extends TLObject {
|
|
|
1499
1605
|
subscribed;
|
|
1500
1606
|
constructor(params) {
|
|
1501
1607
|
super();
|
|
1502
|
-
this.classType =
|
|
1503
|
-
this.className =
|
|
1608
|
+
this.classType = 'functions';
|
|
1609
|
+
this.className = 'phone.ToggleGroupCallStartSubscription';
|
|
1504
1610
|
this.constructorId = 0x219c34e6;
|
|
1505
1611
|
this.subclassOfId = 0x8af52aac;
|
|
1506
|
-
this._slots = [
|
|
1612
|
+
this._slots = ['call', 'subscribed'];
|
|
1507
1613
|
this.call = params.call;
|
|
1508
1614
|
this.subscribed = params.subscribed;
|
|
1509
1615
|
}
|
|
1510
1616
|
/**
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1617
|
+
* Generate the TLObject from buffer.
|
|
1618
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1619
|
+
*/
|
|
1514
1620
|
static async read(_data, ..._args) {
|
|
1515
1621
|
// no flags
|
|
1516
1622
|
let call = await TLObject.read(_data);
|
|
1517
1623
|
let subscribed = await Primitive.Bool.read(_data);
|
|
1518
|
-
return new ToggleGroupCallStartSubscription({
|
|
1624
|
+
return new ToggleGroupCallStartSubscription({ call: call, subscribed: subscribed });
|
|
1519
1625
|
}
|
|
1520
1626
|
/**
|
|
1521
|
-
|
|
1522
|
-
|
|
1627
|
+
* Generate buffer from TLObject.
|
|
1628
|
+
*/
|
|
1523
1629
|
write() {
|
|
1524
1630
|
const b = new BytesIO();
|
|
1525
1631
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1528,7 +1634,7 @@ export class ToggleGroupCallStartSubscription extends TLObject {
|
|
|
1528
1634
|
b.write(this.call.write());
|
|
1529
1635
|
}
|
|
1530
1636
|
if (this.subscribed !== undefined) {
|
|
1531
|
-
b.write(
|
|
1637
|
+
b.write(Primitive.Bool.write(this.subscribed));
|
|
1532
1638
|
}
|
|
1533
1639
|
return b.buffer;
|
|
1534
1640
|
}
|
|
@@ -1538,25 +1644,25 @@ export class StartScheduledGroupCall extends TLObject {
|
|
|
1538
1644
|
call;
|
|
1539
1645
|
constructor(params) {
|
|
1540
1646
|
super();
|
|
1541
|
-
this.classType =
|
|
1542
|
-
this.className =
|
|
1647
|
+
this.classType = 'functions';
|
|
1648
|
+
this.className = 'phone.StartScheduledGroupCall';
|
|
1543
1649
|
this.constructorId = 0x5680e342;
|
|
1544
1650
|
this.subclassOfId = 0x8af52aac;
|
|
1545
|
-
this._slots = [
|
|
1651
|
+
this._slots = ['call'];
|
|
1546
1652
|
this.call = params.call;
|
|
1547
1653
|
}
|
|
1548
1654
|
/**
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1655
|
+
* Generate the TLObject from buffer.
|
|
1656
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1657
|
+
*/
|
|
1552
1658
|
static async read(_data, ..._args) {
|
|
1553
1659
|
// no flags
|
|
1554
1660
|
let call = await TLObject.read(_data);
|
|
1555
|
-
return new StartScheduledGroupCall({
|
|
1661
|
+
return new StartScheduledGroupCall({ call: call });
|
|
1556
1662
|
}
|
|
1557
1663
|
/**
|
|
1558
|
-
|
|
1559
|
-
|
|
1664
|
+
* Generate buffer from TLObject.
|
|
1665
|
+
*/
|
|
1560
1666
|
write() {
|
|
1561
1667
|
const b = new BytesIO();
|
|
1562
1668
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1573,27 +1679,27 @@ export class SaveDefaultGroupCallJoinAs extends TLObject {
|
|
|
1573
1679
|
joinAs;
|
|
1574
1680
|
constructor(params) {
|
|
1575
1681
|
super();
|
|
1576
|
-
this.classType =
|
|
1577
|
-
this.className =
|
|
1682
|
+
this.classType = 'functions';
|
|
1683
|
+
this.className = 'phone.SaveDefaultGroupCallJoinAs';
|
|
1578
1684
|
this.constructorId = 0x575e1f8c;
|
|
1579
1685
|
this.subclassOfId = 0xf5b399ac;
|
|
1580
|
-
this._slots = [
|
|
1686
|
+
this._slots = ['peer', 'joinAs'];
|
|
1581
1687
|
this.peer = params.peer;
|
|
1582
1688
|
this.joinAs = params.joinAs;
|
|
1583
1689
|
}
|
|
1584
1690
|
/**
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1691
|
+
* Generate the TLObject from buffer.
|
|
1692
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1693
|
+
*/
|
|
1588
1694
|
static async read(_data, ..._args) {
|
|
1589
1695
|
// no flags
|
|
1590
1696
|
let peer = await TLObject.read(_data);
|
|
1591
1697
|
let joinAs = await TLObject.read(_data);
|
|
1592
|
-
return new SaveDefaultGroupCallJoinAs({
|
|
1698
|
+
return new SaveDefaultGroupCallJoinAs({ peer: peer, joinAs: joinAs });
|
|
1593
1699
|
}
|
|
1594
1700
|
/**
|
|
1595
|
-
|
|
1596
|
-
|
|
1701
|
+
* Generate buffer from TLObject.
|
|
1702
|
+
*/
|
|
1597
1703
|
write() {
|
|
1598
1704
|
const b = new BytesIO();
|
|
1599
1705
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1613,27 +1719,27 @@ export class JoinGroupCallPresentation extends TLObject {
|
|
|
1613
1719
|
params;
|
|
1614
1720
|
constructor(params) {
|
|
1615
1721
|
super();
|
|
1616
|
-
this.classType =
|
|
1617
|
-
this.className =
|
|
1722
|
+
this.classType = 'functions';
|
|
1723
|
+
this.className = 'phone.JoinGroupCallPresentation';
|
|
1618
1724
|
this.constructorId = 0xcbea6bc4;
|
|
1619
1725
|
this.subclassOfId = 0x8af52aac;
|
|
1620
|
-
this._slots = [
|
|
1726
|
+
this._slots = ['call', 'params'];
|
|
1621
1727
|
this.call = params.call;
|
|
1622
1728
|
this.params = params.params;
|
|
1623
1729
|
}
|
|
1624
1730
|
/**
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1731
|
+
* Generate the TLObject from buffer.
|
|
1732
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1733
|
+
*/
|
|
1628
1734
|
static async read(_data, ..._args) {
|
|
1629
1735
|
// no flags
|
|
1630
1736
|
let call = await TLObject.read(_data);
|
|
1631
1737
|
let params = await TLObject.read(_data);
|
|
1632
|
-
return new JoinGroupCallPresentation({
|
|
1738
|
+
return new JoinGroupCallPresentation({ call: call, params: params });
|
|
1633
1739
|
}
|
|
1634
1740
|
/**
|
|
1635
|
-
|
|
1636
|
-
|
|
1741
|
+
* Generate buffer from TLObject.
|
|
1742
|
+
*/
|
|
1637
1743
|
write() {
|
|
1638
1744
|
const b = new BytesIO();
|
|
1639
1745
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1652,25 +1758,25 @@ export class LeaveGroupCallPresentation extends TLObject {
|
|
|
1652
1758
|
call;
|
|
1653
1759
|
constructor(params) {
|
|
1654
1760
|
super();
|
|
1655
|
-
this.classType =
|
|
1656
|
-
this.className =
|
|
1761
|
+
this.classType = 'functions';
|
|
1762
|
+
this.className = 'phone.LeaveGroupCallPresentation';
|
|
1657
1763
|
this.constructorId = 0x1c50d144;
|
|
1658
1764
|
this.subclassOfId = 0x8af52aac;
|
|
1659
|
-
this._slots = [
|
|
1765
|
+
this._slots = ['call'];
|
|
1660
1766
|
this.call = params.call;
|
|
1661
1767
|
}
|
|
1662
1768
|
/**
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1769
|
+
* Generate the TLObject from buffer.
|
|
1770
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1771
|
+
*/
|
|
1666
1772
|
static async read(_data, ..._args) {
|
|
1667
1773
|
// no flags
|
|
1668
1774
|
let call = await TLObject.read(_data);
|
|
1669
|
-
return new LeaveGroupCallPresentation({
|
|
1775
|
+
return new LeaveGroupCallPresentation({ call: call });
|
|
1670
1776
|
}
|
|
1671
1777
|
/**
|
|
1672
|
-
|
|
1673
|
-
|
|
1778
|
+
* Generate buffer from TLObject.
|
|
1779
|
+
*/
|
|
1674
1780
|
write() {
|
|
1675
1781
|
const b = new BytesIO();
|
|
1676
1782
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1686,25 +1792,25 @@ export class GetGroupCallStreamChannels extends TLObject {
|
|
|
1686
1792
|
call;
|
|
1687
1793
|
constructor(params) {
|
|
1688
1794
|
super();
|
|
1689
|
-
this.classType =
|
|
1690
|
-
this.className =
|
|
1795
|
+
this.classType = 'functions';
|
|
1796
|
+
this.className = 'phone.GetGroupCallStreamChannels';
|
|
1691
1797
|
this.constructorId = 0x1ab21940;
|
|
1692
1798
|
this.subclassOfId = 0x9157c5e4;
|
|
1693
|
-
this._slots = [
|
|
1799
|
+
this._slots = ['call'];
|
|
1694
1800
|
this.call = params.call;
|
|
1695
1801
|
}
|
|
1696
1802
|
/**
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1803
|
+
* Generate the TLObject from buffer.
|
|
1804
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1805
|
+
*/
|
|
1700
1806
|
static async read(_data, ..._args) {
|
|
1701
1807
|
// no flags
|
|
1702
1808
|
let call = await TLObject.read(_data);
|
|
1703
|
-
return new GetGroupCallStreamChannels({
|
|
1809
|
+
return new GetGroupCallStreamChannels({ call: call });
|
|
1704
1810
|
}
|
|
1705
1811
|
/**
|
|
1706
|
-
|
|
1707
|
-
|
|
1812
|
+
* Generate buffer from TLObject.
|
|
1813
|
+
*/
|
|
1708
1814
|
write() {
|
|
1709
1815
|
const b = new BytesIO();
|
|
1710
1816
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1722,42 +1828,42 @@ export class GetGroupCallStreamRtmpUrl extends TLObject {
|
|
|
1722
1828
|
revoke;
|
|
1723
1829
|
constructor(params) {
|
|
1724
1830
|
super();
|
|
1725
|
-
this.classType =
|
|
1726
|
-
this.className =
|
|
1831
|
+
this.classType = 'functions';
|
|
1832
|
+
this.className = 'phone.GetGroupCallStreamRtmpUrl';
|
|
1727
1833
|
this.constructorId = 0x5af4c73a;
|
|
1728
1834
|
this.subclassOfId = 0xd1f515cb;
|
|
1729
|
-
this._slots = [
|
|
1835
|
+
this._slots = ['liveStory', 'peer', 'revoke'];
|
|
1730
1836
|
this.liveStory = params.liveStory;
|
|
1731
1837
|
this.peer = params.peer;
|
|
1732
1838
|
this.revoke = params.revoke;
|
|
1733
1839
|
}
|
|
1734
1840
|
/**
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1841
|
+
* Generate the TLObject from buffer.
|
|
1842
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1843
|
+
*/
|
|
1738
1844
|
static async read(_data, ..._args) {
|
|
1739
1845
|
// @ts-ignore
|
|
1740
1846
|
let flags = await Primitive.Int.read(_data);
|
|
1741
|
-
let liveStory =
|
|
1847
|
+
let liveStory = flags & (1 << 0) ? true : false;
|
|
1742
1848
|
let peer = await TLObject.read(_data);
|
|
1743
1849
|
let revoke = await Primitive.Bool.read(_data);
|
|
1744
|
-
return new GetGroupCallStreamRtmpUrl({
|
|
1850
|
+
return new GetGroupCallStreamRtmpUrl({ liveStory: liveStory, peer: peer, revoke: revoke });
|
|
1745
1851
|
}
|
|
1746
1852
|
/**
|
|
1747
|
-
|
|
1748
|
-
|
|
1853
|
+
* Generate buffer from TLObject.
|
|
1854
|
+
*/
|
|
1749
1855
|
write() {
|
|
1750
1856
|
const b = new BytesIO();
|
|
1751
1857
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1752
1858
|
// @ts-ignore
|
|
1753
1859
|
let flags = 0;
|
|
1754
|
-
flags |= this.liveStory ?
|
|
1755
|
-
b.write(
|
|
1860
|
+
flags |= this.liveStory ? 1 << 0 : 0;
|
|
1861
|
+
b.write(Primitive.Int.write(flags));
|
|
1756
1862
|
if (this.peer !== undefined) {
|
|
1757
1863
|
b.write(this.peer.write());
|
|
1758
1864
|
}
|
|
1759
1865
|
if (this.revoke !== undefined) {
|
|
1760
|
-
b.write(
|
|
1866
|
+
b.write(Primitive.Bool.write(this.revoke));
|
|
1761
1867
|
}
|
|
1762
1868
|
return b.buffer;
|
|
1763
1869
|
}
|
|
@@ -1768,27 +1874,27 @@ export class SaveCallLog extends TLObject {
|
|
|
1768
1874
|
file;
|
|
1769
1875
|
constructor(params) {
|
|
1770
1876
|
super();
|
|
1771
|
-
this.classType =
|
|
1772
|
-
this.className =
|
|
1877
|
+
this.classType = 'functions';
|
|
1878
|
+
this.className = 'phone.SaveCallLog';
|
|
1773
1879
|
this.constructorId = 0x41248786;
|
|
1774
1880
|
this.subclassOfId = 0xf5b399ac;
|
|
1775
|
-
this._slots = [
|
|
1881
|
+
this._slots = ['peer', 'file'];
|
|
1776
1882
|
this.peer = params.peer;
|
|
1777
1883
|
this.file = params.file;
|
|
1778
1884
|
}
|
|
1779
1885
|
/**
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1886
|
+
* Generate the TLObject from buffer.
|
|
1887
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1888
|
+
*/
|
|
1783
1889
|
static async read(_data, ..._args) {
|
|
1784
1890
|
// no flags
|
|
1785
1891
|
let peer = await TLObject.read(_data);
|
|
1786
1892
|
let file = await TLObject.read(_data);
|
|
1787
|
-
return new SaveCallLog({
|
|
1893
|
+
return new SaveCallLog({ peer: peer, file: file });
|
|
1788
1894
|
}
|
|
1789
1895
|
/**
|
|
1790
|
-
|
|
1791
|
-
|
|
1896
|
+
* Generate buffer from TLObject.
|
|
1897
|
+
*/
|
|
1792
1898
|
write() {
|
|
1793
1899
|
const b = new BytesIO();
|
|
1794
1900
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1813,11 +1919,11 @@ export class CreateConferenceCall extends TLObject {
|
|
|
1813
1919
|
params;
|
|
1814
1920
|
constructor(params) {
|
|
1815
1921
|
super();
|
|
1816
|
-
this.classType =
|
|
1817
|
-
this.className =
|
|
1922
|
+
this.classType = 'functions';
|
|
1923
|
+
this.className = 'phone.CreateConferenceCall';
|
|
1818
1924
|
this.constructorId = 0x7d0444bb;
|
|
1819
1925
|
this.subclassOfId = 0x8af52aac;
|
|
1820
|
-
this._slots = [
|
|
1926
|
+
this._slots = ['muted', 'videoStopped', 'join', 'randomId', 'publicKey', 'block', 'params'];
|
|
1821
1927
|
this.muted = params.muted;
|
|
1822
1928
|
this.videoStopped = params.videoStopped;
|
|
1823
1929
|
this.join = params.join;
|
|
@@ -1827,44 +1933,52 @@ export class CreateConferenceCall extends TLObject {
|
|
|
1827
1933
|
this.params = params.params;
|
|
1828
1934
|
}
|
|
1829
1935
|
/**
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1936
|
+
* Generate the TLObject from buffer.
|
|
1937
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1938
|
+
*/
|
|
1833
1939
|
static async read(_data, ..._args) {
|
|
1834
1940
|
// @ts-ignore
|
|
1835
1941
|
let flags = await Primitive.Int.read(_data);
|
|
1836
|
-
let muted =
|
|
1837
|
-
let videoStopped =
|
|
1838
|
-
let join =
|
|
1942
|
+
let muted = flags & (1 << 0) ? true : false;
|
|
1943
|
+
let videoStopped = flags & (1 << 2) ? true : false;
|
|
1944
|
+
let join = flags & (1 << 3) ? true : false;
|
|
1839
1945
|
let randomId = await Primitive.Int.read(_data);
|
|
1840
|
-
let publicKey =
|
|
1841
|
-
let block =
|
|
1842
|
-
let params =
|
|
1843
|
-
return new CreateConferenceCall({
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1946
|
+
let publicKey = flags & (1 << 3) ? await Primitive.Int256.read(_data) : undefined;
|
|
1947
|
+
let block = flags & (1 << 3) ? await Primitive.Bytes.read(_data) : undefined;
|
|
1948
|
+
let params = flags & (1 << 3) ? await TLObject.read(_data) : undefined;
|
|
1949
|
+
return new CreateConferenceCall({
|
|
1950
|
+
muted: muted,
|
|
1951
|
+
videoStopped: videoStopped,
|
|
1952
|
+
join: join,
|
|
1953
|
+
randomId: randomId,
|
|
1954
|
+
publicKey: publicKey,
|
|
1955
|
+
block: block,
|
|
1956
|
+
params: params,
|
|
1957
|
+
});
|
|
1958
|
+
}
|
|
1959
|
+
/**
|
|
1960
|
+
* Generate buffer from TLObject.
|
|
1961
|
+
*/
|
|
1848
1962
|
write() {
|
|
1849
1963
|
const b = new BytesIO();
|
|
1850
1964
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1851
1965
|
// @ts-ignore
|
|
1852
1966
|
let flags = 0;
|
|
1853
|
-
flags |= this.muted ?
|
|
1854
|
-
flags |= this.videoStopped ?
|
|
1855
|
-
flags |= this.join ?
|
|
1856
|
-
flags |= this.publicKey !== undefined ?
|
|
1857
|
-
flags |= this.block !== undefined ?
|
|
1858
|
-
flags |= this.params !== undefined ?
|
|
1859
|
-
b.write(
|
|
1967
|
+
flags |= this.muted ? 1 << 0 : 0;
|
|
1968
|
+
flags |= this.videoStopped ? 1 << 2 : 0;
|
|
1969
|
+
flags |= this.join ? 1 << 3 : 0;
|
|
1970
|
+
flags |= this.publicKey !== undefined ? 1 << 3 : 0;
|
|
1971
|
+
flags |= this.block !== undefined ? 1 << 3 : 0;
|
|
1972
|
+
flags |= this.params !== undefined ? 1 << 3 : 0;
|
|
1973
|
+
b.write(Primitive.Int.write(flags));
|
|
1860
1974
|
if (this.randomId !== undefined) {
|
|
1861
|
-
b.write(
|
|
1975
|
+
b.write(Primitive.Int.write(this.randomId));
|
|
1862
1976
|
}
|
|
1863
1977
|
if (this.publicKey !== undefined) {
|
|
1864
|
-
b.write(
|
|
1978
|
+
b.write(Primitive.Int256.write(this.publicKey));
|
|
1865
1979
|
}
|
|
1866
1980
|
if (this.block !== undefined) {
|
|
1867
|
-
b.write(
|
|
1981
|
+
b.write(Primitive.Bytes.write(this.block));
|
|
1868
1982
|
}
|
|
1869
1983
|
if (this.params !== undefined) {
|
|
1870
1984
|
b.write(this.params.write());
|
|
@@ -1881,11 +1995,11 @@ export class DeleteConferenceCallParticipants extends TLObject {
|
|
|
1881
1995
|
block;
|
|
1882
1996
|
constructor(params) {
|
|
1883
1997
|
super();
|
|
1884
|
-
this.classType =
|
|
1885
|
-
this.className =
|
|
1998
|
+
this.classType = 'functions';
|
|
1999
|
+
this.className = 'phone.DeleteConferenceCallParticipants';
|
|
1886
2000
|
this.constructorId = 0x8ca60525;
|
|
1887
2001
|
this.subclassOfId = 0x8af52aac;
|
|
1888
|
-
this._slots = [
|
|
2002
|
+
this._slots = ['onlyLeft', 'kick', 'call', 'ids', 'block'];
|
|
1889
2003
|
this.onlyLeft = params.onlyLeft;
|
|
1890
2004
|
this.kick = params.kick;
|
|
1891
2005
|
this.call = params.call;
|
|
@@ -1893,38 +2007,44 @@ export class DeleteConferenceCallParticipants extends TLObject {
|
|
|
1893
2007
|
this.block = params.block;
|
|
1894
2008
|
}
|
|
1895
2009
|
/**
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
2010
|
+
* Generate the TLObject from buffer.
|
|
2011
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2012
|
+
*/
|
|
1899
2013
|
static async read(_data, ..._args) {
|
|
1900
2014
|
// @ts-ignore
|
|
1901
2015
|
let flags = await Primitive.Int.read(_data);
|
|
1902
|
-
let onlyLeft =
|
|
1903
|
-
let kick =
|
|
2016
|
+
let onlyLeft = flags & (1 << 0) ? true : false;
|
|
2017
|
+
let kick = flags & (1 << 1) ? true : false;
|
|
1904
2018
|
let call = await TLObject.read(_data);
|
|
1905
2019
|
let ids = await TLObject.read(_data, Primitive.Long);
|
|
1906
2020
|
let block = await Primitive.Bytes.read(_data);
|
|
1907
|
-
return new DeleteConferenceCallParticipants({
|
|
2021
|
+
return new DeleteConferenceCallParticipants({
|
|
2022
|
+
onlyLeft: onlyLeft,
|
|
2023
|
+
kick: kick,
|
|
2024
|
+
call: call,
|
|
2025
|
+
ids: ids,
|
|
2026
|
+
block: block,
|
|
2027
|
+
});
|
|
1908
2028
|
}
|
|
1909
2029
|
/**
|
|
1910
|
-
|
|
1911
|
-
|
|
2030
|
+
* Generate buffer from TLObject.
|
|
2031
|
+
*/
|
|
1912
2032
|
write() {
|
|
1913
2033
|
const b = new BytesIO();
|
|
1914
2034
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1915
2035
|
// @ts-ignore
|
|
1916
2036
|
let flags = 0;
|
|
1917
|
-
flags |= this.onlyLeft ?
|
|
1918
|
-
flags |= this.kick ?
|
|
1919
|
-
b.write(
|
|
2037
|
+
flags |= this.onlyLeft ? 1 << 0 : 0;
|
|
2038
|
+
flags |= this.kick ? 1 << 1 : 0;
|
|
2039
|
+
b.write(Primitive.Int.write(flags));
|
|
1920
2040
|
if (this.call !== undefined) {
|
|
1921
2041
|
b.write(this.call.write());
|
|
1922
2042
|
}
|
|
1923
2043
|
if (this.ids) {
|
|
1924
|
-
b.write(
|
|
2044
|
+
b.write(Primitive.Vector.write(this.ids, Primitive.Long));
|
|
1925
2045
|
}
|
|
1926
2046
|
if (this.block !== undefined) {
|
|
1927
|
-
b.write(
|
|
2047
|
+
b.write(Primitive.Bytes.write(this.block));
|
|
1928
2048
|
}
|
|
1929
2049
|
return b.buffer;
|
|
1930
2050
|
}
|
|
@@ -1935,27 +2055,27 @@ export class SendConferenceCallBroadcast extends TLObject {
|
|
|
1935
2055
|
block;
|
|
1936
2056
|
constructor(params) {
|
|
1937
2057
|
super();
|
|
1938
|
-
this.classType =
|
|
1939
|
-
this.className =
|
|
2058
|
+
this.classType = 'functions';
|
|
2059
|
+
this.className = 'phone.SendConferenceCallBroadcast';
|
|
1940
2060
|
this.constructorId = 0xc6701900;
|
|
1941
2061
|
this.subclassOfId = 0x8af52aac;
|
|
1942
|
-
this._slots = [
|
|
2062
|
+
this._slots = ['call', 'block'];
|
|
1943
2063
|
this.call = params.call;
|
|
1944
2064
|
this.block = params.block;
|
|
1945
2065
|
}
|
|
1946
2066
|
/**
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
2067
|
+
* Generate the TLObject from buffer.
|
|
2068
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2069
|
+
*/
|
|
1950
2070
|
static async read(_data, ..._args) {
|
|
1951
2071
|
// no flags
|
|
1952
2072
|
let call = await TLObject.read(_data);
|
|
1953
2073
|
let block = await Primitive.Bytes.read(_data);
|
|
1954
|
-
return new SendConferenceCallBroadcast({
|
|
2074
|
+
return new SendConferenceCallBroadcast({ call: call, block: block });
|
|
1955
2075
|
}
|
|
1956
2076
|
/**
|
|
1957
|
-
|
|
1958
|
-
|
|
2077
|
+
* Generate buffer from TLObject.
|
|
2078
|
+
*/
|
|
1959
2079
|
write() {
|
|
1960
2080
|
const b = new BytesIO();
|
|
1961
2081
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1964,7 +2084,7 @@ export class SendConferenceCallBroadcast extends TLObject {
|
|
|
1964
2084
|
b.write(this.call.write());
|
|
1965
2085
|
}
|
|
1966
2086
|
if (this.block !== undefined) {
|
|
1967
|
-
b.write(
|
|
2087
|
+
b.write(Primitive.Bytes.write(this.block));
|
|
1968
2088
|
}
|
|
1969
2089
|
return b.buffer;
|
|
1970
2090
|
}
|
|
@@ -1976,37 +2096,37 @@ export class InviteConferenceCallParticipant extends TLObject {
|
|
|
1976
2096
|
userId;
|
|
1977
2097
|
constructor(params) {
|
|
1978
2098
|
super();
|
|
1979
|
-
this.classType =
|
|
1980
|
-
this.className =
|
|
2099
|
+
this.classType = 'functions';
|
|
2100
|
+
this.className = 'phone.InviteConferenceCallParticipant';
|
|
1981
2101
|
this.constructorId = 0xbcf22685;
|
|
1982
2102
|
this.subclassOfId = 0x8af52aac;
|
|
1983
|
-
this._slots = [
|
|
2103
|
+
this._slots = ['video', 'call', 'userId'];
|
|
1984
2104
|
this.video = params.video;
|
|
1985
2105
|
this.call = params.call;
|
|
1986
2106
|
this.userId = params.userId;
|
|
1987
2107
|
}
|
|
1988
2108
|
/**
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
2109
|
+
* Generate the TLObject from buffer.
|
|
2110
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2111
|
+
*/
|
|
1992
2112
|
static async read(_data, ..._args) {
|
|
1993
2113
|
// @ts-ignore
|
|
1994
2114
|
let flags = await Primitive.Int.read(_data);
|
|
1995
|
-
let video =
|
|
2115
|
+
let video = flags & (1 << 0) ? true : false;
|
|
1996
2116
|
let call = await TLObject.read(_data);
|
|
1997
2117
|
let userId = await TLObject.read(_data);
|
|
1998
|
-
return new InviteConferenceCallParticipant({
|
|
2118
|
+
return new InviteConferenceCallParticipant({ video: video, call: call, userId: userId });
|
|
1999
2119
|
}
|
|
2000
2120
|
/**
|
|
2001
|
-
|
|
2002
|
-
|
|
2121
|
+
* Generate buffer from TLObject.
|
|
2122
|
+
*/
|
|
2003
2123
|
write() {
|
|
2004
2124
|
const b = new BytesIO();
|
|
2005
2125
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
2006
2126
|
// @ts-ignore
|
|
2007
2127
|
let flags = 0;
|
|
2008
|
-
flags |= this.video ?
|
|
2009
|
-
b.write(
|
|
2128
|
+
flags |= this.video ? 1 << 0 : 0;
|
|
2129
|
+
b.write(Primitive.Int.write(flags));
|
|
2010
2130
|
if (this.call !== undefined) {
|
|
2011
2131
|
b.write(this.call.write());
|
|
2012
2132
|
}
|
|
@@ -2021,31 +2141,31 @@ export class DeclineConferenceCallInvite extends TLObject {
|
|
|
2021
2141
|
msgId;
|
|
2022
2142
|
constructor(params) {
|
|
2023
2143
|
super();
|
|
2024
|
-
this.classType =
|
|
2025
|
-
this.className =
|
|
2144
|
+
this.classType = 'functions';
|
|
2145
|
+
this.className = 'phone.DeclineConferenceCallInvite';
|
|
2026
2146
|
this.constructorId = 0x3c479971;
|
|
2027
2147
|
this.subclassOfId = 0x8af52aac;
|
|
2028
|
-
this._slots = [
|
|
2148
|
+
this._slots = ['msgId'];
|
|
2029
2149
|
this.msgId = params.msgId;
|
|
2030
2150
|
}
|
|
2031
2151
|
/**
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2152
|
+
* Generate the TLObject from buffer.
|
|
2153
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2154
|
+
*/
|
|
2035
2155
|
static async read(_data, ..._args) {
|
|
2036
2156
|
// no flags
|
|
2037
2157
|
let msgId = await Primitive.Int.read(_data);
|
|
2038
|
-
return new DeclineConferenceCallInvite({
|
|
2158
|
+
return new DeclineConferenceCallInvite({ msgId: msgId });
|
|
2039
2159
|
}
|
|
2040
2160
|
/**
|
|
2041
|
-
|
|
2042
|
-
|
|
2161
|
+
* Generate buffer from TLObject.
|
|
2162
|
+
*/
|
|
2043
2163
|
write() {
|
|
2044
2164
|
const b = new BytesIO();
|
|
2045
2165
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
2046
2166
|
// no flags
|
|
2047
2167
|
if (this.msgId !== undefined) {
|
|
2048
|
-
b.write(
|
|
2168
|
+
b.write(Primitive.Int.write(this.msgId));
|
|
2049
2169
|
}
|
|
2050
2170
|
return b.buffer;
|
|
2051
2171
|
}
|
|
@@ -2058,31 +2178,36 @@ export class GetGroupCallChainBlocks extends TLObject {
|
|
|
2058
2178
|
limit;
|
|
2059
2179
|
constructor(params) {
|
|
2060
2180
|
super();
|
|
2061
|
-
this.classType =
|
|
2062
|
-
this.className =
|
|
2181
|
+
this.classType = 'functions';
|
|
2182
|
+
this.className = 'phone.GetGroupCallChainBlocks';
|
|
2063
2183
|
this.constructorId = 0xee9f88a6;
|
|
2064
2184
|
this.subclassOfId = 0x8af52aac;
|
|
2065
|
-
this._slots = [
|
|
2185
|
+
this._slots = ['call', 'subChainId', 'offset', 'limit'];
|
|
2066
2186
|
this.call = params.call;
|
|
2067
2187
|
this.subChainId = params.subChainId;
|
|
2068
2188
|
this.offset = params.offset;
|
|
2069
2189
|
this.limit = params.limit;
|
|
2070
2190
|
}
|
|
2071
2191
|
/**
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2192
|
+
* Generate the TLObject from buffer.
|
|
2193
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2194
|
+
*/
|
|
2075
2195
|
static async read(_data, ..._args) {
|
|
2076
2196
|
// no flags
|
|
2077
2197
|
let call = await TLObject.read(_data);
|
|
2078
2198
|
let subChainId = await Primitive.Int.read(_data);
|
|
2079
2199
|
let offset = await Primitive.Int.read(_data);
|
|
2080
2200
|
let limit = await Primitive.Int.read(_data);
|
|
2081
|
-
return new GetGroupCallChainBlocks({
|
|
2201
|
+
return new GetGroupCallChainBlocks({
|
|
2202
|
+
call: call,
|
|
2203
|
+
subChainId: subChainId,
|
|
2204
|
+
offset: offset,
|
|
2205
|
+
limit: limit,
|
|
2206
|
+
});
|
|
2082
2207
|
}
|
|
2083
2208
|
/**
|
|
2084
|
-
|
|
2085
|
-
|
|
2209
|
+
* Generate buffer from TLObject.
|
|
2210
|
+
*/
|
|
2086
2211
|
write() {
|
|
2087
2212
|
const b = new BytesIO();
|
|
2088
2213
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -2091,13 +2216,13 @@ export class GetGroupCallChainBlocks extends TLObject {
|
|
|
2091
2216
|
b.write(this.call.write());
|
|
2092
2217
|
}
|
|
2093
2218
|
if (this.subChainId !== undefined) {
|
|
2094
|
-
b.write(
|
|
2219
|
+
b.write(Primitive.Int.write(this.subChainId));
|
|
2095
2220
|
}
|
|
2096
2221
|
if (this.offset !== undefined) {
|
|
2097
|
-
b.write(
|
|
2222
|
+
b.write(Primitive.Int.write(this.offset));
|
|
2098
2223
|
}
|
|
2099
2224
|
if (this.limit !== undefined) {
|
|
2100
|
-
b.write(
|
|
2225
|
+
b.write(Primitive.Int.write(this.limit));
|
|
2101
2226
|
}
|
|
2102
2227
|
return b.buffer;
|
|
2103
2228
|
}
|
|
@@ -2111,11 +2236,11 @@ export class SendGroupCallMessage extends TLObject {
|
|
|
2111
2236
|
sendAs;
|
|
2112
2237
|
constructor(params) {
|
|
2113
2238
|
super();
|
|
2114
|
-
this.classType =
|
|
2115
|
-
this.className =
|
|
2239
|
+
this.classType = 'functions';
|
|
2240
|
+
this.className = 'phone.SendGroupCallMessage';
|
|
2116
2241
|
this.constructorId = 0xb1d11410;
|
|
2117
2242
|
this.subclassOfId = 0x8af52aac;
|
|
2118
|
-
this._slots = [
|
|
2243
|
+
this._slots = ['call', 'randomId', 'message', 'allowPaidStars', 'sendAs'];
|
|
2119
2244
|
this.call = params.call;
|
|
2120
2245
|
this.randomId = params.randomId;
|
|
2121
2246
|
this.message = params.message;
|
|
@@ -2123,41 +2248,47 @@ export class SendGroupCallMessage extends TLObject {
|
|
|
2123
2248
|
this.sendAs = params.sendAs;
|
|
2124
2249
|
}
|
|
2125
2250
|
/**
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2251
|
+
* Generate the TLObject from buffer.
|
|
2252
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2253
|
+
*/
|
|
2129
2254
|
static async read(_data, ..._args) {
|
|
2130
2255
|
// @ts-ignore
|
|
2131
2256
|
let flags = await Primitive.Int.read(_data);
|
|
2132
2257
|
let call = await TLObject.read(_data);
|
|
2133
2258
|
let randomId = await Primitive.Long.read(_data);
|
|
2134
2259
|
let message = await TLObject.read(_data);
|
|
2135
|
-
let allowPaidStars =
|
|
2136
|
-
let sendAs =
|
|
2137
|
-
return new SendGroupCallMessage({
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2260
|
+
let allowPaidStars = flags & (1 << 0) ? await Primitive.Long.read(_data) : undefined;
|
|
2261
|
+
let sendAs = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
|
|
2262
|
+
return new SendGroupCallMessage({
|
|
2263
|
+
call: call,
|
|
2264
|
+
randomId: randomId,
|
|
2265
|
+
message: message,
|
|
2266
|
+
allowPaidStars: allowPaidStars,
|
|
2267
|
+
sendAs: sendAs,
|
|
2268
|
+
});
|
|
2269
|
+
}
|
|
2270
|
+
/**
|
|
2271
|
+
* Generate buffer from TLObject.
|
|
2272
|
+
*/
|
|
2142
2273
|
write() {
|
|
2143
2274
|
const b = new BytesIO();
|
|
2144
2275
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
2145
2276
|
// @ts-ignore
|
|
2146
2277
|
let flags = 0;
|
|
2147
|
-
flags |= this.allowPaidStars !== undefined ?
|
|
2148
|
-
flags |= this.sendAs !== undefined ?
|
|
2149
|
-
b.write(
|
|
2278
|
+
flags |= this.allowPaidStars !== undefined ? 1 << 0 : 0;
|
|
2279
|
+
flags |= this.sendAs !== undefined ? 1 << 1 : 0;
|
|
2280
|
+
b.write(Primitive.Int.write(flags));
|
|
2150
2281
|
if (this.call !== undefined) {
|
|
2151
2282
|
b.write(this.call.write());
|
|
2152
2283
|
}
|
|
2153
2284
|
if (this.randomId !== undefined) {
|
|
2154
|
-
b.write(
|
|
2285
|
+
b.write(Primitive.Long.write(this.randomId));
|
|
2155
2286
|
}
|
|
2156
2287
|
if (this.message !== undefined) {
|
|
2157
2288
|
b.write(this.message.write());
|
|
2158
2289
|
}
|
|
2159
2290
|
if (this.allowPaidStars !== undefined) {
|
|
2160
|
-
b.write(
|
|
2291
|
+
b.write(Primitive.Long.write(this.allowPaidStars));
|
|
2161
2292
|
}
|
|
2162
2293
|
if (this.sendAs !== undefined) {
|
|
2163
2294
|
b.write(this.sendAs.write());
|
|
@@ -2171,27 +2302,27 @@ export class SendGroupCallEncryptedMessage extends TLObject {
|
|
|
2171
2302
|
encryptedMessage;
|
|
2172
2303
|
constructor(params) {
|
|
2173
2304
|
super();
|
|
2174
|
-
this.classType =
|
|
2175
|
-
this.className =
|
|
2305
|
+
this.classType = 'functions';
|
|
2306
|
+
this.className = 'phone.SendGroupCallEncryptedMessage';
|
|
2176
2307
|
this.constructorId = 0xe5afa56d;
|
|
2177
2308
|
this.subclassOfId = 0xf5b399ac;
|
|
2178
|
-
this._slots = [
|
|
2309
|
+
this._slots = ['call', 'encryptedMessage'];
|
|
2179
2310
|
this.call = params.call;
|
|
2180
2311
|
this.encryptedMessage = params.encryptedMessage;
|
|
2181
2312
|
}
|
|
2182
2313
|
/**
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2314
|
+
* Generate the TLObject from buffer.
|
|
2315
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2316
|
+
*/
|
|
2186
2317
|
static async read(_data, ..._args) {
|
|
2187
2318
|
// no flags
|
|
2188
2319
|
let call = await TLObject.read(_data);
|
|
2189
2320
|
let encryptedMessage = await Primitive.Bytes.read(_data);
|
|
2190
|
-
return new SendGroupCallEncryptedMessage({
|
|
2321
|
+
return new SendGroupCallEncryptedMessage({ call: call, encryptedMessage: encryptedMessage });
|
|
2191
2322
|
}
|
|
2192
2323
|
/**
|
|
2193
|
-
|
|
2194
|
-
|
|
2324
|
+
* Generate buffer from TLObject.
|
|
2325
|
+
*/
|
|
2195
2326
|
write() {
|
|
2196
2327
|
const b = new BytesIO();
|
|
2197
2328
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -2200,7 +2331,7 @@ export class SendGroupCallEncryptedMessage extends TLObject {
|
|
|
2200
2331
|
b.write(this.call.write());
|
|
2201
2332
|
}
|
|
2202
2333
|
if (this.encryptedMessage !== undefined) {
|
|
2203
|
-
b.write(
|
|
2334
|
+
b.write(Primitive.Bytes.write(this.encryptedMessage));
|
|
2204
2335
|
}
|
|
2205
2336
|
return b.buffer;
|
|
2206
2337
|
}
|
|
@@ -2212,42 +2343,42 @@ export class DeleteGroupCallMessages extends TLObject {
|
|
|
2212
2343
|
messages;
|
|
2213
2344
|
constructor(params) {
|
|
2214
2345
|
super();
|
|
2215
|
-
this.classType =
|
|
2216
|
-
this.className =
|
|
2346
|
+
this.classType = 'functions';
|
|
2347
|
+
this.className = 'phone.DeleteGroupCallMessages';
|
|
2217
2348
|
this.constructorId = 0xf64f54f7;
|
|
2218
2349
|
this.subclassOfId = 0x8af52aac;
|
|
2219
|
-
this._slots = [
|
|
2350
|
+
this._slots = ['reportSpam', 'call', 'messages'];
|
|
2220
2351
|
this.reportSpam = params.reportSpam;
|
|
2221
2352
|
this.call = params.call;
|
|
2222
2353
|
this.messages = params.messages;
|
|
2223
2354
|
}
|
|
2224
2355
|
/**
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2356
|
+
* Generate the TLObject from buffer.
|
|
2357
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2358
|
+
*/
|
|
2228
2359
|
static async read(_data, ..._args) {
|
|
2229
2360
|
// @ts-ignore
|
|
2230
2361
|
let flags = await Primitive.Int.read(_data);
|
|
2231
|
-
let reportSpam =
|
|
2362
|
+
let reportSpam = flags & (1 << 0) ? true : false;
|
|
2232
2363
|
let call = await TLObject.read(_data);
|
|
2233
2364
|
let messages = await TLObject.read(_data, Primitive.Int);
|
|
2234
|
-
return new DeleteGroupCallMessages({
|
|
2365
|
+
return new DeleteGroupCallMessages({ reportSpam: reportSpam, call: call, messages: messages });
|
|
2235
2366
|
}
|
|
2236
2367
|
/**
|
|
2237
|
-
|
|
2238
|
-
|
|
2368
|
+
* Generate buffer from TLObject.
|
|
2369
|
+
*/
|
|
2239
2370
|
write() {
|
|
2240
2371
|
const b = new BytesIO();
|
|
2241
2372
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
2242
2373
|
// @ts-ignore
|
|
2243
2374
|
let flags = 0;
|
|
2244
|
-
flags |= this.reportSpam ?
|
|
2245
|
-
b.write(
|
|
2375
|
+
flags |= this.reportSpam ? 1 << 0 : 0;
|
|
2376
|
+
b.write(Primitive.Int.write(flags));
|
|
2246
2377
|
if (this.call !== undefined) {
|
|
2247
2378
|
b.write(this.call.write());
|
|
2248
2379
|
}
|
|
2249
2380
|
if (this.messages) {
|
|
2250
|
-
b.write(
|
|
2381
|
+
b.write(Primitive.Vector.write(this.messages, Primitive.Int));
|
|
2251
2382
|
}
|
|
2252
2383
|
return b.buffer;
|
|
2253
2384
|
}
|
|
@@ -2259,37 +2390,41 @@ export class DeleteGroupCallParticipantMessages extends TLObject {
|
|
|
2259
2390
|
participant;
|
|
2260
2391
|
constructor(params) {
|
|
2261
2392
|
super();
|
|
2262
|
-
this.classType =
|
|
2263
|
-
this.className =
|
|
2393
|
+
this.classType = 'functions';
|
|
2394
|
+
this.className = 'phone.DeleteGroupCallParticipantMessages';
|
|
2264
2395
|
this.constructorId = 0x1dbfeca0;
|
|
2265
2396
|
this.subclassOfId = 0x8af52aac;
|
|
2266
|
-
this._slots = [
|
|
2397
|
+
this._slots = ['reportSpam', 'call', 'participant'];
|
|
2267
2398
|
this.reportSpam = params.reportSpam;
|
|
2268
2399
|
this.call = params.call;
|
|
2269
2400
|
this.participant = params.participant;
|
|
2270
2401
|
}
|
|
2271
2402
|
/**
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2403
|
+
* Generate the TLObject from buffer.
|
|
2404
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2405
|
+
*/
|
|
2275
2406
|
static async read(_data, ..._args) {
|
|
2276
2407
|
// @ts-ignore
|
|
2277
2408
|
let flags = await Primitive.Int.read(_data);
|
|
2278
|
-
let reportSpam =
|
|
2409
|
+
let reportSpam = flags & (1 << 0) ? true : false;
|
|
2279
2410
|
let call = await TLObject.read(_data);
|
|
2280
2411
|
let participant = await TLObject.read(_data);
|
|
2281
|
-
return new DeleteGroupCallParticipantMessages({
|
|
2412
|
+
return new DeleteGroupCallParticipantMessages({
|
|
2413
|
+
reportSpam: reportSpam,
|
|
2414
|
+
call: call,
|
|
2415
|
+
participant: participant,
|
|
2416
|
+
});
|
|
2282
2417
|
}
|
|
2283
2418
|
/**
|
|
2284
|
-
|
|
2285
|
-
|
|
2419
|
+
* Generate buffer from TLObject.
|
|
2420
|
+
*/
|
|
2286
2421
|
write() {
|
|
2287
2422
|
const b = new BytesIO();
|
|
2288
2423
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
2289
2424
|
// @ts-ignore
|
|
2290
2425
|
let flags = 0;
|
|
2291
|
-
flags |= this.reportSpam ?
|
|
2292
|
-
b.write(
|
|
2426
|
+
flags |= this.reportSpam ? 1 << 0 : 0;
|
|
2427
|
+
b.write(Primitive.Int.write(flags));
|
|
2293
2428
|
if (this.call !== undefined) {
|
|
2294
2429
|
b.write(this.call.write());
|
|
2295
2430
|
}
|
|
@@ -2304,25 +2439,25 @@ export class GetGroupCallStars extends TLObject {
|
|
|
2304
2439
|
call;
|
|
2305
2440
|
constructor(params) {
|
|
2306
2441
|
super();
|
|
2307
|
-
this.classType =
|
|
2308
|
-
this.className =
|
|
2442
|
+
this.classType = 'functions';
|
|
2443
|
+
this.className = 'phone.GetGroupCallStars';
|
|
2309
2444
|
this.constructorId = 0x6f636302;
|
|
2310
2445
|
this.subclassOfId = 0xb447801a;
|
|
2311
|
-
this._slots = [
|
|
2446
|
+
this._slots = ['call'];
|
|
2312
2447
|
this.call = params.call;
|
|
2313
2448
|
}
|
|
2314
2449
|
/**
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2450
|
+
* Generate the TLObject from buffer.
|
|
2451
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2452
|
+
*/
|
|
2318
2453
|
static async read(_data, ..._args) {
|
|
2319
2454
|
// no flags
|
|
2320
2455
|
let call = await TLObject.read(_data);
|
|
2321
|
-
return new GetGroupCallStars({
|
|
2456
|
+
return new GetGroupCallStars({ call: call });
|
|
2322
2457
|
}
|
|
2323
2458
|
/**
|
|
2324
|
-
|
|
2325
|
-
|
|
2459
|
+
* Generate buffer from TLObject.
|
|
2460
|
+
*/
|
|
2326
2461
|
write() {
|
|
2327
2462
|
const b = new BytesIO();
|
|
2328
2463
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -2339,27 +2474,27 @@ export class SaveDefaultSendAs extends TLObject {
|
|
|
2339
2474
|
sendAs;
|
|
2340
2475
|
constructor(params) {
|
|
2341
2476
|
super();
|
|
2342
|
-
this.classType =
|
|
2343
|
-
this.className =
|
|
2477
|
+
this.classType = 'functions';
|
|
2478
|
+
this.className = 'phone.SaveDefaultSendAs';
|
|
2344
2479
|
this.constructorId = 0x4167add1;
|
|
2345
2480
|
this.subclassOfId = 0xf5b399ac;
|
|
2346
|
-
this._slots = [
|
|
2481
|
+
this._slots = ['call', 'sendAs'];
|
|
2347
2482
|
this.call = params.call;
|
|
2348
2483
|
this.sendAs = params.sendAs;
|
|
2349
2484
|
}
|
|
2350
2485
|
/**
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2486
|
+
* Generate the TLObject from buffer.
|
|
2487
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2488
|
+
*/
|
|
2354
2489
|
static async read(_data, ..._args) {
|
|
2355
2490
|
// no flags
|
|
2356
2491
|
let call = await TLObject.read(_data);
|
|
2357
2492
|
let sendAs = await TLObject.read(_data);
|
|
2358
|
-
return new SaveDefaultSendAs({
|
|
2493
|
+
return new SaveDefaultSendAs({ call: call, sendAs: sendAs });
|
|
2359
2494
|
}
|
|
2360
2495
|
/**
|
|
2361
|
-
|
|
2362
|
-
|
|
2496
|
+
* Generate buffer from TLObject.
|
|
2497
|
+
*/
|
|
2363
2498
|
write() {
|
|
2364
2499
|
const b = new BytesIO();
|
|
2365
2500
|
b.write(Primitive.Int.write(this.constructorId, false));
|