diff options
Diffstat (limited to 'src/eu/siacs/conversations/parser')
-rw-r--r-- | src/eu/siacs/conversations/parser/MessageParser.java | 14 | ||||
-rw-r--r-- | src/eu/siacs/conversations/parser/PresenceParser.java | 3 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/eu/siacs/conversations/parser/MessageParser.java b/src/eu/siacs/conversations/parser/MessageParser.java index ed846fe1..bd136a33 100644 --- a/src/eu/siacs/conversations/parser/MessageParser.java +++ b/src/eu/siacs/conversations/parser/MessageParser.java @@ -75,9 +75,8 @@ public class MessageParser extends AbstractParser implements } if (!conversation.hasValidOtrSession()) { if (properlyAddressed) { - conversation.startOtrSession( - mXmppConnectionService, - presence, false); + conversation.startOtrSession(mXmppConnectionService, presence, + false); } else { return null; } @@ -87,8 +86,7 @@ public class MessageParser extends AbstractParser implements if (!foreignPresence.equals(presence)) { conversation.endOtrIfNeeded(); if (properlyAddressed) { - conversation.startOtrSession( - mXmppConnectionService, + conversation.startOtrSession(mXmppConnectionService, presence, false); } else { return null; @@ -289,7 +287,8 @@ public class MessageParser extends AbstractParser implements if (!conversation.getMucOptions().online()) { if (x.hasChild("password")) { Element password = x.findChild("password"); - conversation.getMucOptions().setPassword(password.getContent()); + conversation.getMucOptions().setPassword( + password.getContent()); } mXmppConnectionService.joinMuc(conversation); mXmppConnectionService.updateConversationUi(); @@ -453,7 +452,8 @@ public class MessageParser extends AbstractParser implements Conversation conversation = message.getConversation(); conversation.getMessages().add(message); if (packet.getType() != MessagePacket.TYPE_ERROR) { - if (message.getEncryption() == Message.ENCRYPTION_NONE || mXmppConnectionService.saveEncryptedMessages()) { + if (message.getEncryption() == Message.ENCRYPTION_NONE + || mXmppConnectionService.saveEncryptedMessages()) { mXmppConnectionService.databaseBackend.createMessage(message); } } diff --git a/src/eu/siacs/conversations/parser/PresenceParser.java b/src/eu/siacs/conversations/parser/PresenceParser.java index 18c23060..05ffa67e 100644 --- a/src/eu/siacs/conversations/parser/PresenceParser.java +++ b/src/eu/siacs/conversations/parser/PresenceParser.java @@ -107,7 +107,8 @@ public class PresenceParser extends AbstractParser implements contact.setOption(Contact.Options.PENDING_SUBSCRIPTION_REQUEST); } } - Element nick = packet.findChild("nick", "http://jabber.org/protocol/nick"); + Element nick = packet.findChild("nick", + "http://jabber.org/protocol/nick"); if (nick != null) { contact.setPresenceName(nick.getContent()); } |