From 2cd20e5ce1c9cfd9986b33af624023868d54a79d Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Wed, 5 Sep 2012 16:22:36 +0200 Subject: Add QXmppMucRoom::participantFullJid() to lookup an occupant full JID. --- src/client/QXmppMucManager.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/client/QXmppMucManager.cpp') 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 -- cgit v1.2.3