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/JID
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/JID')
-rw-r--r--Swiften/JID/JID.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Swiften/JID/JID.h b/Swiften/JID/JID.h
index 126a7b1..aefd3df 100644
--- a/Swiften/JID/JID.h
+++ b/Swiften/JID/JID.h
@@ -134,6 +134,14 @@ namespace Swift {
return result;
}
+ /**
+ * Get the full JID with the supplied resource.
+ */
+ JID withResource(const std::string& resource) const {
+ JID result(this->getNode(), this->getDomain(), resource);
+ return result;
+ }
+
std::string toString() const;
bool equals(const JID& o, CompareType compareType) const {