fixed error with leaving mucs

This commit is contained in:
Daniel Gultsch 2014-03-26 18:56:02 +01:00
parent 0c37abf1e9
commit 185d4d120b
1 changed files with 2 additions and 1 deletions

View File

@ -1083,9 +1083,10 @@ public class XmppConnectionService extends Service {
public void leaveMuc(Conversation conversation) {
PresencePacket packet = new PresencePacket();
packet.setAttribute("to", conversation.getContactJid());
packet.setAttribute("to", conversation.getContactJid().split("/")[0] + "/" + conversation.getMucOptions().getNick());
packet.setAttribute("from", conversation.getAccount().getFullJid());
packet.setAttribute("type", "unavailable");
Log.d(LOGTAG,"send leaving muc " + packet);
conversation.getAccount().getXmppConnection()
.sendPresencePacket(packet);
conversation.getMucOptions().setOffline();