aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/juick/server/TelegramBotManager.java1
-rw-r--r--src/main/java/com/juick/server/XMPPConnection.java1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/com/juick/server/TelegramBotManager.java b/src/main/java/com/juick/server/TelegramBotManager.java
index 82114fb5..bf2f5a84 100644
--- a/src/main/java/com/juick/server/TelegramBotManager.java
+++ b/src/main/java/com/juick/server/TelegramBotManager.java
@@ -227,6 +227,7 @@ public class TelegramBotManager implements NotificationListener {
}
}
}
+ messagesService.getUnread(user_from).forEach(mid -> messagesService.setRead(user_from, mid));
} else {
List<Long> chats = telegramService.getAnonymous();
if (!chats.contains(message.chat().id())) {
diff --git a/src/main/java/com/juick/server/XMPPConnection.java b/src/main/java/com/juick/server/XMPPConnection.java
index 44cc4a30..e0e45cf7 100644
--- a/src/main/java/com/juick/server/XMPPConnection.java
+++ b/src/main/java/com/juick/server/XMPPConnection.java
@@ -620,6 +620,7 @@ public class XMPPConnection implements StanzaListener, NotificationListener {
result = incomingMessageJuick(user_from, msg.getFrom(),
String.format("@%s %s", msg.getTo().getLocal(), StringUtils.defaultString(msg.getBody())), attachment);
}
+ messagesService.getUnread(user_from).forEach(mid -> messagesService.setRead(user_from, mid));
} catch (Exception e1) {
logger.warn("message exception", e1);
}