Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
jcmag #1
Member since Jan 2007 · 9 posts
Group memberships: Members
Show profile · Link to this post
Subject: send message to online users only
I've developed a bot that sends periodically messages to users ; but I want to send messages only if users are online. Is there a way to test that? (for the moment I just use the SendMessage method with the user accounts of my users)

btw it seems I can send messages to anyone, even people who didn't subscribe to the bot, is it normal?
Avatar
Alex #2
Member since Feb 2003 · 4328 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
subscribe to the OnPresence handler to see who of your contacts is online. Then you can add a logic to your client which is sending the messages only to online users. To get the presence of a user it must be on your contact list and subscribed of course.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS