summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-07 11:58:34 (GMT)
committerSwift Review <review@swift.im>2014-10-17 18:18:54 (GMT)
commit1722d220533a78e8b2acbcd571631960656e78f8 (patch)
tree4da1095da990626652774962bab8a1c8db9ff2ea /Swiften/MUC/MUCImpl.h
parent0e7940bf2ede0147ee1eafced53bc9ad08a4015e (diff)
downloadswift-1722d220533a78e8b2acbcd571631960656e78f8.zip
swift-1722d220533a78e8b2acbcd571631960656e78f8.tar.bz2
Implement support for displaying nickname changes.
This implements Swiften API for changing nicknames in MUC and correctly detecting nick name changes. In addition Swift now displays nickname changes as such and not as join/leave of a user. In addition, handling of nickname changes is integrated in ChatsManager and ChatControllers so that they are forwarded to PM chats of MUCs. Test-Information: Added unit tests for change of own nickname and nickname changes of others. Tested correct detection of nickname changes in a MUC with a Psi user changing its nickname and Swift correctly detecting and displaying it. Change-Id: I3287ba6ceeccd3be5cfb591acd6f88bffc9a43b2
Diffstat (limited to 'Swiften/MUC/MUCImpl.h')
-rw-r--r--Swiften/MUC/MUCImpl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Swiften/MUC/MUCImpl.h b/Swiften/MUC/MUCImpl.h
index 846ddcf..8eabb80 100644
--- a/Swiften/MUC/MUCImpl.h
+++ b/Swiften/MUC/MUCImpl.h
@@ -58,6 +58,12 @@ namespace Swift {
/*virtual void queryRoomItems(); */
/*virtual std::string getCurrentNick(); */
virtual std::map<std::string, MUCOccupant> getOccupants() const;
+
+ /**
+ * Send a new presence to the MUC indicating a nickname change. Any custom status the user had in the is cleared.
+ * @param newNickname The nickname to change to.
+ */
+ virtual void changeNickname(const std::string& newNickname);
virtual void part();
/*virtual void handleIncomingMessage(Message::ref message); */
/** Expose public so it can be called when e.g. user goes offline */