Closed royrwood closed 3 years ago
Hello,
In your config hosts: is set to ejabberd.roy.org, but in your commands you are using debian.roy.org, i am assuming that is just edit error in that comment right?
I really don't see any changes between 20.01 and 20.02 that could affect this, in both version it should work in same way.
I just checked that on my local server with latest git version and i see that groupchat send_message
are delivered to rooms, but it's important what you use as from
in your requests - it must be from someone that is joined right now (you then need to use full jid), someone that is mucsub subscriber of that room, or someone that is muc admin (in that config that would be admin@ejabberd.roy.org, as this is only person that matches acl listed in access_admin
option of mod_muc
).
I see that psi have problem with messages that this generates - it doesn't like empty <subject/>
that are sent when subject is set to ""
, i just handles them as subject changes with empty subject, i will try to improve this. Maybe something similar happen with your client? But i am pretty sure 20.01 did also generate this...
This is not https://github.com/processone/ejabberd/issues/3474 ?
Yes, that was a typo in the "ejabberd.roy.org" vs "debian.roy.org". (Should I go back and correct that?)
I don't think this is the same as #3474 since that issue (and patch) is focused on sending private messages from admin to a user.
I looked at the diffs between 20.01 and 20.02 and didn't see anything likely to cause the problem, unless it was in one of the libraries. I have not checked if library versions changed.
I have definitely confirmed that 20.01 does send the message to the MUC room, but 20.02 does not. And yes, for 20.01, the "subject" has to be empty or the message body is ignored, so there is some odd behaviour there.
Thanks for the quick reply.
I'll try with a different client than profanity. It would be REALLY annoying if the XMPP client was the problem. Though profanity definitely works with 20.01 and not with 20.02 or later. Odd...
Nope, Thunderbird shows the same behaviour-- i.e. with ejabberd 20.12, the groupchat message from admin does not show. The subject of the room can be cleared or set by admin, but the message never makes it to the clients.
Hold on-- looking at the xmlconsole in profanity, I see this in response to my attempt to send the message using the Admin REST API:
<message id="6371662130715871347" type="groupchat" to="roy@ejabberd.roy.org/profanity.E" from="test_muc_room@conference.ejabberd.roy.org/admin"><body>Message via
REST API</body><subject>New Subject</subject></message>
The message body is there as "Message via REST API", but profanity is not showing it. I wonder how that compares to what is sent by ejabberd 20.01? I'll have to swap the servers...
Weird-- the only difference seems to be the "lang" attribute. Is that enough to break things for a client?!?!?! Both profanity and Thunderbird??!?!?!
20.01:
<message id="6479759090134302045" type="groupchat" to="roy@ejabberd.roy.org/profanity.E" from="test_muc_room@conference.ejabberd.roy.org/admin">
<body lang="en">Message via REST API</body>
<subject lang="en">Subject via REST API</subject>
</message>
20.12:
<message id="6371662130715871347" type="groupchat" to="roy@ejabberd.roy.org/profanity.E" from="test_muc_room@conference.ejabberd.roy.org/admin">
<body>Message via REST API</body>
<subject>New Subject</subject>
</message>
Looking at ejabberd 20.01 vs 20.02, the code differences look harmless, so I suspect the source of the change is in the xmpp lib. It changed from version 1.4.2 to 1.4.5. Or maybe fast_xml which went from 1.1.37 to 1.1.39. For any of you guys familiar with ejabberd architecture and internals, what do you think?
Recall that this broke as of 20.02 and remains broken up to 20.12.
So it looks like those messages are routed in new version as well, and those message looks completly fine to me. Maybe indeed problem is with having subject and body together, maybe your client ignored it previously because of that lang attribute, and now it thinks it just subject change and not regular message?
Yes, the message stanzas seem okay, and it's just odd that the clients choose to ignore the message body because of the language attribute. I'm surprised that both Profanity and Thunderbird react the same way!
@royrwood: Please edit your description with the good hostname (ejabberd vs debian), it will be better to all ^^
Environment
Configuration (only if needed): grep -Ev '^$|^\s*#' ejabberd.yml
Errors from error.log/crash.log
No errors shown in log
Bug description
Please, give us a precise description (what does not work, what is expected, etc.)
In ejabberd 20.01, it was possible to send messages to a MUC room as admin using ejabberdctl or using the Admin REST API. That stopped working in 20.02, and continues to not work in the latest 20.12.
The following steps indicate how to test and reproduce this problem. These steps work as expected in 20.01, but stop working in 20.02 and later.