diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-09-05 16:22:36 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-09-05 16:22:36 +0200 |
| commit | 2cd20e5ce1c9cfd9986b33af624023868d54a79d (patch) | |
| tree | 2da13c47f05ab18f375db01955fa575bd94b9a96 /src/client | |
| parent | 1cd1192af7f660baf9b86524abf0b6c7204341c2 (diff) | |
| download | qxmpp-2cd20e5ce1c9cfd9986b33af624023868d54a79d.tar.gz | |
Add QXmppMucRoom::participantFullJid() to lookup an occupant full JID.
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/QXmppMucManager.cpp | 15 | ||||
| -rw-r--r-- | src/client/QXmppMucManager.h | 1 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/client/QXmppMucManager.cpp b/src/client/QXmppMucManager.cpp index 5b006af2..828b7e46 100644 --- a/src/client/QXmppMucManager.cpp +++ b/src/client/QXmppMucManager.cpp @@ -304,8 +304,7 @@ bool QXmppMucRoom::join() /// Kicks the specified user from the chat room. /// -/// \param jid -/// \param reason +/// The specified \a jid is the Occupant JID of the form "room@service/nick". /// /// \return true if the request was sent, false otherwise @@ -405,6 +404,18 @@ void QXmppMucRoom::setNickName(const QString &nickName) } } +/// Returns the "Full JID" of the given participant. +/// +/// The specified \a jid is the Occupant JID of the form "room@service/nick". + +QString QXmppMucRoom::participantFullJid(const QString &jid) const +{ + if (d->participants.contains(jid)) + return d->participants.value(jid).mucItem().jid(); + else + return QString(); +} + /// Returns the presence for the given participant. /// /// \param jid diff --git a/src/client/QXmppMucManager.h b/src/client/QXmppMucManager.h index 77760b1f..d24a780e 100644 --- a/src/client/QXmppMucManager.h +++ b/src/client/QXmppMucManager.h @@ -130,6 +130,7 @@ public: QString nickName() const; void setNickName(const QString &nickName); + Q_INVOKABLE QString participantFullJid(const QString &jid) const; QXmppPresence participantPresence(const QString &jid) const; QStringList participants() const; |
