pidgin: 7a65a44a: Provide a custom URL per-email for gmail...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Fri Jul 3 01:30:22 EDT 2009
-----------------------------------------------------------------
Revision: 7a65a44ab2e57a47d160be267b0f41062f5c540d
Ancestor: 6377d7ec730750111305379cc4a7faec3e2437ee
Author: darkrain42 at pidgin.im
Date: 2009-07-03T05:25:41
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/7a65a44ab2e57a47d160be267b0f41062f5c540d
Modified files:
libpurple/protocols/jabber/google.c
ChangeLog:
Provide a custom URL per-email for gmail notifications, since Google gives it to us.
This doesn't actually work for me (even though the URL is correct), but I
assume that has something to do with some crazy adblock/noscript/popup blocker
extensions.
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/google.c 0afc59888472d527e3c531e061479113da6fc557
+++ libpurple/protocols/jabber/google.c 07b2f90511df11eef5eea3024bae0a49f095f35c
@@ -787,7 +787,7 @@ jabber_gmail_parse(JabberStream *js, con
{
xmlnode *child;
xmlnode *message;
- const char *to, *url;
+ const char *to, *default_url;
const char *in_str;
char *to_name;
@@ -837,16 +837,20 @@ jabber_gmail_parse(JabberStream *js, con
to = xmlnode_get_attrib(packet, "to");
to_name = jabber_get_bare_jid(to);
- url = xmlnode_get_attrib(child, "url");
- if (!url || !*url)
- url = "http://www.gmail.com";
+ default_url = xmlnode_get_attrib(child, "url");
+ if (default_url == NULL || *default_url == '\0')
+ default_url = "https://mail.google.com/mail";
message= xmlnode_get_child(child, "mail-thread-info");
for (i=0; message; message = xmlnode_get_next_twin(message), i++) {
xmlnode *sender_node, *subject_node;
- const char *from, *tid;
+ const char *from, *tid, *url;
char *subject;
+ url = xmlnode_get_attrib(message, "url");
+ if (url == NULL || *url == '\0')
+ url = default_url;
+
subject_node = xmlnode_get_child(message, "subject");
sender_node = xmlnode_get_child(message, "senders");
sender_node = xmlnode_get_child(sender_node, "sender");
More information about the Commits
mailing list