diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-10-28 14:16:04 +0100 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-10-28 18:46:32 +0100 |
commit | a93f43a6ff1dce06ca0367ad8d8e4fa60b080220 (patch) | |
tree | 6ab173d0e4a07838475a115f415f58d1de0a59ee /src/ft-manager.c | |
parent | da7d8af161a632ab032aa37a29c71aa801016e17 (diff) | |
download | telepathy-salut-a93f43a6ff1dce06ca0367ad8d8e4fa60b080220.tar.gz |
ft-manager: fail to create channel if the contact doesn't have the right caps
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'src/ft-manager.c')
-rw-r--r-- | src/ft-manager.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ft-manager.c b/src/ft-manager.c index 57781909..480eab51 100644 --- a/src/ft-manager.c +++ b/src/ft-manager.c @@ -425,6 +425,19 @@ salut_ft_manager_handle_request (TpChannelManager *manager, goto error; } + if (service_name != NULL || metadata != NULL) + { + if (!gabble_capability_set_has (contact->caps, NS_TP_FT_METADATA)) + { + g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_CAPABLE, + "The specified contact does not support the " + "Metadata extension; you should ensure both ServiceName and " + "Metadata properties are not present in the channel " + "request"); + goto error; + } + } + DEBUG ("Requested outgoing channel with contact: %s", tp_handle_inspect (contact_repo, handle)); |