1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-09-03 23:29:33 +00:00

fill changelog and add StoryShareParams factory function

This commit is contained in:
2024-08-01 17:38:16 +06:00
parent bd6ff747cb
commit 799ad6ca66
2 changed files with 20 additions and 1 deletions

View File

@@ -4,4 +4,14 @@ external interface StoryShareParams {
val text: String
@JsName("widget_link")
val widgetLink: StoryWidgetLink?
}
}
fun StoryShareParams(
text: String,
widgetLink: StoryWidgetLink?
): StoryShareParams {
val result: dynamic = js("{}")
result["text"] = text
widgetLink ?.let { result["widgetLink"] = it }
return result.unsafeCast<StoryShareParams>()
}