I'm sending a friend / roster request using this code:
[[[XMPPController sharedObject] roster] addUser:[XMPPJID jidWithString:[user stringByAppendingString:@"@server.com"]] withNickname:nil];
and I can confirm that in the ejabberd Web Admin control panel, the request is sent. Also, the request is returned in the stream delegate method:
- (BOOL)xmppStream:(XMPPStream *)sender didReceiveIQ:(XMPPIQ *)iq
as confirmation.
I've read across multiple questions here that the request should be handled in the delegate method:
- (void)xmppStream:(XMPPStream *)sender didReceivePresence:(XMPPPresence *)presence
alternatively
- (void)xmppRoster:(XMPPRoster *)sender didReceivePresenceSubscriptionRequest:(XMPPPresence *)presence
The issue is that neither of these methods get called once a request is send.
Sending from either devices yields no success.
I can confirm that the friend request is send, because it is visible in the ejabberd admin panel. Additionally, if a user is added from the admin panel, nothing happens on the client side (The one that should receive the request, that is.).
The method - (void)xmppStream:(XMPPStream *)sender didReceivePresence:(XMPPPresence *)presence
or - (void)xmppRoster:(XMPPRoster *)sender didReceivePresenceSubscriptionRequest:(XMPPPresence *)presence
are not being called because you are not sending anyXMPPPresence
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With