conversejs / converse.js

Web-based XMPP/Jabber chat client written in JavaScript
http://conversejs.org
Mozilla Public License 2.0
3.08k stars 772 forks source link

space character in room name is saved as escaped in openfire database #2765

Open RamaryUp opened 2 years ago

RamaryUp commented 2 years ago

Describe the bug In Converse.js GUI, I create room "dummy room". In Openfire database it is saved as is:

I expected "dummy room", with no escape character in name and description attributes, in Openfire database.

The body of the XMP message sent as a POST method to save it is: <body rid="3300055937" sid="9y2ewgpe4s" xmlns="http://jabber.org/protocol/httpbind"><iq id="d53213f3-04eb-4d28-a66c-1ee40b320356:sendIQ" to="dummy\20room@domaintest.com" type="get" xmlns="jabber:client"><vCard xmlns="vcard-temp"/></iq><iq from="us-15151515@domaintest.com/converse.js-127350245" id="e58f8107-de1c-4198-8224-39237e11a9a6:sendIQ" to="dummy\20room@domaintest.com" type="get" xmlns="jabber:client"><query xmlns="http://jabber.org/protocol/disco#info"/></iq></body>

Is it a nice to have feature or is it already possible to address this issue ?

Thanks for your help.

To Reproduce Steps to reproduce the behavior:

  1. Go to Openfire GUI
  2. Click on Create room
  3. Input the room name "dummy room"
  4. Go to openfire administration database or just observe room title in the "dummy room" chat box.

Expected behavior name="dummy room" (not "dummy\20room") room title in the chat box should be "dummy room" (not "dummy\20room")

Screenshots

image

image

image

Environment :

--- Want to back this issue? **[Post a bounty on it!](https://app.bountysource.com/issues/106357688-space-character-in-room-name-is-saved-as-escaped-in-openfire-database?utm_campaign=plugin&utm_content=tracker%2F194169&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://app.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F194169&utm_medium=issues&utm_source=github).
licaon-kter commented 2 years ago

As you notice from the stanza, that's the actual address of that room, and that address needs to be escaped.

RamaryUp commented 2 years ago

@licaon-kter thanks, what I mean is that I need a way to put inside the XMPP request something like to="dummy\20room@domaintest.com" room_name="dummy room" room_description="dummy room"

licaon-kter commented 2 years ago

That's the thing, you don't setup this HERE.

Can you update to latest version 9? Maybe it got more options.

Or use another client to setup room subject and title.

deleolajide commented 2 years ago

Openfire is simple to use This is what you should do 👍

image

image

The room ID is is used in the room JID and should not have spaces unless you want give yourself a headache. Put spaces in the room name instead.

RamaryUp commented 2 years ago

Do you know the syntax to specify the name in the XMPP message ?

jcbrand commented 2 years ago

I think we might be able to implement what @RamaryUp wants, which is to not only set the MUC JID, but also the name when creating a new MUC.

I'll investigate...