Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
7816:061b39119a1b | 7817:954b986ad3e3 |
---|---|
2051 email_msg(MsnServConn *servconn, MsnMessage *msg) | 2051 email_msg(MsnServConn *servconn, MsnMessage *msg) |
2052 { | 2052 { |
2053 MsnSession *session = servconn->session; | 2053 MsnSession *session = servconn->session; |
2054 GaimConnection *gc = session->account->gc; | 2054 GaimConnection *gc = session->account->gc; |
2055 GHashTable *table; | 2055 GHashTable *table; |
2056 const char *from, *subject; | 2056 char *from, *subject; |
2057 | 2057 |
2058 if (strcmp(servconn->msg_passport, "Hotmail")) { | 2058 if (strcmp(servconn->msg_passport, "Hotmail")) { |
2059 /* This isn't an official message. */ | 2059 /* This isn't an official message. */ |
2060 return TRUE; | 2060 return TRUE; |
2061 } | 2061 } |
2071 return TRUE; | 2071 return TRUE; |
2072 } | 2072 } |
2073 | 2073 |
2074 table = msn_message_get_hashtable_from_body(msg); | 2074 table = msn_message_get_hashtable_from_body(msg); |
2075 | 2075 |
2076 from = g_hash_table_lookup(table, "From"); | 2076 from = gaim_mime_decode_field(g_hash_table_lookup(table, "From")); |
2077 subject = g_hash_table_lookup(table, "Subject"); | 2077 subject = gaim_mime_decode_field(g_hash_table_lookup(table, "Subject")); |
2078 | 2078 |
2079 gaim_notify_email(gc, subject, from, msn_user_get_passport(session->user), | 2079 gaim_notify_email(gc, subject, from, msn_user_get_passport(session->user), |
2080 session->passport_info.file, NULL, NULL); | 2080 session->passport_info.file, NULL, NULL); |
2081 | |
2082 g_free(from); | |
2083 g_free(subject); | |
2081 | 2084 |
2082 g_hash_table_destroy(table); | 2085 g_hash_table_destroy(table); |
2083 | 2086 |
2084 return TRUE; | 2087 return TRUE; |
2085 } | 2088 } |