Skip to content

Commit c9880a8

Browse files
committed
Move toVotesID to the VotingProcessor
1 parent ce1c524 commit c9880a8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

jep/src/main/kotlin/by/jprof/telegram/bot/jep/JEPUpdateProcessor.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ class JEPUpdateProcessor(
3636
bot,
3737
), UpdateProcessor {
3838
companion object {
39-
val logger = LogManager.getLogger(JEPUpdateProcessor::class.java)!!
40-
val linkRegex = "https?://openjdk\\.java\\.net/jeps/(\\d+)/?".toRegex()
39+
private val logger = LogManager.getLogger(JEPUpdateProcessor::class.java)!!
40+
private val linkRegex = "https?://openjdk\\.java\\.net/jeps/(\\d+)/?".toRegex()
4141
}
4242

4343
override suspend fun process(update: Update) {
@@ -99,6 +99,4 @@ class JEPUpdateProcessor(
9999
replyMarkup = votes.toInlineKeyboardMarkup()
100100
)
101101
}
102-
103-
private fun String.toVotesID() = "JEP-$this"
104102
}

votes/voting-processor/src/main/kotlin/by/jprof/telegram/bot/votes/voting_processor/VotingProcessor.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ abstract class VotingProcessor(
1717
private val bot: RequestsExecutor,
1818
) {
1919
companion object {
20-
val logger = LogManager.getLogger(VotingProcessor::class.java)!!
20+
private val logger = LogManager.getLogger(VotingProcessor::class.java)!!
2121
}
2222

2323
suspend fun processCallbackQuery(callbackQuery: CallbackQuery) {
@@ -40,4 +40,6 @@ abstract class VotingProcessor(
4040
)
4141
}
4242
}
43+
44+
protected fun String.toVotesID() = "$prefix-$this"
4345
}

0 commit comments

Comments
 (0)