xmpp-parsers: Convert MetadataResponse to xso
This commit is contained in:
parent
10acdf1e78
commit
c85bde3d2e
1 changed files with 8 additions and 6 deletions
|
@ -198,16 +198,18 @@ pub struct MetadataQuery;
|
||||||
|
|
||||||
impl IqGetPayload for MetadataQuery {}
|
impl IqGetPayload for MetadataQuery {}
|
||||||
|
|
||||||
generate_element!(
|
|
||||||
/// Response from the archive, containing the start and end metadata if it isn’t empty.
|
/// Response from the archive, containing the start and end metadata if it isn’t empty.
|
||||||
MetadataResponse, "metadata", MAM,
|
#[derive(FromXml, AsXml, Debug, Clone, PartialEq)]
|
||||||
children: [
|
#[xml(namespace = ns::MAM, name = "metadata")]
|
||||||
|
pub struct MetadataResponse {
|
||||||
/// Metadata about the first message in the archive.
|
/// Metadata about the first message in the archive.
|
||||||
start: Option<Start> = ("start", MAM) => Start,
|
#[xml(child(default))]
|
||||||
|
start: Option<Start>,
|
||||||
|
|
||||||
/// Metadata about the last message in the archive.
|
/// Metadata about the last message in the archive.
|
||||||
end: Option<End> = ("end", MAM) => End,
|
#[xml(child(default))]
|
||||||
]);
|
end: Option<End>,
|
||||||
|
}
|
||||||
|
|
||||||
impl IqResultPayload for MetadataResponse {}
|
impl IqResultPayload for MetadataResponse {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue