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:
parent
5172fb5e0f
commit
75e0cb7dc3
4 changed files with 10 additions and 15 deletions
|
|
@ -64,7 +64,7 @@ fn make_presence() -> 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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue