Skip to content

Commit

Permalink
Fixes bug where 2 messages with same content wouldnt be added
Browse files Browse the repository at this point in the history
  • Loading branch information
ForceTower committed May 7, 2024
1 parent 11ce957 commit bfc3ac2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ abstract class MessageDao {
open fun insertIgnoring(messages: List<Message>) {
updateOldMessages()
for (message in messages) {
val direct = getMessageByHashDirect(message.hashMessage)
val direct = if (message.html) {
getMessageByHashDirect(message.hashMessage)
} else {
getMessageDirect(message.sagresId)
}
if (direct != null) {
if (message.senderName != null) {
if (direct.senderName.isNullOrBlank()) {
Expand Down

0 comments on commit bfc3ac2

Please sign in to comment.