You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is no subject set, the room MUST return an empty <subject/> element.
However, in the Message stanza, Subject field is a plain string (not a pointer), and the xml: field tag contains ,omitempty.
This makes it night impossible to spot an empty-subject message (or, for that matter, an empty-but-present body message).
(It might be doable by using a custom MsgExtension and doing a Get() over it, but this is inconvenient, and if possible at all, I cannot quickly think of a way to do it, given that a global type registry is involved.)
An improvement would be to simply replace the string with a *string, and evaluating whether to use omitempty.
The text was updated successfully, but these errors were encountered:
Additionally, empty vs non-present <body/> is relevant for XEP-0045:
Note: In accordance with the core definition of XML stanzas, any message can contain a <subject/> element; only a message that contains a <subject/> but no <body/> element shall be considered a subject change for MUC purposes.
Hi,
per https://xmpp.org/extensions/xep-0045.html#enter-subject an empty subject is permitted and necessary to complete the join process in case of no subject being specified.
However, in the
Message
stanza,Subject
field is a plain string (not a pointer), and thexml:
field tag contains,omitempty
.This makes it night impossible to spot an empty-subject message (or, for that matter, an empty-but-present body message).
(It might be doable by using a custom
MsgExtension
and doing aGet()
over it, but this is inconvenient, and if possible at all, I cannot quickly think of a way to do it, given that a global type registry is involved.)An improvement would be to simply replace the
string
with a*string
, and evaluating whether to useomitempty
.The text was updated successfully, but these errors were encountered: