Question

I am trying to connect to a chat room using xmpp, strophe, and javascript. I was able to join a chat room using:

connection.muc.join(room_name + "@conference.louis-tosh/" + nickname);

The occupant joins the room successfully; however, he/she gets automatically kicked out of the room after a certain period. I have been trying to solve the issue for the past few days.

Is this an openfire configuration error? I need to fix this error and make the occupant permanently member of the chat room until he/she decide to leave the room.

Was it helpful?

Solution

I managed to solve the problem by adding a nickname of the logged in user. The user was being kicked out due to overlapping nicknames in the room.

The solution was as such:

connection.connect(login_jid + '/anyNickname', password, onConnect);

OTHER TIPS

You should get a presence error (type='error') with a conflict element. You can then prompt the user to select a new/different one.

enter image description here

You can achieve this goal from openfire settings, here i am attaching a screen capture for helping you

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top