Open Zash opened 5 years ago
That code is from long ago (~3 years or so), and the issue was related to mod_watchregistrations.
The issue is that registration notifications are sent as type chat
, even though they should be headline
IMO. I see that this is (now) configurable, but chat
is still the default, I'm not sure whether this was the case back when I wrote that code.
I've been meaning to make a bug report for this, I don't think I ever did, so yeah... sorry about that :)
From Converse's perspective, a message of type chat
implies two-way communication, so a chatbox with textarea is shown. A message of type headline
implies one-way communication, so a textarea is not shown. AFAIK this is inline with the original intent behind headline
.
See https://hg.prosody.im/trunk/file/tip/plugins/mod_watchregistrations.lua#l16
I was not aware of the special handling of headline
. Interesting, but looks like a bug if you're not prepared for the lack of input textarea.
In this case, I had added the pubsub component to my roster to be able to send messages to it, and then there is a textarea, but the "headline" replies are discarded.
I can't find the reason the message type in mod_watchregistrations
was originally set to chat
. One reason I can think of is that a chat
message sent while you're offline is saved, while a headline
is discarded. That makes it problematic for important system messages.
@Zash @jcbrand is this still a relevant issue?
Yes, although I'm not sure what the solution is.
Background: mod_pubsub_text_interface is a plugin that lets you interact with a pubsub service using plain text messages.
While mindlessly testing random unrelated things, I noticed that Converse would not show messages from such a pubsub service.
Debug logs show
The messages in question are of type
chat
and look likeI've traced this to this definition of a headline message:
https://github.com/conversejs/converse.js/blob/0ebfc3fce8fc570f341763822339b389feed0132/src/headless/utils/core.js#L110-L120
Originally introduced in https://github.com/conversejs/converse.js/commit/d3c97486dd56e4d8a00086eff1a8bb123c5e0f8b
As someone involved in Prosody development, I would be interested in knowing what originally prompted this workaround so it can be fixed in Prosody.