Skip to content

Commit 7f58520

Browse files
committed
Cleanup
1 parent 7743bab commit 7f58520

1 file changed

Lines changed: 1 addition & 83 deletions

File tree

tools/FileRefExtractor/FileRefGenerator.php

Lines changed: 1 addition & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ public static function generate(int|string $layer, string $inputSchema, string $
6868
}
6969

7070
$storyMethods = [];
71-
//foreach (['stories.StoryViewsList', 'stories.Stories', 'stories.PeerStories', 'stories.StoryReactionsList'] as $t) {
7271
foreach (['stories.Stories'] as $t) {
7372
foreach ($TL->getMethodsOfType($t) as $method => $_) {
7473
$storyMethods[$method] = true;
@@ -82,23 +81,6 @@ public static function generate(int|string $layer, string $inputSchema, string $
8281
);
8382
}
8483
}
85-
/*
86-
foreach (['stories.Stories'] as $t) {
87-
foreach ($TL->getMethodsOfType($t) as $method => $_) {
88-
$storyMethods[$method] = true;
89-
$locations[$method][] = new CallOp(
90-
'stories.getStoriesByID',
91-
[
92-
'id' => new ArrayOp(new CopyOp([
93-
[$method, ''],
94-
['stories.stories', 'stories', Path::FLAG_UNPACK_ARRAY],
95-
['storyItem', 'id'],
96-
])),
97-
'peer' => new GetInputPeerOp(new Path([[$method, 'peer']])),
98-
]
99-
);
100-
}
101-
}*/
10284

10385
$locations['storyViewPublicRepost'][] = new CallOp(
10486
'stories.getStoriesByID',
@@ -117,14 +99,6 @@ public static function generate(int|string $layer, string $inputSchema, string $
11799
'fileSourceStory'
118100
);
119101

120-
/*$locations['peerStories'][] = new CallOp(
121-
'stories.getStoriesByID',
122-
[
123-
'id' => new ArrayOp(new CopyOp([['peerStories', 'stories', Path::FLAG_UNPACK_ARRAY], ['storyItem', 'id']])),
124-
'peer' => new GetInputPeerOp(new Path([['peerStories', 'peer']])),
125-
]
126-
);*/
127-
128102
$locations['storyItem'][] = new CallOp(
129103
'stories.getStoriesByID',
130104
[
@@ -189,26 +163,6 @@ public static function generate(int|string $layer, string $inputSchema, string $
189163
'fileSourceAdminLog'
190164
);
191165

192-
/*
193-
$locations['channels.getAdminLog'][] = new CallOp(
194-
'channels.getAdminLog',
195-
[
196-
'channel' => new GetInputChannelOp(new Path([['channels.getAdminLog', 'channel']])),
197-
'max_id' => new CopyOp([
198-
['channels.getAdminLog', ''],
199-
['channels.adminLogResults', 'events', Path::FLAG_UNPACK_ARRAY],
200-
['channelAdminLogEvent', 'id'],
201-
]),
202-
'min_id' => new CopyOp([
203-
['channels.getAdminLog', ''],
204-
['channels.adminLogResults', 'events', Path::FLAG_UNPACK_ARRAY],
205-
['channelAdminLogEvent', 'id'],
206-
]),
207-
'limit' => new PrimitiveLiteralOp('int', 1),
208-
'q' => new PrimitiveLiteralOp('string', ''),
209-
]
210-
);*/
211-
212166
foreach (['stories.createAlbum', 'stories.getAlbums', 'stories.updateAlbum'] as $m) {
213167
$locations[$m][] = new CallOp('stories.getAlbums', [
214168
'peer' => new GetInputPeerOp(new Path([[$m, 'peer']])),
@@ -275,29 +229,7 @@ public static function generate(int|string $layer, string $inputSchema, string $
275229
)),
276230
],
277231
'fileSourceStarsTransaction'
278-
);/*
279-
$locations[$method][] = new CallOp(
280-
'payments.getStarsTransactionsByID',
281-
[
282-
'peer' => new CopyOp([[$method, 'peer']]),
283-
...($method === 'payments.getStarsSubscriptions' ? [] : ['ton' => new CopyOp([[$method, 'ton', Path::FLAG_PASSTHROUGH]])]),
284-
'id' => new ArrayOp(new ConstructorOp(
285-
'inputStarsTransaction',
286-
[
287-
'id' => new CopyOp([
288-
[$method, ''],
289-
['payments.starsStatus', 'history', Path::FLAG_IF_ABSENT_ABORT|Path::FLAG_UNPACK_ARRAY],
290-
['starsTransaction', 'id'],
291-
]),
292-
'refund' => new CopyOp([
293-
[$method, ''],
294-
['payments.starsStatus', 'history', Path::FLAG_IF_ABSENT_ABORT|Path::FLAG_UNPACK_ARRAY],
295-
['starsTransaction', 'refund', Path::FLAG_PASSTHROUGH],
296-
]),
297-
]
298-
)),
299-
]
300-
);*/
232+
);
301233
}
302234
$locations['attachMenuBot'][] = new CallOp(
303235
'messages.getAttachMenuBot',
@@ -380,20 +312,6 @@ public static function generate(int|string $layer, string $inputSchema, string $
380312
],
381313
'fileSourceUserProfilePhoto'
382314
);
383-
/*
384-
$locations['photos.getUserPhotos'][] = new CallOp(
385-
'photos.getUserPhotos',
386-
[
387-
'user_id' => new CopyOp([['photos.getUserPhotos', 'user_id']]),
388-
'offset' => new PrimitiveLiteralOp('int', -1),
389-
'max_id' => new CopyOp([
390-
['photos.getUserPhotos', ''],
391-
['photos.photos', 'photos', Path::FLAG_UNPACK_ARRAY],
392-
['photo', 'id'],
393-
]),
394-
'limit' => new PrimitiveLiteralOp('int', 1),
395-
]
396-
);*/
397315

398316
foreach (['photos.updateProfilePhoto', 'photos.uploadProfilePhoto'] as $method) {
399317
$locations[$method][] = new CallOp(

0 commit comments

Comments
 (0)