pidgin/pidginconversation.c

changeset 42838
010bd75895d9
parent 42826
ccaa6920d3b1
child 42885
9b0cae94f406
equal deleted inserted replaced
42837:1f1614e5468b 42838:010bd75895d9
132 * Since: 3.0 132 * Since: 3.0
133 */ 133 */
134 static void 134 static void
135 pidgin_conversation_send_message(PidginConversation *conversation) { 135 pidgin_conversation_send_message(PidginConversation *conversation) {
136 PurpleAccount *account = NULL; 136 PurpleAccount *account = NULL;
137 PurpleContactInfo *info = NULL;
137 PurpleMessage *message = NULL; 138 PurpleMessage *message = NULL;
138 GtkTextBuffer *buffer = NULL; 139 GtkTextBuffer *buffer = NULL;
139 GtkTextIter start; 140 GtkTextIter start;
140 GtkTextIter end; 141 GtkTextIter end;
141 char *contents = NULL; 142 char *contents = NULL;
148 gtk_text_buffer_get_end_iter(buffer, &end); 149 gtk_text_buffer_get_end_iter(buffer, &end);
149 150
150 contents = gtk_text_buffer_get_text(buffer, &start, &end, TRUE); 151 contents = gtk_text_buffer_get_text(buffer, &start, &end, TRUE);
151 152
152 /* Create the message. */ 153 /* Create the message. */
153 message = purple_message_new_outgoing(purple_account_get_username(account), 154 info = purple_account_get_contact_info(account);
154 contents, 0); 155 message = purple_message_new(info, contents);
155 156
156 /* Send the message and clean up. We don't worry about the callback as we 157 /* Send the message and clean up. We don't worry about the callback as we
157 * don't have anything to do in it right now. 158 * don't have anything to do in it right now.
158 */ 159 */
159 purple_conversation_send_message_async(conversation->conversation, message, 160 purple_conversation_send_message_async(conversation->conversation, message,

mercurial