aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/parser
diff options
context:
space:
mode:
authorlookshe <github@lookshe.org>2016-03-20 02:14:45 +0100
committerlookshe <github@lookshe.org>2016-03-20 02:14:45 +0100
commitc9b7ed3d3f6cde5e78bf0fa7a77eae81f13cbc09 (patch)
tree84fcd6dca2e2b1904eca61fad16a85e465b87fae /src/main/java/eu/siacs/conversations/parser
parent98e61f189c5f8bce7a001997fa2352c0c27f2778 (diff)
parentd89d7a300058e87a4dbf1b1f5b3fe9275ebcb2ae (diff)
Merge branch 'trz/rebase' into trz/merge_1.11.1
Diffstat (limited to 'src/main/java/eu/siacs/conversations/parser')
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
index f9d8f508..073cc849 100644
--- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
@@ -432,7 +432,10 @@ public class MessageParser extends AbstractParser implements
account.activateGracePeriod();
}
} else {
- message.markUnread();
+ // only not mam messages should be marked as unread
+ if (query == null) {
+ message.markUnread();
+ }
}
}
@@ -454,17 +457,20 @@ public class MessageParser extends AbstractParser implements
if (message.getEncryption() == Message.ENCRYPTION_NONE || !ConversationsPlusPreferences.dontSaveEncrypted()) {
mXmppConnectionService.databaseBackend.createMessage(message);
}
- final HttpConnectionManager manager = this.mXmppConnectionService.getHttpConnectionManager();
if (message.trusted()
&& message.treatAsDownloadable() != Message.Decision.NEVER
&& ConversationsPlusPreferences.autoAcceptFileSize() > 0
&& ConversationsPlusPreferences.autoDownloadFileLink()) {
- manager.createNewDownloadConnection(message);
+ this.mXmppConnectionService.getHttpConnectionManager().createNewDownloadConnection(message);
} else {
if (query == null) {
mXmppConnectionService.getNotificationService().push(message);
} else if (query.getWith() == null) { // mam catchup
- mXmppConnectionService.getNotificationService().pushFromBacklog(message);
+ /*
+ Like suggested in https://bugs.thedevstack.de/task/156 user should be notified
+ in some other way of loaded messages.
+ */
+ // mXmppConnectionService.getNotificationService().pushFromBacklog(message);
}
}
} else if (!packet.hasChild("body")){ //no body