diff options
author | Kevin Smith <git@kismith.co.uk> | 2011-04-30 12:37:13 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2011-04-30 12:37:13 (GMT) |
commit | 0c4887461ea3009f2f716ab0965f87471d5ac099 (patch) | |
tree | 039fd2f83d5efbbdaf19ac95c46e7c0e3eb6c6e5 /Swift/Controllers/Chat/MUCController.cpp | |
parent | bc6642978f7477f3c98a25c58e31c2451f41a39f (diff) | |
download | swift-contrib-0c4887461ea3009f2f716ab0965f87471d5ac099.zip swift-contrib-0c4887461ea3009f2f716ab0965f87471d5ac099.tar.bz2 |
Allow groups to be resorted based on changing names.
Resolves: #794
Diffstat (limited to 'Swift/Controllers/Chat/MUCController.cpp')
-rw-r--r-- | Swift/Controllers/Chat/MUCController.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp index 19489d3..3c6f965 100644 --- a/Swift/Controllers/Chat/MUCController.cpp +++ b/Swift/Controllers/Chat/MUCController.cpp @@ -322,7 +322,9 @@ void MUCController::handleOccupantRoleChanged(const std::string& nick, const MUC if (occupant.getRealJID()) { realJID = occupant.getRealJID().get(); } - roster_->addContact(jid, realJID, nick, roleToGroupName(occupant.getRole()), avatarManager_->getAvatarPath(jid).string()); + std::string group(roleToGroupName(occupant.getRole())); + roster_->addContact(jid, realJID, nick, group, avatarManager_->getAvatarPath(jid).string()); + roster_->getGroup(group)->setManualSort(roleToSortName(occupant.getRole())); chatWindow_->addSystemMessage(str(format(QT_TRANSLATE_NOOP("", "%1% is now a %2%")) % nick % roleToFriendlyName(occupant.getRole()))); } |