Mercurial > pidgin.yaz
diff src/protocols/simple/simple.c @ 12216:4d3119205a33
[gaim-migrate @ 14518]
Remove GaimConvImFlags and GaimConvChatFlags - use GaimMessageFlags
everywhere instead.
Add a new GAIM_MESSAGE_IMAGES flag, and set it when sending a message
containing images.
When sending a message, the core will now always send "html" to the prpls,
just like it expects to receive html from the prpls for received messages.
This will allow text prpls such as SILC to support IM images and differentiate
them from user input. Previously gaim_unescape_html() was used before passing
the message to the prpl, now the prpl does this itself if it needs it.
I think I updated all the prpls correctly, but I'm not so sure about sametime.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Thu, 24 Nov 2005 20:47:46 +0000 |
parents | 2f379ed0c26b |
children | cfc808463763 |
line wrap: on
line diff
--- a/src/protocols/simple/simple.c Thu Nov 24 20:38:24 2005 +0000 +++ b/src/protocols/simple/simple.c Thu Nov 24 20:47:46 2005 +0000 @@ -494,14 +494,15 @@ static void send_sip_request(GaimConnection *gc, gchar *method, gchar *url, gchar *to, gchar *addheaders, gchar *body, struct sip_dialog *dialog, TransCallback tc) { struct simple_account_data *sip = gc->proto_data; char *callid= dialog ? g_strdup(dialog->callid) : gencallid(); + char *auth=""; + char *addh=""; + gchar *branch = genbranch(); + char *buf; + if(!strcmp(method,"REGISTER")) { if(sip->regcallid) callid = g_strdup(sip->regcallid); else sip->regcallid = g_strdup(callid); } - char *auth=""; - char *addh=""; - gchar *branch = genbranch(); - char *buf; if(addheaders) addh=addheaders; if(sip->registrar.type && !strcmp(method,"REGISTER")) { @@ -713,10 +714,10 @@ g_free(hdr); } -static int simple_im_send(GaimConnection *gc, const char *who, const char *what, GaimConvImFlags flags) { +static int simple_im_send(GaimConnection *gc, const char *who, const char *what, GaimMessageFlags flags) { struct simple_account_data *sip = gc->proto_data; char *to = g_strdup(who); - char *text = g_strdup(what); + char *text = gaim_unescape_html(what); simple_send_message(sip, to, text, NULL); g_free(to); g_free(text);