changeset 5521:76ec14ba51d7

[gaim-migrate @ 5921] Yahoo uses the new mail notification. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 26 May 2003 01:46:58 +0000
parents 11be8ae32937
children a3e6a5ef49b5
files src/protocols/yahoo/yahoo.c
diffstat 1 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo.c	Mon May 26 00:52:24 2003 +0000
+++ b/src/protocols/yahoo/yahoo.c	Mon May 26 01:46:58 2003 +0000
@@ -666,6 +666,9 @@
 	int count = 0;
 	GSList *l = pkt->hash;
 
+	if (!GAIM_ACCOUNT_CHECK_MAIL(gc->account))
+		return;
+
 	while (l) {
 		struct yahoo_pair *pair = l->data;
 		if (pair->key == 9)
@@ -681,10 +684,18 @@
 
 	if (who && subj && email && *email) {
 		char *from = g_strdup_printf("%s (%s)", who, email);
-		connection_has_mail(gc, -1, from, subj, "http://mail.yahoo.com/");
+
+		gaim_notify_email(gc, subj, from, gc->username,
+						  "http://mail.yahoo.com/", NULL, NULL);
+
 		g_free(from);
-	} else if (count > 0)
-		connection_has_mail(gc, count, NULL, NULL, "http://mail.yahoo.com/");
+	} else if (count > 0) {
+		const char *to = gc->username;
+		const char *url = "http://mail.yahoo.com/";
+
+		gaim_notify_emails(gc, count, FALSE, NULL, NULL, &to, &url,
+						   NULL, NULL);
+	}
 }
 /* This is the y64 alphabet... it's like base64, but has a . and a _ */
 char base64digits[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._";