Skip to content
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

Add API methods for forum group topics #281

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

frececroka
Copy link

Copy link
Collaborator

@JcMinarro JcMinarro left a 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,
Copy link
Collaborator

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.*") }
Copy link
Collaborator

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"
Copy link
Collaborator

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"
Copy link
Collaborator

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) {
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants