powered by Jive Software

Custom Presence

Hi,

i have written a plugin which accepts xml stanzas from users and routes them using wildfire’'s packetrouter.

I would like to set the presence of users to ‘‘online’’ when they send a packet to my plugin. these users are registered on that wildfire server and i would like ppl on their roster get to updates abt their presence. since i am not using a normal ClientSession, is there any way in which I can do this ?

thanks

akshat

Hey akshat,

I’‘m not sure what do you mean by: “since i am not using a normal ClientSession”. How are users connecting to the server? Your plugin should create a new Presence of type available and set the FROM to be the JID of the user you want to be available. The next step would be to do something like XMPPServer.getInstance().getPacketRouter().route() and pass the newly created presence as a parameter. Since you are handling user’‘s presences then you should also be responsible for sending an unavailable presence. But again, I don’‘t have enough info about your solution/requirements so it’'s kind of hard to be of more help.

Regards,

– Gato