|
11 | 11 | use danog\MadelineProto\FileRefExtractor\Ops\GetInputStickerSet; |
12 | 12 | use danog\MadelineProto\FileRefExtractor\Ops\GetInputUserOp; |
13 | 13 | use danog\MadelineProto\FileRefExtractor\Ops\GetMessageOp; |
14 | | -use danog\MadelineProto\FileRefExtractor\Ops\GetStickerSetFromDocumentAttributesOp; |
15 | 14 | use danog\MadelineProto\FileRefExtractor\Ops\Noop; |
16 | 15 | use danog\MadelineProto\FileRefExtractor\Ops\PrimitiveLiteralOp; |
17 | 16 | use danog\MadelineProto\FileRefExtractor\Ops\ThemeFormatOp; |
|
59 | 58 | 'stories.getStoriesByID', |
60 | 59 | [ |
61 | 60 | 'id' => new ArrayOp(new CopyOp([['storyItem', 'id']])), |
62 | | - 'peer' => new GetInputPeerOp(new Path([[$method, 'peer']])), |
| 61 | + 'peer' => new GetInputPeerOp(new Path([[$method, 'peer']], true)), |
63 | 62 | ], |
64 | 63 | 'fileSourceStory' |
65 | 64 | ); |
|
112 | 111 | 'stories.getStoriesByID', |
113 | 112 | [ |
114 | 113 | 'id' => new ArrayOp(new CopyOp([['storyItem', 'id']])), |
115 | | - 'peer' => new GetInputPeerOp(new Path([['peerStories', 'peer']])), |
| 114 | + 'peer' => new GetInputPeerOp(new Path([['peerStories', 'peer']], true)), |
116 | 115 | ], |
117 | 116 | 'fileSourceStory' |
118 | 117 | ); |
|
163 | 162 | $locations['channelAdminLogEvent'][] = new CallOp( |
164 | 163 | 'channels.getAdminLog', |
165 | 164 | [ |
166 | | - 'channel' => new GetInputChannelOp(new Path([['channels.getAdminLog', 'channel']])), |
| 165 | + 'channel' => new GetInputChannelOp(new Path([['channels.getAdminLog', 'channel']], true)), |
167 | 166 | 'max_id' => new CopyOp([['channelAdminLogEvent', 'id']]), |
168 | 167 | 'min_id' => new CopyOp([['channelAdminLogEvent', 'id']]), |
169 | 168 | 'limit' => new PrimitiveLiteralOp('int', 1), |
|
248 | 247 | 'payments.getStarsTransactionsByID', |
249 | 248 | [ |
250 | 249 | 'peer' => new CopyOp([[$method, 'peer']]), |
251 | | - ...($method === 'payments.getStarsSubscriptions' ? [] : ['ton' => new CopyOp([[$method, 'ton', Path::FLAG_PASSTHROUGH]])]), |
| 250 | + ...($method === 'payments.getStarsSubscriptions' ? [] : ['ton' => new CopyOp(new Path([[$method, 'ton', Path::FLAG_PASSTHROUGH]], true))]), |
252 | 251 | 'id' => new ArrayOp(new ConstructorOp( |
253 | 252 | 'inputStarsTransaction', |
254 | 253 | [ |
|
356 | 355 | $locations['photo'][] = new CallOp( |
357 | 356 | 'photos.getUserPhotos', |
358 | 357 | [ |
359 | | - 'user_id' => new CopyOp([['photos.getUserPhotos', 'user_id']]), |
| 358 | + 'user_id' => new CopyOp(new Path([['photos.getUserPhotos', 'user_id']], true)), |
360 | 359 | 'offset' => new PrimitiveLiteralOp('int', -1), |
361 | 360 | 'max_id' => new CopyOp([['photo', 'id']]), |
362 | 361 | 'limit' => new PrimitiveLiteralOp('int', 1), |
|
512 | 511 |
|
513 | 512 | $validated = []; |
514 | 513 |
|
515 | | -$tmp = new Ast(allowBackrefs: true, allowUnpacking: true, outputSchema: $pre); |
| 514 | +$tmp = new Ast(allowUnpacking: true, outputSchema: $pre); |
516 | 515 | foreach (['Document' => 'document', 'Photo' => 'photo'] as $type => $constructor) { |
517 | 516 | $stack = [[$constructor, 'file_reference']]; |
518 | 517 | $stackTypes = [$type => 1]; |
@@ -600,7 +599,7 @@ static function (array $stack) use ($locations, $TL, $tmp, &$validated, $storyMe |
600 | 599 | throw new AssertionError("Leftover ops!"); |
601 | 600 | } |
602 | 601 |
|
603 | | -$output = new Ast(allowBackrefs: true, allowUnpacking: false, outputSchema: $pre); |
| 602 | +$output = new Ast(allowUnpacking: false, outputSchema: $pre); |
604 | 603 | foreach ($locations as $constructor => $ops) { |
605 | 604 | foreach ($ops as $idx => $op) { |
606 | 605 | $op->build(new TLContext($TL, $output, $constructor, $TL->isConstructor($constructor))); |
|
0 commit comments