soc.2009.telepathy: 4f86a095: Use serv_got_im() instead of purple_conv...

sttwister at soc.pidgin.im sttwister at soc.pidgin.im
Thu Jun 25 18:15:43 EDT 2009


-----------------------------------------------------------------
Revision: 4f86a0954bf09d2422fa718baea766e3829bcbeb
Ancestor: 00febdf0882aacae6de2fade5817b286ff4f0534
Author: sttwister at soc.pidgin.im
Date: 2009-06-25T16:11:13
Branch: im.pidgin.soc.2009.telepathy
URL: http://d.pidgin.im/viewmtn/revision/info/4f86a0954bf09d2422fa718baea766e3829bcbeb

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

ChangeLog: 

Use serv_got_im() instead of purple_conv_im_write()

-------------- next part --------------
============================================================
--- libpurple/protocols/telepathy/telepathy_channel_text.c	32d4445150ef43b626735b3073040d42677bf89b
+++ libpurple/protocols/telepathy/telepathy_channel_text.c	088ded9c76fda27a251afd45e0b7c373623a0afb
@@ -43,10 +43,6 @@ write_message_to_conversation (const gch
 {
 	telepathy_connection *data = user_data;
 
-	/* if a conversation was not yet establish, create a new one */
-	PurpleConversation *conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, from, data->acct);
-	PurpleConvIm *im;
-
 	/* escape HTML special characters */
 	gchar *escaped_message = g_markup_escape_text(msg, -1);
 
@@ -54,16 +50,10 @@ write_message_to_conversation (const gch
 	gchar *final_message = purple_strdup_withhtml(escaped_message);
 	g_free(escaped_message);
 
-	if (conv == NULL)
-	{
-	    conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, data->acct, from);
-	}
-	im = purple_conversation_get_im_data(conv);
-
 	purple_debug_info("telepathy", "Contact %s says \"%s\" (escaped: \"%s\")\n", from, msg, final_message);
 
 	/* transmit the message to the UI */
-	purple_conv_im_write(im, from, final_message, 0, timestamp);
+	serv_got_im(data->gc, from, final_message, PURPLE_MESSAGE_RECV, timestamp);
 
 	g_free(final_message);
 }


More information about the Commits mailing list