Mercurial > pidgin
comparison libpurple/protocols/jabber/message.c @ 32819:2c6510167895 default tip
propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24)
to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 02 Jun 2012 02:30:49 +0000 |
parents | afdbf45fa861 |
children |
comparison
equal
deleted
inserted
replaced
32818:01ff09d4a463 | 32819:2c6510167895 |
---|---|
635 } | 635 } |
636 | 636 |
637 /* process any newly provided smileys */ | 637 /* process any newly provided smileys */ |
638 jabber_message_add_remote_smileys(js, to, packet); | 638 jabber_message_add_remote_smileys(js, to, packet); |
639 } | 639 } |
640 | |
641 xmlnode_strip_prefixes(child); | |
640 | 642 |
641 /* reformat xhtml so that img tags with a "cid:" src gets | 643 /* reformat xhtml so that img tags with a "cid:" src gets |
642 translated to the bare text of the emoticon (the "alt" attrib) */ | 644 translated to the bare text of the emoticon (the "alt" attrib) */ |
643 /* this is done also when custom smiley retrieval is turned off, | 645 /* this is done also when custom smiley retrieval is turned off, |
644 this way the receiver always sees the shortcut instead */ | 646 this way the receiver always sees the shortcut instead */ |
1146 "\tmsg='%s'\n", who, msg); | 1148 "\tmsg='%s'\n", who, msg); |
1147 } | 1149 } |
1148 | 1150 |
1149 resource = jabber_get_resource(who); | 1151 resource = jabber_get_resource(who); |
1150 | 1152 |
1151 jb = jabber_buddy_find(gc->proto_data, who, TRUE); | 1153 jb = jabber_buddy_find(purple_connection_get_protocol_data(gc), who, TRUE); |
1152 jbr = jabber_buddy_find_resource(jb, resource); | 1154 jbr = jabber_buddy_find_resource(jb, resource); |
1153 | 1155 |
1154 g_free(resource); | 1156 g_free(resource); |
1155 | 1157 |
1156 jm = g_new0(JabberMessage, 1); | 1158 jm = g_new0(JabberMessage, 1); |
1157 jm->js = gc->proto_data; | 1159 jm->js = purple_connection_get_protocol_data(gc); |
1158 jm->type = JABBER_MESSAGE_CHAT; | 1160 jm->type = JABBER_MESSAGE_CHAT; |
1159 jm->chat_state = JM_STATE_ACTIVE; | 1161 jm->chat_state = JM_STATE_ACTIVE; |
1160 jm->to = g_strdup(who); | 1162 jm->to = g_strdup(who); |
1161 jm->id = jabber_get_next_id(jm->js); | 1163 jm->id = jabber_get_next_id(jm->js); |
1162 | 1164 |
1209 char *tmp; | 1211 char *tmp; |
1210 | 1212 |
1211 if(!msg || !gc) | 1213 if(!msg || !gc) |
1212 return 0; | 1214 return 0; |
1213 | 1215 |
1214 js = gc->proto_data; | 1216 js = purple_connection_get_protocol_data(gc); |
1215 chat = jabber_chat_find_by_id(js, id); | 1217 chat = jabber_chat_find_by_id(js, id); |
1216 | 1218 |
1217 if(!chat) | 1219 if(!chat) |
1218 return 0; | 1220 return 0; |
1219 | 1221 |
1220 jm = g_new0(JabberMessage, 1); | 1222 jm = g_new0(JabberMessage, 1); |
1221 jm->js = gc->proto_data; | 1223 jm->js = purple_connection_get_protocol_data(gc); |
1222 jm->type = JABBER_MESSAGE_GROUPCHAT; | 1224 jm->type = JABBER_MESSAGE_GROUPCHAT; |
1223 jm->to = g_strdup_printf("%s@%s", chat->room, chat->server); | 1225 jm->to = g_strdup_printf("%s@%s", chat->room, chat->server); |
1224 jm->id = jabber_get_next_id(jm->js); | 1226 jm->id = jabber_get_next_id(jm->js); |
1225 | 1227 |
1226 tmp = purple_utf8_strip_unprintables(msg); | 1228 tmp = purple_utf8_strip_unprintables(msg); |