The easiest way is to have your client direct a presence packet at your component:
<presence to='component.example.com'/> When it wants to start using the service, and an unavailable when it wants to stop: <presence type='unavailable' to='component.example.com'/> If the client logs out or is disconnected, JSM will send the unavailable to the component automatically. -- Joe Hildebrand > -----Original Message----- > From: Wojtek [mailto:[EMAIL PROTECTED] > Sent: Monday, March 22, 2004 6:14 AM > To: [EMAIL PROTECTED] > Subject: [jdev] Server component and user presence > > Hi, > > > I want my component behaviour to depend on user presence. > > If user sends some <iq-1/> request to the component it starts > sending some messages (events) to the user (with respect to > user's resource). But if user's resource becomes > unavailable, offline or sends another <iq-2/> request the > service should stop sending messages until it gets an <iq-1/> > request again. > > (Offline messages should still work for comunication between > users.) > > How can I check user's presence in my component? > How is it done in transports (ICQ, ...) for example? > > <bcc/> tag of <jsm/> configuration section causes a flood of > all users presence. I don't like it. > > > Thanks in advance > > > Wojtek > > _______________________________________________ > jdev mailing list > [EMAIL PROTECTED] > https://jabberstudio.org/mailman/listinfo/jdev > _______________________________________________ jdev mailing list [EMAIL PROTECTED] https://jabberstudio.org/mailman/listinfo/jdev
