powered by Jive Software

Packet presence, type subscribe?

Hi all,

With packetListener and packetFilter set to filter Presence packets, i’'m able to detect the “subscribe” type of the presence packet.

My question is, how at this moment, if it’‘s possible, can I send a packet to the wildfire server to change the group of the contact from who I’'ve detected subscribe presence packet?

thx for replies…

e07

When you receive a Presence Subscription from someone you wouldnt usually attempt to move them from one RosterGroup to another. For one thing you dont necessarily know whether you have subscribed to their Presence yet.

Far better to either accept or reject the subscription request when you receive one. Then when you want to subcribe to someones Presence you then choose which RosterGroup you want them to be in

Hi, thx for reply…

If I understand, my idea was not a good one…

It was just a try to manage to change user form roster group…

I will try the other way (and more simple and classic) you adviced me : using RosterGroup#addEntry() method… but in my few tries, it seems that when a contact is not in a group, and when you call RosterGroup#addEntry() method, the contact is put in the new group, but still reamains at the root of the roster…then it’'s present twice in the roster!

Can you try to reproduce my problem, and send me a code snippet if that works for you?

thx Jon

e07