@@ -68,6 +68,7 @@ public static function generate(int|string $layer, string $inputSchema, string $
6868 new GetInputPeerOp (new Path ([[$ constructor , 'peer_id ' ]])),
6969 new CopyOp ([[$ constructor , 'id ' ]]),
7070 $ constructor === 'message ' ? new CopyOp ([[$ constructor , 'from_scheduled ' , Path::FLAG_PASSTHROUGH ]]) : null ,
71+ $ constructor === 'message ' ? new CopyOp ([[$ constructor , 'quick_reply_shortcut_id ' , Path::FLAG_PASSTHROUGH ]]) : null ,
7172 'fileSourceMessage ' ,
7273 );
7374 }
@@ -486,6 +487,7 @@ public static function generate(int|string $layer, string $inputSchema, string $
486487 'fileSourceMessage ' => [
487488 'flags ' => '# ' ,
488489 'from_scheduled ' => 'flags.0?true ' ,
490+ 'quick_reply_shortcut_id ' => 'flags.1?int ' ,
489491 'peer ' => 'long ' ,
490492 'id ' => 'int ' ,
491493 ],
@@ -547,20 +549,22 @@ public static function generate(int|string $layer, string $inputSchema, string $
547549 }
548550 }
549551
552+ $ traversalPairs = [];
550553 $ tmp = new Ast (blacklistedPredicates: $ blacklistedPredicates , allowUnpacking: true , outputSchema: $ pre );
551554 foreach ($ incomingCons as $ constructor => $ _ ) {
552555 $ type = ucfirst ($ constructor );
553556 $ stack = [[$ constructor , 'file_reference ' ]];
554557 $ stackTypes = [$ type => 1 ];
555558 $ recurse (
556- static function (array $ stack ) use ($ locations , $ TL , $ tmp , &$ validated , $ storyMethods , $ starMethods , $ stickerMethods ): void {
559+ static function (array $ stack ) use ($ locations , $ TL , $ tmp , &$ traversalPairs , & $ validated , $ storyMethods , $ starMethods , $ stickerMethods ): void {
557560 $ slice = [];
558561 $ hadAny = false ;
559562 $ hadAnyWithNoFlags = false ;
560563 $ skippedDueToFlags = [];
561564 $ top = end ($ stack )[0 ];
562565 for ($ x = \count ($ stack )-1 ; $ x >= 0 ; $ x --) {
563566 $ pair = $ stack [$ x ];
567+ //$traversalPairs[json_encode($pair)] = $pair;
564568 foreach ($ locations [$ pair [0 ]] ?? [] as $ op ) {
565569 $ normalized = $ op ->normalize ($ slice , $ pair [0 ], false );
566570 if ($ normalized === null ) {
@@ -582,10 +586,7 @@ static function (array $stack) use ($locations, $TL, $tmp, &$validated, $storyMe
582586 if (!$ hadAny ) {
583587 throw new AssertionError ("Uncovered path: " . json_encode ($ stack ));
584588 }
585- if ($ hadAnyWithNoFlags ) {
586- return ;
587- }
588- if ($ skippedDueToFlags ) {
589+ if (!$ hadAnyWithNoFlags && $ skippedDueToFlags ) {
589590 if ($ top === 'updateStory '
590591 || $ top === 'peerStories '
591592 // The two above always have the story peer flag set.
@@ -629,6 +630,7 @@ static function (array $stack) use ($locations, $TL, $tmp, &$validated, $storyMe
629630 $ stackTypes ,
630631 );
631632 }
633+ //var_dump(array_values($traversalPairs));
632634
633635 $ diff = [];
634636 foreach ($ locations as $ constructor => $ ops ) {
0 commit comments