fix bug in sending leave
diff --git a/chatdialog.cpp b/chatdialog.cpp
index e55046e..6fdc657 100644
--- a/chatdialog.cpp
+++ b/chatdialog.cpp
@@ -834,7 +834,13 @@
// TODO: perhaps need to do a lot. e.g. use a new SyncAppSokcet
if (m_sock != NULL)
{
+ // keep the new prefix
+ QString newPrefix = m_user.getPrefix();
+ // send leave for the old
+ m_user.setPrefix(oldPrefix);
sendLeave();
+ // resume new prefix
+ m_user.setPrefix(newPrefix);
Sync::CcnxWrapperPtr handle = Sync::CcnxWrapper::Create();
handle->clearInterestFilter(oldPrefix.toStdString());
m_history.clear();