mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 03:58:44 +00:00
deprecate old asChatEventsFlow
This commit is contained in:
parent
71dac70635
commit
f6ec82b449
@ -19,12 +19,15 @@ fun <T : BaseSentMessageUpdate> Flow<T>.asCommonMessagesFlow() = mapNotNull {
|
|||||||
it.data as? CommonMessage<*>
|
it.data as? CommonMessage<*>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("NOTHING_TO_INLINE")
|
||||||
|
inline fun <T : BaseSentMessageUpdate> Flow<T>.chatEvents() = mapNotNull {
|
||||||
|
it.data as? ChatEventMessage<*>
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Will map incoming [BaseSentMessageUpdate]s to [ChatEventMessage] from [BaseSentMessageUpdate.data]
|
* Will map incoming [BaseSentMessageUpdate]s to [ChatEventMessage] from [BaseSentMessageUpdate.data]
|
||||||
*/
|
*/
|
||||||
fun <T : BaseSentMessageUpdate> Flow<T>.asChatEventsFlow() = mapNotNull {
|
@Deprecated("Renamed", ReplaceWith("chatEvents", "dev.inmo.tgbotapi.extensions.utils.updates.chatEvents"))
|
||||||
it.data as? ChatEventMessage
|
fun <T : BaseSentMessageUpdate> Flow<T>.asChatEventsFlow() = chatEvents()
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will map incoming [BaseSentMessageUpdate]s to [UnknownMessageType] from [BaseSentMessageUpdate.data]
|
* Will map incoming [BaseSentMessageUpdate]s to [UnknownMessageType] from [BaseSentMessageUpdate.data]
|
||||||
|
Loading…
Reference in New Issue
Block a user