aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber/iq.c
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2015-05-08 01:16:37 -0300
committerdequis <dx@dxzone.com.ar>2015-05-28 02:26:30 -0300
commit0864a524c9fd1184874d550216beb49f6a0bef55 (patch)
treea2a19d6787dd8b7b479fa43378994233aad839e1 /protocols/jabber/iq.c
parentfaeb521e66d825e68eb7f9eef8f32ddabbfd9c49 (diff)
imcb_notify_email: change parameters to take a format string
Saves some messing with g_strdup_printf for the callers, and flags/sent_at weren't used anyway. Also check if the mail_notifications setting is enabled
Diffstat (limited to 'protocols/jabber/iq.c')
-rw-r--r--protocols/jabber/iq.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/protocols/jabber/iq.c b/protocols/jabber/iq.c
index 3e1a5dfd..1a915e4a 100644
--- a/protocols/jabber/iq.c
+++ b/protocols/jabber/iq.c
@@ -809,7 +809,6 @@ xt_status jabber_iq_parse_gmail(struct im_connection *ic, struct xt_node *node,
struct xt_node *s;
char *subject = "<no subject>";
char *sender = "<no sender>";
- char *msg = NULL;
guint64 t_time;
t_time = g_ascii_strtoull(xt_find_attr(c, "date"), NULL, 10);
@@ -827,12 +826,9 @@ xt_status jabber_iq_parse_gmail(struct im_connection *ic, struct xt_node *node,
subject = s->text;
}
- msg = g_strdup_printf("New mail from %s: %s", sender, subject);
-
- imcb_notify_email(ic, set_getstr(&ic->acc->set, "notify_handle"), msg, 0, 0);
+ imcb_notify_email(ic, "New mail from %s: %s", sender, subject);
c = c->next;
- g_free(msg);
}
if (l_time && (!jd->gmail_time || l_time > jd->gmail_time)) {