From 5e1fd99ca82729770dedb5dc4ee8762c5acc146c Mon Sep 17 00:00:00 2001 From: Alex Sokol / y9san9 Date: Tue, 28 Nov 2023 00:18:32 +0300 Subject: [PATCH] fix: changed username format --- build.gradle.kts | 1 + src/main/kotlin/app/meetacy/telegram/bot/Main.kt | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 934cfe8..ab988db 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,6 +14,7 @@ application { dependencies { implementation(libs.ktgbotapi) implementation(libs.meetacy.sdk.api.ktor) + implementation(libs.slf4j.simple) } val propertiesFile: File = rootProject.file("deploy.properties") diff --git a/src/main/kotlin/app/meetacy/telegram/bot/Main.kt b/src/main/kotlin/app/meetacy/telegram/bot/Main.kt index 7af729a..77e3f70 100644 --- a/src/main/kotlin/app/meetacy/telegram/bot/Main.kt +++ b/src/main/kotlin/app/meetacy/telegram/bot/Main.kt @@ -27,7 +27,6 @@ suspend fun main(): Unit = coroutineScope { val token = System.getenv("BOT_TOKEN") val secretBotKey = System.getenv("SECRET_KEY").let(::SecretTelegramBotKey) - val secretBotKeySize = 64 val bot = telegramBot(token) val meetacy = MeetacyApi.production() @@ -80,7 +79,7 @@ suspend fun main(): Unit = coroutineScope { temporalHash = TemporalTelegramHash(temporalHash), secretBotKey = secretBotKey, telegramId = message.from.id.chatId, - username = message.from.username?.username, + username = message.from.username?.usernameWithoutAt, firstName = message.from.firstName, lastName = message.from.lastName )