Closed cburschka closed 7 years ago
It's really annoying that room subjects aren't dated. There is no way to tell subject changes from automatic notifications on joining. This means the "new" string should more ambivalently state "The room subject is {}" rather than "X has changed the room subject.".
Actually ejabberd does date room subjects. From experiment, I have found the following information:
This isn't as flagrantly violating the standard as it used to, but it's still wrong. The XEP explicitly states that the subject change should always be sent AFTER the discussion history, and it should be sent even if the subject is empty.
Cadence should expect conformant behavior but behave unsurprisingly otherwise.
Explanation:
If the server follows the standard, then it will always send a non-delayed <subject>
message on joining, even if it is empty. This should be printed as "The current subject is" to avoid giving the impression that the subject was set just then. If there are subject changes in the room history, then this initial message will be identifiable by being identical to the most recent archived change.
If the server behaves like ejabberd, then it only sends an initial subject if no archived subjects exist. We can only distinguish between the initial subject and an actual subject change by assuming that it must be the first message sent to the room.
The pathological case is if we're using ejabberd, and a user sets the subject shortly before we join, and then sets it to the same value immediately after we join, before anyone else has talked. In this case we will mistake the subject change for an initial subject. That shouldn't happen often.
Update: just ignore ejabberd's behavior and code for the spec for now.
That means discarding
This is one part of the core XEP that still isn't implemented.
group chat messages with an empty body and a non-empty subject signify a room subject.
This suggests several features in cadence: