mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-25 19:48:43 +00:00
commit
c0c591fe08
@ -1,5 +1,14 @@
|
||||
# TelegramBotAPI changelog
|
||||
|
||||
## 0.38.6
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.9.6` -> `0.9.9`
|
||||
* `Klock`: `2.4.13` -> `2.5.2`
|
||||
* `Core`:
|
||||
* New member of `MentionTextSource` - `username`
|
||||
|
||||
## 0.38.5
|
||||
|
||||
* `Common`:
|
||||
|
@ -8,11 +8,11 @@ kotlin.incremental.js=true
|
||||
kotlin_version=1.6.10
|
||||
kotlin_coroutines_version=1.6.0
|
||||
kotlin_serialisation_runtime_version=1.3.2
|
||||
klock_version=2.4.13
|
||||
klock_version=2.5.2
|
||||
uuid_version=0.4.0
|
||||
ktor_version=1.6.7
|
||||
|
||||
micro_utils_version=0.9.6
|
||||
micro_utils_version=0.9.9
|
||||
|
||||
javax_activation_version=1.1.1
|
||||
|
||||
@ -20,6 +20,6 @@ javax_activation_version=1.1.1
|
||||
dokka_version=1.6.10
|
||||
|
||||
library_group=dev.inmo
|
||||
library_version=0.38.5
|
||||
library_version=0.38.6
|
||||
|
||||
github_release_plugin_version=2.2.12
|
||||
|
@ -1,5 +1,6 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
import dev.inmo.tgbotapi.types.Username
|
||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||
import dev.inmo.tgbotapi.utils.extensions.makeString
|
||||
import dev.inmo.tgbotapi.utils.internal.*
|
||||
@ -23,6 +24,7 @@ data class MentionTextSource @RiskFeature(DirectInvocationOfTextSourceConstructo
|
||||
override val markdown: String by lazy { source.mentionMarkdown() }
|
||||
override val markdownV2: String by lazy { mentionMarkdownV2() }
|
||||
override val html: String by lazy { mentionHTML() }
|
||||
val username: Username = Username(source)
|
||||
|
||||
init {
|
||||
if (!source.startsWith("@")) {
|
||||
@ -42,3 +44,6 @@ inline fun mention(vararg parts: TextSource) = mention(parts.toList())
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun mention(whoToMention: String) = mention(regular(whoToMention))
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun mention(whoToMention: Username) = mention(whoToMention.username.dropWhile { it == '@' })
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user