[Telepathy-commits] [telepathy-salut/master] ImManager: don't support opening channel to self_handle
Will Thompson
will.thompson at collabora.co.uk
Thu Oct 23 07:30:39 PDT 2008
---
src/salut-im-manager.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/salut-im-manager.c b/src/salut-im-manager.c
index e524f27..cd54c7f 100644
--- a/src/salut-im-manager.c
+++ b/src/salut-im-manager.c
@@ -420,6 +420,14 @@ salut_im_manager_requestotron (SalutImManager *self,
if (!tp_handle_is_valid (contact_repo, handle, &error))
goto error;
+ /* Don't support opening a channel to our self handle */
+ if (handle == base_conn->self_handle)
+ {
+ g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ "Can't open a text channel to yourself");
+ goto error;
+ }
+
/* TODO: fail if there are any other properties. */
channel = g_hash_table_lookup (priv->channels, GUINT_TO_POINTER (handle));
--
1.5.6.5
More information about the Telepathy-commits
mailing list