diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-03-19 15:05:01 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-03-19 15:05:01 +0100 |
commit | 389d4db311f22ceb787976a6c6130bb0260610bb (patch) | |
tree | 47d75d3086256806430ffabd5be3e2181d634779 /src/eu/siacs/conversations/services/XmppConnectionService.java | |
parent | 3a98a695d4c77cf879a76262b2d370d79e8b4fdb (diff) |
rename in muc fixed
Diffstat (limited to 'src/eu/siacs/conversations/services/XmppConnectionService.java')
-rw-r--r-- | src/eu/siacs/conversations/services/XmppConnectionService.java | 24 |
1 files changed, 2 insertions, 22 deletions
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; |