ejabberd
ejabberd copied to clipboard
One to one conversation
Hello, I'm trying to use Ejabberd to create One-to-one conversation, but I'm facing a problem. Both users are in the same MUC room, and I click on one user to create a One-to-one conversation and I want this discussion to be totally detached of the first MUC room. So I just send a message to the user targeted via :
<message type="chat" to="uuid@xmpp" from="uuid2@xmpp" id="e11e3a54"><body>Hey</body></message>
Bu nothing happen when the message is sent as much on my side as on the receiver side. Can you help me ? I want to create one-to-one conversation, not a private MUC room or something like that.
Environment
- ejabberd version: 22.5.0
(@gparant)
For 1:1 you add each other as contacts first, right?
Which client exactly? Did you test with existing clients like Dino or Siskin or Gajim or Monal or Conversations or Movim?
I dont want that each user add the other one as contacts, I want to let anybody talk to anybody without the idea of contact list, because an user can talk to his friends but also to a stranger. I'm using Ejabberd and I'm creating the client myself. So which XMPP messages I need to send and in which order to create one-to-one discussion.
Thank you.
That should work out of the box, there isn't limitations to sending messages to other accounts, regardless if they are your contact or not.
For example, I installed ejabberd 22.05, registered two accounts, logged in to each of them with different clients. Then, in the second client with account user2, I send this stanza:
<message id='23:950219'
xml:lang='es'
type='chat'
to='user1@localhost'>
<body>hey</body>
</message>
It is correctly delivered to user1. Those accounts are not contacts at all.
to="uuid@xmpp"
Make sure that uuid is an account name registered in host "xmpp". This should return:
$ ejabberdctl registered_users xmpp
uuid
uuid2