mcabber/src/jabglue.c
changeset 125 1bf1a1233b88
parent 124 6d2122c003c4
child 154 8630b7cae87b
equal deleted inserted replaced
124:6d2122c003c4 125:1bf1a1233b88
   291 
   291 
   292   // We don't check if the jabber user already exists in the roster,
   292   // We don't check if the jabber user already exists in the roster,
   293   // because it allows to re-ask for notification.
   293   // because it allows to re-ask for notification.
   294 
   294 
   295   //x = jutil_presnew(JPACKET__SUBSCRIBE, jid, NULL);
   295   //x = jutil_presnew(JPACKET__SUBSCRIBE, jid, NULL);
   296   x = jutil_presnew(JPACKET__SUBSCRIBE, jid, "online");
   296   x = jutil_presnew(JPACKET__SUBSCRIBE, (char*)jid, "online");
   297   jab_send(jc, x);
   297   jab_send(jc, x);
   298   xmlnode_free(x);
   298   xmlnode_free(x);
   299 
   299 
   300   x = jutil_iqnew(JPACKET__SET, NS_ROSTER);
   300   x = jutil_iqnew(JPACKET__SET, NS_ROSTER);
   301   y = xmlnode_get_tag(x, "query");
   301   y = xmlnode_get_tag(x, "query");
   729           free(r);
   729           free(r);
   730           scr_LogPrint("isagent=%d", isagent); // XXX DBG
   730           scr_LogPrint("isagent=%d", isagent); // XXX DBG
   731           if (!isagent) {
   731           if (!isagent) {
   732             scr_LogPrint("<%s> wants to subscribe "
   732             scr_LogPrint("<%s> wants to subscribe "
   733                          "to your network presence updates", from);
   733                          "to your network presence updates", from);
       
   734             // FIXME we accept everybody...
       
   735             x = jutil_presnew(JPACKET__SUBSCRIBED, from, 0);
       
   736             jab_send(jc, x);
       
   737             xmlnode_free(x);
   734           } else {
   738           } else {
   735             x = jutil_presnew(JPACKET__SUBSCRIBED, from, 0);
   739             x = jutil_presnew(JPACKET__SUBSCRIBED, from, 0);
   736             jab_send(jc, x);
   740             jab_send(jc, x);
   737             xmlnode_free(x);
   741             xmlnode_free(x);
   738           }
   742           }