powered by Jive Software

How to add Avatar for a MUC Room

Hello every one,

I have a big issue regarding setting Room Avatar.

so any one have solution of it.

Thanks in advanced.

AFAIK, there’s no specification in XMPP for that. Consequently, there’s also nothing in Smack.

I had a similar issue, where I wanted to set icons for roster groups.

The solution was to store the image data (or path only) in the Private XML Storage and retrieve the data from there after the roster has been loaded.

For MUC rooms, it’s certainly another issue, because probably you cannot use Private XML Storage because MUC rooms are often public and shared.

Maybe you can store the image data in a pubsub service node, similar how XEP-0084: User Avatar works.

But things are probably getting complicated, since each MUC occupant needs to subscribe to the pubsub MUC node to get avatar data (and updates).

1 Like

Hey Thanks for you reply.

Need little more help from you.

can you please describe how to set pubsub and retrive?.

Thanks in advance.

Sorry, I’ve never worked with PubSub. The only help I could give is this link:

http://www.igniterealtime.org/builds/smack/docs/latest/documentation/extensions/ pubsub.html

Thanks.

How you solved you issue of roster group icons?

As I said. I wrote my own PacketExtension, which had key/value pairs (group to image path) and stored that in the Private XML Storage.

After the roster is loaded, I also retrieve the image data and assign the image to the group in the roster.

Thanks for your help.