comparison libpurple/protocols/jabber/message.c @ 32692:0f94ec89f0bc

merged from im.pidgin.pidgin
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Mon, 26 Sep 2011 14:57:21 +0900
parents 7281d151e492 afdbf45fa861
children
comparison
equal deleted inserted replaced
32438:55e678325bda 32692:0f94ec89f0bc
640 } 640 }
641 641
642 /* process any newly provided smileys */ 642 /* process any newly provided smileys */
643 jabber_message_add_remote_smileys(js, to, packet); 643 jabber_message_add_remote_smileys(js, to, packet);
644 } 644 }
645
646 xmlnode_strip_prefixes(child);
645 647
646 /* reformat xhtml so that img tags with a "cid:" src gets 648 /* reformat xhtml so that img tags with a "cid:" src gets
647 translated to the bare text of the emoticon (the "alt" attrib) */ 649 translated to the bare text of the emoticon (the "alt" attrib) */
648 /* this is done also when custom smiley retrieval is turned off, 650 /* this is done also when custom smiley retrieval is turned off,
649 this way the receiver always sees the shortcut instead */ 651 this way the receiver always sees the shortcut instead */
1153 "\tmsg='%s'\n", who, msg); 1155 "\tmsg='%s'\n", who, msg);
1154 } 1156 }
1155 1157
1156 resource = jabber_get_resource(who); 1158 resource = jabber_get_resource(who);
1157 1159
1158 jb = jabber_buddy_find(gc->proto_data, who, TRUE); 1160 jb = jabber_buddy_find(purple_connection_get_protocol_data(gc), who, TRUE);
1159 jbr = jabber_buddy_find_resource(jb, resource); 1161 jbr = jabber_buddy_find_resource(jb, resource);
1160 1162
1161 g_free(resource); 1163 g_free(resource);
1162 1164
1163 jm = g_new0(JabberMessage, 1); 1165 jm = g_new0(JabberMessage, 1);
1164 jm->js = gc->proto_data; 1166 jm->js = purple_connection_get_protocol_data(gc);
1165 jm->type = JABBER_MESSAGE_CHAT; 1167 jm->type = JABBER_MESSAGE_CHAT;
1166 jm->chat_state = JM_STATE_ACTIVE; 1168 jm->chat_state = JM_STATE_ACTIVE;
1167 jm->to = g_strdup(who); 1169 jm->to = g_strdup(who);
1168 jm->id = jabber_get_next_id(jm->js); 1170 jm->id = jabber_get_next_id(jm->js);
1169 1171
1216 char *tmp; 1218 char *tmp;
1217 1219
1218 if(!msg || !gc) 1220 if(!msg || !gc)
1219 return 0; 1221 return 0;
1220 1222
1221 js = gc->proto_data; 1223 js = purple_connection_get_protocol_data(gc);
1222 chat = jabber_chat_find_by_id(js, id); 1224 chat = jabber_chat_find_by_id(js, id);
1223 1225
1224 if(!chat) 1226 if(!chat)
1225 return 0; 1227 return 0;
1226 1228
1227 jm = g_new0(JabberMessage, 1); 1229 jm = g_new0(JabberMessage, 1);
1228 jm->js = gc->proto_data; 1230 jm->js = purple_connection_get_protocol_data(gc);
1229 jm->type = JABBER_MESSAGE_GROUPCHAT; 1231 jm->type = JABBER_MESSAGE_GROUPCHAT;
1230 jm->to = g_strdup_printf("%s@%s", chat->room, chat->server); 1232 jm->to = g_strdup_printf("%s@%s", chat->room, chat->server);
1231 jm->id = jabber_get_next_id(jm->js); 1233 jm->id = jabber_get_next_id(jm->js);
1232 1234
1233 tmp = purple_utf8_strip_unprintables(msg); 1235 tmp = purple_utf8_strip_unprintables(msg);