0

I need help with agsXMPP

  1. user (testz2@mx.testserverz.info) authorization is successful
  2. the user testz2@mx.testserverz.info created muc room (group chat) testconfa@conference.mx.testserverz.info 3.the user testz2@mx.testserverz.info send request to invite another user to this room, but server return message
    <message xmlns="jabber:client" from="testconfa@conference.mx.testserverz.info" to="testz2@mx.testserverz.info/agsXMPP" type="error" xml:lang="en">
       <error type="modify" code="406">
          <not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
          <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" xml:lang="en">Only occupants are allowed to send messages to the conference</text>
       </error>
       <body>Hi everybody...</body>
    </message>

how can the creator of a room become a member of a room and invite another user to this room ?

1 Answers1

0

how can the creator of a room become a member of a room and invite another user to this room ?

No, no need for the user to be a room member , that is an affiliation: https://xmpp.org/extensions/xep-0045.html#affil

What you want is the user to be a room occupant, which means that the user joins/enters the room.

If the user sends a Mediated Invitation, he must be a room occupant when sending the invitation, as mentioned in: https://xmpp.org/extensions/xep-0045.html#invite

So, the user must join/enter the room he created: https://xmpp.org/extensions/xep-0045.html#enter and then he can send the invitation.

And what's the code to implement client joining a room in the library you are using? Sorry, I don't know that library.

Badlop
  • 3,840
  • 1
  • 8
  • 9