parser: Add helpers on MucUser

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2023-06-07 18:40:08 +02:00
parent 9c39e3c195
commit b8ba74e336
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -271,6 +271,25 @@ generate_element!(
]
);
impl MucUser {
pub fn new() -> MucUser {
MucUser {
status: vec![],
items: vec![],
}
}
pub fn with_status(mut self, status: Vec<Status>) -> MucUser {
self.status = status;
self
}
pub fn with_items(mut self, items: Vec<Item>) -> MucUser {
self.items = items;
self
}
}
impl MessagePayload for MucUser {}
impl PresencePayload for MucUser {}