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 Sep 16, 2024
1 parent 7014ae7 commit 3cf16b2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ class TextMessageAction(val contactService: ContactService,
chat = chatStatistics
}
spamService.add(spam)
remoteChat.execute(DeleteMessage(message.chatId.toString(), message.messageId))
val send = SendMessage(
message.chatId.toString(), "Обнаружен спам"
message.chatId.toString(), "Обнаружен спам от пользователя: ${userContact.firstName}"
)
send.replyToMessageId = message.messageId
val infoMsg = remoteChat.execute(send)
GlobalScope.launch {
delay(10000)
remoteChat.execute(DeleteMessage(message.chatId.toString(), message.messageId))
remoteChat.execute(DeleteMessage(message.chatId.toString(), infoMsg.messageId))
}
}
Expand Down

0 comments on commit 3cf16b2

Please sign in to comment.