-
Notifications
You must be signed in to change notification settings - Fork 180
Add API methods for forum group topics #281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
It looks really good and I appreciate you included tests to cover the new code.
I just left some comments, could you check them?
fun createForumTopic( | ||
chatId: ChatId, | ||
name: String, | ||
iconColor: Int? = null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as it must be one of a limited list of values, what do you think about using an enum for it?
It would be easier to use and will avoid issues
private val callbackAnswerText: String? = null, | ||
private val callbackAnswerShowAlert: Boolean? = null, | ||
private val callbackAnswerUrl: String? = null, | ||
private val callbackAnswerCacheTime: Int? = null, | ||
private val handleCallbackQuery: HandleCallbackQuery | ||
) : Handler { | ||
|
||
private val callbackDataRegex = callbackData?.let { Regex(Regex.escape(it) + "\\b.*") } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it related to this PR?
@@ -54,11 +59,11 @@ sourceSets { | |||
} | |||
|
|||
compileKotlin { | |||
kotlinOptions.jvmTarget = "1.8" | |||
kotlinOptions.jvmTarget = "17" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to update jvmTarget?
This change could be a breaking change for the users that are using this library.
jvmTarget 17 is not supported by Android SDK yet, so whatever person using it on an Android Application could have some issues adding the library
@@ -5,7 +5,7 @@ buildscript { | |||
} | |||
|
|||
plugins { | |||
id "org.jetbrains.kotlin.jvm" version "1.5.31" | |||
id "org.jetbrains.kotlin.jvm" version "1.8.10" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we have this change on a different PR?
@@ -3,7 +3,7 @@ package com.github.kotlintelegrambot | |||
import com.github.kotlintelegrambot.entities.Update | |||
import com.google.gson.Gson | |||
|
|||
internal class UpdateMapper(private val gson: Gson) { | |||
class UpdateMapper(private val gson: Gson) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to open access to this class?
This PR implements the following methods: