Skip to content

Commit

Permalink
Fix check if the text of message is not null.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterarsentev committed Aug 21, 2024
1 parent 6af5431 commit 7014ae7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deploy.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ git rebase
mvn clean package -DskipTests=true

echo "run project"
nohup java -Xms512m -Xmx1024m "-Dspring.config.location=file:./dionea.properties" -jar target/dionea-0.0.1.jar &
nohup java "-Dspring.config.location=file:./dionea.properties" -jar target/dionea-0.0.1.jar &
4 changes: 3 additions & 1 deletion src/main/kotlin/pro/dionea/service/actions/ReplyAction.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import org.telegram.telegrambots.meta.api.objects.replykeyboard.buttons.InlineKe
class ReplyAction(val botName: String): UpdateAction {

override fun check(update: Update): Boolean
= update.message.text.contains(botName) && update.message.isReply
= update.message.text != null
&& update.message.text.contains(botName)
&& update.message.isReply

override fun execute(update: Update, remoteChat: RemoteChat) {
val message = update.message
Expand Down

0 comments on commit 7014ae7

Please sign in to comment.