xmppanonymousejabberdrostering

How can anonymous users exchange presence information with valid users on Jabber (Ejabberd)


I am working on a social network that should allow members to chat with visitors on the site. The concept is simple.

  1. Users who have registered signup get their own account with rosters
  2. When a visitor comes to the home page of the social network, he can see some of the online members of the community
  3. Now he should be able to initiate a chat with them, by clicking on their name.

I have already got members to chat with their roster mates. My question is, how can I get an anonymous user to chat with a member and exchange presence info with him?

I have successfully managed to create anonymous accounts, members accounts and even send messages from an anonymous user to other members. But I cant get presence information from anonymous-user to member or vice versa?

BTW, the chat is JS based.


Solution

  • You're trying to break the XMPP model. Presence is an opt-in permission based system. You ask me if you can see my presence, I say yes. Generally my client will then automatically ask you if I can see your presence, and your client says yes. That's what the roster is -- yes's and no's to presence subscription requests.

    You can make chat rooms (MUC, multi user chat) that are anonymous, as well as do presence in them. It's not a roster, though. It's the closest to what you're describing without going into crazy-land with pubsub, and I don't know if you could even bend that tool far enough to have anonymous roster entries.