diff --git a/CHANGELOG.md b/CHANGELOG.md index 790c9275b7..49dbe847d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ **THIS UPDATE CONTAINS ADDING OF SUPPORT FOR BOTS API 7.8** +* `Core`: + * `OptionallyBusinessConnectionRequest` now extends `WithOptionalBusinessConnectionId` + * Add `hasMainWebApp` in `ExtendedBot` +* `API`: + * Add `BusinessConnectionId` to pin/unpin methods +* `WebApp`: + * Add `shareToStory` in `WebApp` + + ## 15.2.0 diff --git a/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/stories/StoryShareParams.kt b/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/stories/StoryShareParams.kt index 2ecb275909..f8b91b9b49 100644 --- a/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/stories/StoryShareParams.kt +++ b/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/stories/StoryShareParams.kt @@ -4,4 +4,14 @@ external interface StoryShareParams { val text: String @JsName("widget_link") val widgetLink: StoryWidgetLink? -} \ No newline at end of file +} + +fun StoryShareParams( + text: String, + widgetLink: StoryWidgetLink? +): StoryShareParams { + val result: dynamic = js("{}") + result["text"] = text + widgetLink ?.let { result["widgetLink"] = it } + return result.unsafeCast() +}