jingle_message, muc, presence, version: Always use the check_no_attributes macro.
This commit is contained in:
parent
f2f8de773b
commit
e0438f9b88
5 changed files with 9 additions and 37 deletions
|
|
@ -25,6 +25,7 @@ impl TryFrom<Element> for Muc {
|
|||
if !elem.is("x", ns::MUC) {
|
||||
return Err(Error::ParseError("This is not an x element."));
|
||||
}
|
||||
check_no_attributes!(elem, "x");
|
||||
|
||||
let mut password = None;
|
||||
for child in elem.children() {
|
||||
|
|
@ -35,10 +36,6 @@ impl TryFrom<Element> for Muc {
|
|||
}
|
||||
}
|
||||
|
||||
for _ in elem.attrs() {
|
||||
return Err(Error::ParseError("Unknown attribute in x element."));
|
||||
}
|
||||
|
||||
Ok(Muc {
|
||||
password: password,
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue