From 8e3e44769ec90a3080c80e7cc8cb5aaf9bb24ac2 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 1 Aug 2024 17:43:08 +0600 Subject: [PATCH] add defaults in StoryShareParams and StoryWidgetLink --- .../dev/inmo/tgbotapi/webapps/stories/StoryShareParams.kt | 2 +- .../kotlin/dev/inmo/tgbotapi/webapps/stories/StoryWidgetLink.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 c75e32660e..93257cdd0b 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 @@ -10,7 +10,7 @@ external interface StoryShareParams { fun StoryShareParams( text: String, - widgetLink: StoryWidgetLink? + widgetLink: StoryWidgetLink? = null ): StoryShareParams { val json = json() json["text"] = text diff --git a/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/stories/StoryWidgetLink.kt b/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/stories/StoryWidgetLink.kt index b56959cbd6..06767336a8 100644 --- a/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/stories/StoryWidgetLink.kt +++ b/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/stories/StoryWidgetLink.kt @@ -9,7 +9,7 @@ external interface StoryWidgetLink { fun StoryWidgetLink( url: String, - name: String? + name: String? = null ): StoryWidgetLink { val json = json() json["url"] = url