DEHuckaKpyT / telegram-bot

Kotlin Telegram Bot Library for creating scalable and expandable applications with helpful features.
https://dehuckakpyt.github.io/telegram-bot/starter-topic.html
Apache License 2.0
28 stars 3 forks source link

Can JpaTelegramMessage save InlineKeyboardMarkup when editing a message? #6

Closed kukume closed 1 month ago

kukume commented 1 month ago

Can JpaTelegramMessage save InlineKeyboardMarkup when editing a message?

DEHuckaKpyT commented 1 month ago

Not at the moment.

But there are plans to refactor message saving. Roughly I see it like this: Was:

interface MessageSource {

    suspend fun save(chatId: Long, fromId: Long, fromBot: Boolean, messageId: Long, type: String, text: String?, fileIds: List<String>?)
}

will be:

interface MessageSource {

    suspend fun save(message: Message, fromBot: Boolean)
}

This will allow you to save whatever you want from a message.

DEHuckaKpyT commented 1 month ago

Time is tight at the moment. I can do some sort of temporary solution within a week. But presumably with the final MessageSource version.

If it is critical for you, I can try to do it within a week. Just write about it, please

DEHuckaKpyT commented 1 month ago

I looked at your PR and it seemed to me that it would be difficult to maintain. I propose a more flexible solution, even though it's a bit more complicated.

If you're happy with this option, I'll merge the PR in the near future.

kukume commented 1 month ago

I solve it temporarily.

kukume commented 1 month ago

8 I think it's OK.

DEHuckaKpyT commented 1 month ago

Thank you for issue!