muc/user: Add a constructor for Item.
This commit is contained in:
parent
9d3028ad71
commit
cd0d47b92e
1 changed files with 14 additions and 0 deletions
|
@ -155,6 +155,20 @@ generate_element!(
|
|||
]
|
||||
);
|
||||
|
||||
impl Item {
|
||||
pub fn new(affiliation: Affiliation, role: Role) -> Item {
|
||||
Item {
|
||||
affiliation,
|
||||
role,
|
||||
jid: None,
|
||||
nick: None,
|
||||
actor: None,
|
||||
continue_: None,
|
||||
reason: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
generate_element!(
|
||||
MucUser, "x", MUC_USER, children: [
|
||||
status: Vec<Status> = ("status", MUC_USER) => Status,
|
||||
|
|
Loading…
Reference in a new issue