Exemple #1
0
 socket.on('response', function(data) {
     if (data.accept) {
         xmpp.acceptSubscription(data.contact);
     }
     socket.emit("add-contact", {
         name: data.contact
     });
 });
Exemple #2
0
xmpp.on('subscribe', function(from) {
if (from && config.acceptedUsers.indexOf(from) >= 0) {
    	xmpp.acceptSubscription(from);
    }
});
 xmpp.on('subscribe', function(from) {
     xmpp.acceptSubscription(from);
 });
Exemple #4
0
 xmpp.on('subscribe', function(from) {
     xmpp.acceptSubscription(from);
     console.log(toUTCDateTimeString(new Date()) + ':accept subscribe from:' + from);
     controller.trigger('subscribe', [bot, from]);
 });