Mercurial > pidgin
diff src/protocols/msn/notification.c @ 7817:954b986ad3e3
[gaim-migrate @ 8464]
Email parsing changes from Felipe Contreras (revo):
Currently only MSN send email notifications with MIME
fields, so, only decode MIME fields in MSN.
This makes me feel warm.
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Tue, 09 Dec 2003 01:55:15 +0000 |
| parents | 04f9c750657f |
| children | 8e60ddc28a22 |
line wrap: on
line diff
--- a/src/protocols/msn/notification.c Tue Dec 09 01:20:36 2003 +0000 +++ b/src/protocols/msn/notification.c Tue Dec 09 01:55:15 2003 +0000 @@ -2053,7 +2053,7 @@ MsnSession *session = servconn->session; GaimConnection *gc = session->account->gc; GHashTable *table; - const char *from, *subject; + char *from, *subject; if (strcmp(servconn->msg_passport, "Hotmail")) { /* This isn't an official message. */ @@ -2073,12 +2073,15 @@ table = msn_message_get_hashtable_from_body(msg); - from = g_hash_table_lookup(table, "From"); - subject = g_hash_table_lookup(table, "Subject"); + from = gaim_mime_decode_field(g_hash_table_lookup(table, "From")); + subject = gaim_mime_decode_field(g_hash_table_lookup(table, "Subject")); gaim_notify_email(gc, subject, from, msn_user_get_passport(session->user), session->passport_info.file, NULL, NULL); + g_free(from); + g_free(subject); + g_hash_table_destroy(table); return TRUE;
