soc.2009.telepathy: 230a1e3c: Pass an optional message along with the ...

sttwister at soc.pidgin.im sttwister at soc.pidgin.im
Wed Jul 15 08:10:52 EDT 2009


-----------------------------------------------------------------
Revision: 230a1e3c78497ff93f3d1f181255e2a33705560f
Ancestor: e7b69f9a618f67ed09b9f10c1528bbd35636c1f6
Author: sttwister at soc.pidgin.im
Date: 2009-07-15T12:09:07
Branch: im.pidgin.soc.2009.telepathy
URL: http://d.pidgin.im/viewmtn/revision/info/230a1e3c78497ff93f3d1f181255e2a33705560f

Modified files:
        libpurple/protocols/telepathy/telepathy_channel_text.c

ChangeLog: 

Pass an optional message along with the invitation

-------------- next part --------------
============================================================
--- libpurple/protocols/telepathy/telepathy_channel_text.c	ff45dcfcec60d351fa7c5bddf43108418a2afdd8
+++ libpurple/protocols/telepathy/telepathy_channel_text.c	8165efb01127ec026e125676d5d60cb25484910e
@@ -606,6 +606,10 @@ handle_room_text_channel (TpChannel *cha
 	{
 		gchar *initiator_id = (gchar *)tp_asv_get_string(properties,
 				TP_IFACE_CHANNEL ".InitiatorID");
+		
+		TpHandle actor;
+		TpChannelGroupChangeReason reason;
+		const gchar *message;
 
 		/* Create a hash table for prompting the user */
 		GHashTable *chat_data = g_hash_table_new(g_str_hash, g_str_equal);
@@ -620,6 +624,10 @@ handle_room_text_channel (TpChannel *cha
 		tp_channel->connection_data = data;
 		tp_channel->self_handle = tp_channel_group_get_self_handle(channel);
 
+		/* Get details about the invitation like message */
+		tp_channel_group_get_local_pending_info(channel, tp_channel->self_handle,
+				&actor, &reason, &message);
+
 		g_hash_table_insert(data->room_Channels, (gpointer)handle, tp_channel);
 
 		/* Fill in the actual information */
@@ -629,7 +637,7 @@ handle_room_text_channel (TpChannel *cha
 		/* Prompt the user. Depending on his action, telepathy_join_chat() or
 		 * telepathy_reject_chat() will be called along with the hash table
 		 */
-		serv_got_chat_invite(data->gc, who, initiator_id, NULL, chat_data);
+		serv_got_chat_invite(data->gc, who, initiator_id, message, chat_data);
 
 		/* Return to wait for user input. If he accepts the invitation, this function
 		 * will be called again with the invitation flag set.


More information about the Commits mailing list