[telepathy-qt4/master] Channel: Use Connection::selfHandle while trying to fake a group interface instead of Connection::selfContact.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Thu May 28 14:14:14 PDT 2009


Use Connection::selfHandle while trying to fake a group interface instead
of Connection::selfContact, this allows us to work even on connections where
FeatureSelfContact was not requested.
---
 TelepathyQt4/channel.cpp |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/TelepathyQt4/channel.cpp b/TelepathyQt4/channel.cpp
index 9241d8f..5ffa6dd 100644
--- a/TelepathyQt4/channel.cpp
+++ b/TelepathyQt4/channel.cpp
@@ -871,9 +871,10 @@ bool Channel::Private::fakeGroupInterfaceIfNeeded()
     }
 
     // fake group interface
-    if (connection->selfContact() && targetHandle) {
+    if (connection->selfHandle() && targetHandle) {
         // Fake groupSelfHandle and initial members, let the MCD handling take care of the rest
-        groupSelfHandle = connection->selfContact()->handle()[0];
+        // TODO connect to Connection::selfHandleChanged
+        groupSelfHandle = connection->selfHandle();
         groupInitialMembers = UIntList() << groupSelfHandle << targetHandle;
 
         debug().nospace() << "Faking a group on channel with self handle=" <<
@@ -881,7 +882,7 @@ bool Channel::Private::fakeGroupInterfaceIfNeeded()
 
         nowHaveInitialMembers();
     } else {
-        warning() << "Connection::selfContact returned a null contact or targetHandle is 0, "
+        warning() << "Connection::selfHandle is 0 or targetHandle is 0, "
             "not faking a group on channel";
     }
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list