- (void)connection: (XMPPConnection*)conn
didReceivePresence: (XMPPPresence*)pres
{
- of_log(@"Presence: %@", pres);
+ if ([pres.type isEqual: @"subscribe"]) {
+ XMPPPresence *answer;
+ answer = [XMPPPresence presenceWithType: @"subscribed"
+ ID: pres.ID];
+ answer.to = [XMPPJID JIDWithString: [pres.from bareJID]];
+ [conn sendStanza: answer];
+ }
}
- (void)connectionWasClosed: (XMPPConnection*)conn