powered by Jive Software

One way roster update

Hi All,

Right now, we are trying to dynamically maintenance a roster list for a user, but the thing is every time when one entry is added into the roster list, it alwasy acknowledge another part to do the same thing. Is there a way to enable the one way roster update by using smack API?

Thanks

Hello,

I’m not sure I understand exactly what you’re asking by try looking at the Roster#setDefaultSubscriptionModel; you’ll probably want to set it to manual.

Hope that helps,

Ryan

Hi Ryan, Thanks for your response.

Here is my case: A adds B into the buddy list, then subscription plugin on openFire will catch this request and authroize it, which is perfect fine at this step. But the subscription IQ message still forwards to B and ask B to add A into it’s buddy list. Is there a way, that I can catch this IQ message on A side, and prevent to sending this IQ message message to B?

It seems I have no choice but override RosterEntry to set RosterPacket.ItemType. Is there any other easy way to do this?

Thanks in advance.

XJ

Hello,

The subscription plugin doesn’t work with IQ packets, only presence packets so I’m not sure why you’re seeing IQ packets. If you need finer grain control over what sort of packets you might want to look at the Packet Filter plugin.

Cheers,

Ryan

Ryan, thanks for your response.

I will give it a try today.

Update on this thread.

The Packet Filter plugin doesn’t work well to me (Maybe something was missing), but I create my own plugin to handle this case.

XHE,

Did you ever create a plugin to handle one way rosters? I’d be curious to hear if you did as I have a similar requirement.

Thanks,

Aaron