diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-07-21 16:04:53 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-07-21 16:04:53 +0200 |
commit | f9ed76f5e130f744e118ac752728949688a206a9 (patch) | |
tree | 25f25b1f82026cf51ab46d56d2af6bb79dd7f6e9 /src/eu/siacs/conversations/parser/MessageParser.java | |
parent | 87aff4c6d8ba516bf847b69bab25e5601a3bcd76 (diff) |
switched to direct invites. fixes #284
Diffstat (limited to 'src/eu/siacs/conversations/parser/MessageParser.java')
-rw-r--r-- | src/eu/siacs/conversations/parser/MessageParser.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/parser/MessageParser.java b/src/eu/siacs/conversations/parser/MessageParser.java index 1b03f4ee..08930a3b 100644 --- a/src/eu/siacs/conversations/parser/MessageParser.java +++ b/src/eu/siacs/conversations/parser/MessageParser.java @@ -221,8 +221,8 @@ public class MessageParser extends AbstractParser implements updateLastseen(packet, account, false); mXmppConnectionService.markMessage(account, fromParts[0], id, Message.STATUS_SEND_RECEIVED); - } else if (packet.hasChild("x")) { - Element x = packet.findChild("x"); + } else if (packet.hasChild("x","http://jabber.org/protocol/muc#user")) { + Element x = packet.findChild("x","http://jabber.org/protocol/muc#user"); if (x.hasChild("invite")) { Conversation conversation = mXmppConnectionService .findOrCreateConversation(account, @@ -233,6 +233,17 @@ public class MessageParser extends AbstractParser implements } } + } else if (packet.hasChild("x", "jabber:x:conference")) { + Element x = packet.findChild("x", "jabber:x:conference"); + String jid = x.getAttribute("jid"); + if (jid!=null) { + Conversation conversation = mXmppConnectionService + .findOrCreateConversation(account,jid, true); + if (!conversation.getMucOptions().online()) { + mXmppConnectionService.joinMuc(conversation); + mXmppConnectionService.updateConversationUi(); + } + } } } |