Get current chat

Hi,

If I have started a chat with another person, is there anyway of getting that connection so that I can send messages between both parties without knowing their ID’'s in advance?

Cheers,

John.

As said in these two posts:

http://www.jivesoftware.org/community/thread.jspa?threadID=22358&tstart=0

http://www.jivesoftware.org/community/thread.jspa?threadID=22385&tstart=0

_Aaron

Hey Aaron,

Thanks for all your replies. I think I was asking the wrong question cos it wasn’‘t clear in my head what i needed, but I’'ve got it now:

Basically say I am implementing the ChatRoomListener:

+public class MyChatRoomListener implements ChatRoomListener

{

…//implemented methods

public void chatRoomOpened(ChatRoom cr)

{

//do soemthing

}

}+

How can I fetch the participant that actually initated the conversation with me as a ChatRoom cr is opened?

Cheers,

John.

chatRoom.getRoomname();

The room name is the JID the room is chatting with. In the case of one-to-one chatting it is the other person’‘s JID, in the case of group chat it is the room’'s JID.

  • Jasen.

perfect! Thanks a million Jasen:)