File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -616,6 +616,18 @@ export interface WebApp {
616616 */
617617 requestContact ( callback ?: ( success : boolean , response : RequestContactResponse ) => void ) : void ;
618618
619+ /**
620+ * A method that opens a dialog allowing the user to select an existing chat
621+ * or create a new one. If an optional _callback_ parameter is provided,
622+ * the _callback_ function will be called with a boolean as the first argument,
623+ * indicating whether the message was successfully sent.
624+ * The request id passed to this method must belong to a {@link https://core.telegram.org/bots/api#preparedkeyboardbutton | PreparedKeyboardButton}
625+ * previously obtained via the Bot API method {@link https://core.telegram.org/bots/api#savepreparedkeyboardbutton | savePreparedKeyboardButton}.
626+ *
627+ * @since Bot API 9.6+
628+ */
629+ requestChat ( req_id : string , callback ?: ( success : boolean ) => void ) : void ;
630+
619631 /**
620632 * A method that informs the Telegram app that the Mini App is ready to be displayed.
621633 * It is recommended to call this method as early as possible, as soon as all essential interface elements are loaded.
Original file line number Diff line number Diff line change 11{
22 "private" : true ,
33 "name" : " @types/telegram-web-app" ,
4- "version" : " 9.5 .9999" ,
4+ "version" : " 9.6 .9999" ,
55 "nonNpm" : " conflict" ,
66 "nonNpmDescription" : " telegram-web-app" ,
77 "projects" : [" https://telegram.org/js/telegram-web-app.js" ],
Original file line number Diff line number Diff line change @@ -138,3 +138,7 @@ app.SecondaryButton.iconCustomEmojiId; // $ExpectType string
138138app . SecondaryButton . setParams ( {
139139 icon_custom_emoji_id : "" , // $ExpectType string
140140} ) ;
141+
142+ app . requestChat ( "req_id" , ( success ) => {
143+ success ; // $ExpectType boolean
144+ } ) ;
You can’t perform that action at this time.
0 commit comments