parsers: improve xml:lang handling

This is still far from being a full fix. Still, we can avoid the lang
attribute (by allowing discarding the `xml:lang` value via the feature
introduced a couple commits ago) and we can avoid emitting `xml:lang=""`
where no language was previously set using the mechanism introduced for
<message/> in 5172fb5e.
This commit is contained in:
Jonas Schäfer 2025-04-18 13:02:33 +02:00
commit 75e0cb7dc3
4 changed files with 10 additions and 15 deletions

View file

@ -73,7 +73,7 @@ fn make_presence(from: Jid, to: Jid) -> Presence {
presence.show = Some(PresenceShow::Chat);
presence
.statuses
.insert(String::from("en"), String::from("Echoing messages."));
.insert(Lang::from("en"), String::from("Echoing messages."));
presence
}