Adding roster item with both subscription type

229 views
Skip to first unread message

Tolga Tanrıverdi

unread,
Feb 14, 2012, 4:46:53 AM2/14/12
to XMPPFramework
Hello I want to add a roster item to the roster list with
subscription=both
For example as a regular xmpp flow first I have to ask to receiving
user if they accept presence or not then I can add it with both
subscription type
However what I want to accomplish here when I try to add a roster item
(a friend) to my roster list I don't want it to ask to receiving user
I want it to be automatically added and have the subscription type
both
For accomplishing that I've installed subscription plugin to openfire
and set it to accept all subscriptions
But I don't know how can I do it with xmpp framework

I've tried

[self.xmppRoster addUser:newRosterJid withNickname:contact.fullName];


but it didn't work it only added the roster item but it's subscription
type is none how can I make it's type=both automatically

Thanks
Tolga

Robbie Hanson

unread,
Feb 16, 2012, 8:22:39 PM2/16/12
to xmppfr...@googlegroups.com
As you know, this will have to be supported on the server, generally with a custom module, plugin, or config change. The client should request subscription as usual, and in response the server should automatically set subscription to both, and return that result via the normal roster push mechanism. If the server is coded properly, there should be zero work required on the client side.

Simply put, the client side is just reporting what the server tells it. So make sure the server is telling the client the right things.

-Robbie Hanson

> --
> You received this message because you are subscribed to the Google Groups "XMPPFramework" group.
> To post to this group, send email to xmppfr...@googlegroups.com.
> To unsubscribe from this group, send email to xmppframewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/xmppframework?hl=en.
>

Reply all
Reply to author
Forward
0 new messages