aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/purple/purple.c
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/purple/purple.c')
-rw-r--r--protocols/purple/purple.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/protocols/purple/purple.c b/protocols/purple/purple.c
index 6d8cff56..b00d3078 100644
--- a/protocols/purple/purple.c
+++ b/protocols/purple/purple.c
@@ -237,6 +237,9 @@ static void purple_init(account_t *acc)
if (pi->options & OPT_PROTO_MAIL_CHECK) {
s = set_add(&acc->set, "mail_notifications", "false", set_eval_bool, acc);
s->flags |= ACC_SET_OFFLINE_ONLY;
+
+ s = set_add(&acc->set, "mail_notifications_handle", NULL, NULL, acc);
+ s->flags |= ACC_SET_OFFLINE_ONLY | SET_NULL_OK;
}
if (strcmp(prpl->info->name, "Gadu-Gadu") == 0) {
@@ -331,6 +334,10 @@ static void purple_login(account_t *acc)
purple_sync_settings(acc, pd->account);
purple_account_set_enabled(pd->account, "BitlBee", TRUE);
+
+ if (set_getbool(&acc->set, "mail_notifications") && set_getstr(&acc->set, "mail_notifications_handle")) {
+ imcb_add_buddy(ic, set_getstr(&acc->set, "mail_notifications_handle"), NULL);
+ }
}
static void purple_logout(struct im_connection *ic)
@@ -1254,7 +1261,7 @@ static void *prplcb_notify_email(PurpleConnection *gc, const char *subject, cons
{
struct im_connection *ic = purple_ic_by_gc(gc);
- imcb_log(ic, "Received e-mail from %s for %s: %s <%s>", from, to, subject, url);
+ imcb_notify_email(ic, "Received e-mail from %s for %s: %s <%s>", from, to, subject, url);
return NULL;
}