Fixes FS#156 and FS#135 (occured again)
This commit is contained in:
parent
cb55d2af52
commit
b5d1ee194c
1 changed files with 10 additions and 4 deletions
|
@ -431,9 +431,12 @@ public class MessageParser extends AbstractParser implements
|
||||||
account.activateGracePeriod();
|
account.activateGracePeriod();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// only not mam messages should be marked as unread
|
||||||
|
if (query == null) {
|
||||||
message.markUnread();
|
message.markUnread();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (query == null) {
|
if (query == null) {
|
||||||
mXmppConnectionService.updateConversationUi();
|
mXmppConnectionService.updateConversationUi();
|
||||||
|
@ -453,17 +456,20 @@ public class MessageParser extends AbstractParser implements
|
||||||
if (message.getEncryption() == Message.ENCRYPTION_NONE || !ConversationsPlusPreferences.dontSaveEncrypted()) {
|
if (message.getEncryption() == Message.ENCRYPTION_NONE || !ConversationsPlusPreferences.dontSaveEncrypted()) {
|
||||||
mXmppConnectionService.databaseBackend.createMessage(message);
|
mXmppConnectionService.databaseBackend.createMessage(message);
|
||||||
}
|
}
|
||||||
final HttpConnectionManager manager = this.mXmppConnectionService.getHttpConnectionManager();
|
|
||||||
if (message.trusted()
|
if (message.trusted()
|
||||||
&& message.treatAsDownloadable() != Message.Decision.NEVER
|
&& message.treatAsDownloadable() != Message.Decision.NEVER
|
||||||
&& ConversationsPlusPreferences.autoAcceptFileSize() > 0
|
&& ConversationsPlusPreferences.autoAcceptFileSize() > 0
|
||||||
&& ConversationsPlusPreferences.autoDownloadFileLink()) {
|
&& ConversationsPlusPreferences.autoDownloadFileLink()) {
|
||||||
manager.createNewDownloadConnection(message);
|
this.mXmppConnectionService.getHttpConnectionManager().createNewDownloadConnection(message);
|
||||||
} else {
|
} else {
|
||||||
if (query == null) {
|
if (query == null) {
|
||||||
mXmppConnectionService.getNotificationService().push(message);
|
mXmppConnectionService.getNotificationService().push(message);
|
||||||
} else if (query.getWith() == null) { // mam catchup
|
} 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
|
} else if (!packet.hasChild("body")){ //no body
|
||||||
|
|
Loading…
Reference in a new issue