Subject: Automatically subscribe
I'm trying to figure out how to make a user automatically subscribe to a user who subscribes to them. ie. User 1 subscribes to User 2, so User 2 automatically subscribes to User 1.
Putting the subscribe command in the presence event of type subscribe or subscribed obviously makes an infinite loop. Putting it in the rosteritem event works, but it seems this event is called multiple times for one subscription (I'm not sure why this is), causing undue traffic.
If there was some way to see if I was already subscribed to someone, it would be pretty easy...but I don't see how to do that either. Does anyone have any ideas?
Putting the subscribe command in the presence event of type subscribe or subscribed obviously makes an infinite loop. Putting it in the rosteritem event works, but it seems this event is called multiple times for one subscription (I'm not sure why this is), causing undue traffic.
If there was some way to see if I was already subscribed to someone, it would be pretty easy...but I don't see how to do that either. Does anyone have any ideas?