aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/services
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-07-15 21:54:11 +0200
committeriNPUTmice <daniel@gultsch.de>2014-07-15 21:54:11 +0200
commit9532a9889b9c606b3cf965595abf2af7de29698c (patch)
tree206012bf75928cc02a069ac1d35cf08f99ea579e /src/eu/siacs/conversations/services
parent177e802a77b30ae5e703f93f36da4a35d7720a05 (diff)
couple of bug fixes related to muc renaming
Diffstat (limited to 'src/eu/siacs/conversations/services')
-rw-r--r--src/eu/siacs/conversations/services/XmppConnectionService.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java
index 770f9c86f..abcb1f975 100644
--- a/src/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/eu/siacs/conversations/services/XmppConnectionService.java
@@ -964,6 +964,7 @@ public class XmppConnectionService extends Service {
public void renameInMuc(final Conversation conversation, final String nick) {
final MucOptions options = conversation.getMucOptions();
+ options.setJoinNick(nick);
if (options.online()) {
Account account = conversation.getAccount();
options.setOnRenameListener(new OnRenameListener() {
@@ -974,7 +975,7 @@ public class XmppConnectionService extends Service {
renameListener.onRename(success);
}
if (success) {
- conversation.setContactJid(conversation.getMucOptions().getJoinNick());
+ conversation.setContactJid(conversation.getMucOptions().getJoinJid());
databaseBackend.updateConversation(conversation);
Bookmark bookmark = conversation.getBookmark();
if (bookmark!=null) {
@@ -986,8 +987,7 @@ public class XmppConnectionService extends Service {
});
options.flagAboutToRename();
PresencePacket packet = new PresencePacket();
- packet.setAttribute("to",
- conversation.getContactJid().split("/")[0] + "/" + nick);
+ packet.setAttribute("to",options.getJoinJid());
packet.setAttribute("from", conversation.getAccount().getFullJid());
String sig = account.getPgpSignature();
@@ -997,9 +997,7 @@ public class XmppConnectionService extends Service {
}
sendPresencePacket(account,packet);
} else {
- String jid = conversation.getContactJid().split("/")[0] + "/"
- + nick;
- conversation.setContactJid(jid);
+ conversation.setContactJid(options.getJoinJid());
databaseBackend.updateConversation(conversation);
if (conversation.getAccount().getStatus() == Account.STATUS_ONLINE) {
Bookmark bookmark = conversation.getBookmark();