powered by Jive Software

How do you associate custom data with each user of a chat room?

Still relatively new here to XMPP so forgive me if I ask a newb question:

What is the correct way to associate custom data with each user of a chatroom? (ie photo, etc)

Currently I am setting up a connection, logging the current user in, “trying” to set that user’s presence with custom data, and then joining a room.

I say “trying” above on setting the user’s presence because that presence doesn’t seem to be carried over to the room when the room broadcasts its PRESENCE event.

I’ve figured out how to add an extension to a presence and broadcast that after a user joins a room which updates everyone to the new user’s data, but the issue I’m running into is that that new user doesn’t know about all of the users’ custom presence data already in the room because the presence is generic.

Please tell me if I’m missing something key here too and am just going about this in a completely wrong way.

Thanks.

Ok… I think I answered my own question.

The room’s join method allows you to pass extensions into it… sweet.

If anyone wants to still add anything, please do… this is still a learning experience for me.

Mark

I am trying to do something similar…Can you share your code on how to pass the custom data ?

Thanks

Hi Mark,

I am “trying” to build a way to update user presence through a drop down menu, which now works great - I’m using flash cs3, not flex. I can see the presence changing from the admin panel on the server, but no luck inside the chat room itself.

Did you figure out how to use joinPresenceExtensions in the join method in Room.as ?

It would be great if we could discuss this here and finally come up with a solution for everyone.

Regards

Hey guys,

Sorry for the delayed response.

I ended up writing a blog post about it. Check it out:

http://yourpalmark.com/2009/07/30/writing-xiff-extensions-to-pass-custom-data-ov er-xmpp/