diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-11-01 14:50:06 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-11-26 06:55:57 +0100 |
commit | fd6ed5b98984fa09f98b78cbe3e782a497c62c19 (patch) | |
tree | 48faf09e173005b329144e84c5f3fcbffdaa1c0d /src/main/java/eu/siacs/conversations/services | |
parent | 26ec6f7782551708d53a47138150405be84e4ccc (diff) |
detect server identity and added muc-workaround for slack
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 145a017ea..235a97858 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -812,7 +812,9 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa final Conversation conversation = message.getConversation(); account.deactivateGracePeriod(); MessagePacket packet = null; - boolean saveInDb = true; + final boolean addToConversation = conversation.getMode() != Conversation.MODE_MULTI + || account.getServerIdentity() != XmppConnection.Identity.SLACK; + boolean saveInDb = addToConversation; message.setStatus(Message.STATUS_WAITING); if (!resend && message.getEncryption() != Message.ENCRYPTION_OTR) { @@ -924,7 +926,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa } if (resend) { - if (packet != null) { + if (packet != null && addToConversation) { if (account.getXmppConnection().getFeatures().sm() || conversation.getMode() == Conversation.MODE_MULTI) { markMessage(message, Message.STATUS_UNSEND); } else { @@ -932,7 +934,9 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa } } } else { - conversation.add(message); + if (addToConversation) { + conversation.add(message); + } if (saveInDb && (message.getEncryption() == Message.ENCRYPTION_NONE || saveEncryptedMessages())) { databaseBackend.createMessage(message); } |