Ignore:
Timestamp:
2015-05-28T05:26:24Z (9 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
faeb521
Parents:
3d31618
git-author:
Artem Savkov <artem.savkov@…> (28-03-15 01:23:42)
git-committer:
dequis <dx@…> (28-05-15 05:26:24)
Message:

Gmail notifications support through new imcb_notify_email() API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber.c

    r3d31618 rdd43c62  
    100100
    101101        s = set_add(&acc->set, "xmlconsole", "false", set_eval_bool, acc);
     102
     103        s = set_add(&acc->set, "gmail_notifications", "false", set_eval_bool, acc);
    102104        s->flags |= ACC_SET_OFFLINE_ONLY;
     105
     106        s = set_add(&acc->set, "notify_handle", NULL, NULL, acc);
     107        s->flags |= ACC_SET_OFFLINE_ONLY | SET_NULL_OK;
    103108
    104109        acc->flags |= ACC_FLAG_AWAY_MESSAGE | ACC_FLAG_STATUS_MESSAGE |
     
    259264                imcb_add_buddy(ic, JABBER_XMLCONSOLE_HANDLE, NULL);
    260265        }
     266        if (set_getbool(&acc->set, "gmail_notifications")) {
     267                jd->flags |= JFLAG_GMAILNOTIFY;
     268                if (set_getstr(&acc->set, "notify_handle")) {
     269                        imcb_add_buddy(ic, set_getstr(&acc->set, "notify_handle"), NULL);
     270                }
     271        }
    261272
    262273        jabber_generate_id_hash(jd);
     
    334345        g_free(jd->away_message);
    335346        g_free(jd->internal_jid);
     347        g_free(jd->gmail_tid);
    336348        g_free(jd->username);
    337349        g_free(jd->me);
Note: See TracChangeset for help on using the changeset viewer.