[Telepathy-commits] [telepathy-qt4/master] ContactManager: Fixed check on canAuthorizeContactsPresencePublication.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Thu Feb 26 15:25:47 PST 2009


Contacts in local pending can always be added, even if the Channel::groupFlags()
does not contain the flag CanAdd. So just check if the publish channel exists.
---
 TelepathyQt4/Client/contact-manager.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/TelepathyQt4/Client/contact-manager.cpp b/TelepathyQt4/Client/contact-manager.cpp
index fa9379d..2f61d45 100644
--- a/TelepathyQt4/Client/contact-manager.cpp
+++ b/TelepathyQt4/Client/contact-manager.cpp
@@ -177,7 +177,10 @@ bool ContactManager::canAuthorizeContactsPresencePublication() const
     if (mPriv->contactListsChannels.contains(ContactListChannel::TypePublish)) {
         publishChannel = mPriv->contactListsChannels[ContactListChannel::TypePublish].channel;
     }
-    return publishChannel && publishChannel->groupCanAddContacts();
+    // do not check for Channel::groupCanAddContacts as all contacts in local
+    // pending can be added, even if the Channel::groupFlags() does not contain
+    // the flag CanAdd
+    return (bool) publishChannel;
 }
 
 PendingOperation *ContactManager::authorizeContactsPresencePublication(
-- 
1.5.6.5




More information about the telepathy-commits mailing list