How to transfer a file in conference room?


I need to transfer a file in a conference room. please guide me



I’m not sure if this would work for you, but if the room is configured as non-anonymous, then it is possible to get the actual JID of a room occupant and then send a file to them like you would normally in single user chat. I don’t know if there is a way to send a file directly without the real JID.

If you are already tracking the presence packets for users when they join the room, then you can potentially find the JID from that as follows:

// Extract the multi user chat extension
PacketExtension extension = packet.getExtension(“”);

// Check if it is a user extension
if (extension instanceof MUCUser) {
MUCUser user = (MUCUser) extension;

// Try to extract properties for the user
MUCUser.Item item = user.getItem();
if (item != null) {

return item.getJid();

You can also try to get the information from the chat room directly as follows:

// Attempt to get the occupant associated with the given source
Occupant occupant = muc.getOccupant(“room@conference.server.domain/nickname”);
if (occupant != null) {
return occupant.getJid();