telepathy-qt: Don' t require TargetHandleType and TargetHandle to be present in requests

David Edmundson davidedmundson at kemper.freedesktop.org
Tue Mar 24 08:39:38 PDT 2015


Module: telepathy-qt
Branch: master
Commit: b9799ef6f93b13f4df7c2a9e65edcc6bf010d7ef
URL:    http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=b9799ef6f93b13f4df7c2a9e65edcc6bf010d7ef

Author: Martin Klapetek <mklapetek at kde.org>
Date:   Tue Mar 24 16:01:26 2015 +0100

Don't require TargetHandleType and TargetHandle to be present in requests

The specification says that only ChannelType MUST be set. If the rest
makes no sense, the request should be rejected by the CM rather than
here.

This for example breaks group chats which have no TargetHandle or
TargetHandleType.

Reviewed-by: David Edmundson

---

 TelepathyQt/base-connection.cpp |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/TelepathyQt/base-connection.cpp b/TelepathyQt/base-connection.cpp
index d71f34e..375379a 100644
--- a/TelepathyQt/base-connection.cpp
+++ b/TelepathyQt/base-connection.cpp
@@ -801,9 +801,7 @@ void BaseConnectionRequestsInterface::createChannel(const QVariantMap &request,
         QDBusObjectPath &objectPath,
         QVariantMap &details, DBusError *error)
 {
-    if (!request.contains(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"))
-            || !request.contains(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"))
-            || !request.contains(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle"))) {
+    if (!request.contains(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"))) {
         error->set(TP_QT_ERROR_INVALID_ARGUMENT, QLatin1String("Missing parameters"));
         return;
     }



More information about the telepathy-commits mailing list