0
votes

I can create a muc room. But if i gave the room name as existing one in the database, the server rejects it.So is it possible to create two rooms with same name in ejabberd server(MYSQl backend)?

If possible, then what are the consequences? For example, i created two rooms with unique name say "newGroupChat" and same user list(user1, user2). How can ejabberd identifies it? If i send messages in "newGroupChat", does those messages appear in one room or both of the rooms.

3

3 Answers

0
votes

Its hard to specifically no what you are trying to achieve, but I came across this in another XMPP server setup( Its pretty much generic with few config differences on different servers), and the idea I got is like this:

  1. If you use different systems( different IP) it is possible to have the same room across multiple domains, hence you can mirror the rooms but the room name has to be the same thing, for example "[email protected]" , and one the second system "[email protected]", and when you send messages on System 1, system 2 users can also see the same messages if they are online and logged into the room.

  2. If it's the same system I don't know how you intend to set a boundary on it, there are two ways to do this I figured out, using different OS(maybe bridged networking) and also separating databases. If you use an embedded database there is no way you can re-create the same room, you might try adding extensions to the name to see if it would work as such : "[email protected]/ID1" and "[email protected]/ID2", the above also applies to an external database such as SQL. These are a few suggestions and muc setup might have slight config setup in contrast to the examples I gave, but that's a general idea, if you have better explanations you can also share with me, as I am looking into LAN chatting on different systems with the same muc room.

0
votes

In Xmpp world, room@service is used as an identifier for a room, so here the room is unique. That's why use failed to create when using a existing name.

I think you can try use subject configure for this purpose.

Xmpp MUC Xep-0045

Room, A virtual space that users figuratively enter in order to participate in real-time, text-based conferencing with other users.

Room ID, The localpart of a Room JID, which might be opaque and thus lack meaning for human users (see under Business Rules for syntax); contrast with Room Name.

Room JID, The address of a room.

Room Name, A user-friendly, natural-language name for a room, configured by the room owner and presented in Service Discovery queries; contrast with Room ID.

0
votes

I can create a muc room. But if i gave the room name as existing one in the database, the server rejects it.So is it possible to create two rooms with same name in ejabberd server(MYSQl backend)?

No.It is not possible to create two room with same name in a host in ejabberd(as per XEP-45,too).