From 389d4db311f22ceb787976a6c6130bb0260610bb Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 19 Mar 2014 15:05:01 +0100 Subject: rename in muc fixed --- .../services/XmppConnectionService.java | 24 ++-------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'src/eu/siacs/conversations/services/XmppConnectionService.java') diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index c1136f5e..72f660b3 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -1035,34 +1035,14 @@ public class XmppConnectionService extends Service { } } }); + options.flagAboutToRename(); PresencePacket packet = new PresencePacket(); packet.setAttribute("to", conversation.getContactJid().split("/")[0] + "/" + nick); packet.setAttribute("from", conversation.getAccount().getFullJid()); conversation.getAccount().getXmppConnection() - .sendPresencePacket(packet, new OnPresencePacketReceived() { - - @Override - public void onPresencePacketReceived(Account account, - PresencePacket packet) { - final boolean changed; - String type = packet.getAttribute("type"); - changed = (!"error".equals(type)); - if (!changed) { - options.getOnRenameListener().onRename(false); - } else { - if (type == null) { - options.getOnRenameListener() - .onRename(true); - options.setNick(packet.getAttribute("from") - .split("/")[1]); - } else { - options.processPacket(packet); - } - } - } - }); + .sendPresencePacket(packet, null); } else { String jid = conversation.getContactJid().split("/")[0] + "/" + nick; -- cgit v1.2.3