aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-03-04 04:36:19 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-03-04 04:36:19 +0100
commit79ec8b2e8128a1dc1d7d0962ce99e91fdaff8b98 (patch)
tree23a09f19a32d896ab9707c481c93c4af2f4defc0 /src/eu
parent6f86638341ffdeb51552627a04a1372b03256042 (diff)
leaving mucs works
Diffstat (limited to 'src/eu')
-rw-r--r--src/eu/siacs/conversations/services/XmppConnectionService.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java
index e341da1c..48f0e470 100644
--- a/src/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/eu/siacs/conversations/services/XmppConnectionService.java
@@ -194,8 +194,8 @@ public class XmppConnectionService extends Service {
PresencePacket packet) {
if (packet.hasChild("x")&&(packet.findChild("x").getAttribute("xmlns").startsWith("http://jabber.org/protocol/muc"))) {
Conversation muc = findMuc(packet.getAttribute("from").split("/")[0]);
- int error = muc.getMucOptions().getError();
if (muc!=null) {
+ int error = muc.getMucOptions().getError();
muc.getMucOptions().processPacket(packet);
if ((muc.getMucOptions().getError()!=error)&&(convChangedListener!=null)) {
Log.d(LOGTAG,"muc error status changed");
@@ -901,6 +901,11 @@ public class XmppConnectionService extends Service {
}
public void leaveMuc(Conversation conversation) {
+ PresencePacket packet = new PresencePacket();
+ packet.setAttribute("to", conversation.getContactJid());
+ packet.setAttribute("from", conversation.getAccount().getFullJid());
+ packet.setAttribute("type","unavailable");
+ conversation.getAccount().getXmppConnection().sendPresencePacket(packet);
conversation.getMucOptions().setOffline();
}