1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-22 16:47:13 +00:00

abstracts for difference between sent and edited messages updates

This commit is contained in:
InsanusMokrassar 2020-03-17 19:46:42 +06:00
parent 944d15f326
commit e7027047cb
7 changed files with 19 additions and 6 deletions

View File

@ -19,6 +19,11 @@
* Previous `UpdatesFilter` class was renamed to `SimpleUpdatesFilter` and for backward compatibility was added
builder function `UpdatesFilter`, which will be removed in near releases
* `FlowsUpdatesFilter` now implements `UpdatesFilter`
* `BaseSentMessageUpdate` and `BaseEditMessageUpdate` interfaces was added
* `EditChannelPostUpdate` now is implementing `BaseEditMessageUpdate` interface
* `EditMessageUpdate` now is implementing `BaseEditMessageUpdate` interface
* `ChannelPostUpdate` now is implementing `BaseSentMessageUpdate` interface
* `MessageUpdate` now is implementing `BaseSentMessageUpdate` interface
* `TelegramBotAPI-extensions-api`:
* All functions from `com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.UpdatesPolling` now available
in package `com.github.insanusmokrassar.TelegramBotAPI.extensions.api.updates.UpdatesPolling`

View File

@ -3,8 +3,9 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.update
import com.github.insanusmokrassar.TelegramBotAPI.types.UpdateIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
import com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts.BaseMessageUpdate
import com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts.BaseSentMessageUpdate
data class ChannelPostUpdate(
override val updateId: UpdateIdentifier,
override val data: Message
) : BaseMessageUpdate
) : BaseSentMessageUpdate

View File

@ -2,9 +2,9 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.update
import com.github.insanusmokrassar.TelegramBotAPI.types.UpdateIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
import com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts.BaseMessageUpdate
import com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts.BaseEditMessageUpdate
data class EditChannelPostUpdate(
override val updateId: UpdateIdentifier,
override val data: Message
) : BaseMessageUpdate
) : BaseEditMessageUpdate

View File

@ -2,9 +2,9 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.update
import com.github.insanusmokrassar.TelegramBotAPI.types.UpdateIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
import com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts.BaseMessageUpdate
import com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts.BaseEditMessageUpdate
data class EditMessageUpdate(
override val updateId: UpdateIdentifier,
override val data: Message
) : BaseMessageUpdate
) : BaseEditMessageUpdate

View File

@ -3,8 +3,9 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.update
import com.github.insanusmokrassar.TelegramBotAPI.types.UpdateIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
import com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts.BaseMessageUpdate
import com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts.BaseSentMessageUpdate
data class MessageUpdate(
override val updateId: UpdateIdentifier,
override val data: Message
) : BaseMessageUpdate
) : BaseSentMessageUpdate

View File

@ -0,0 +1,3 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts
interface BaseEditMessageUpdate : BaseMessageUpdate

View File

@ -0,0 +1,3 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts
interface BaseSentMessageUpdate : BaseMessageUpdate