diff --git a/src/mam.rs b/src/mam.rs index b1965667..c54a5ba3 100644 --- a/src/mam.rs +++ b/src/mam.rs @@ -15,14 +15,20 @@ use iq::{IqGetPayload, IqSetPayload, IqResultPayload}; use data_forms::DataForm; use rsm::Set; use forwarding::Forwarded; +use pubsub::NodeName; use ns; +generate_id!( + /// An identifier matching a result message to the query requesting it. + QueryId +); + generate_element!( Query, "query", MAM, attributes: [ - queryid: Option = "queryid" => optional, - node: Option = "node" => optional + queryid: Option = "queryid" => optional, + node: Option = "node" => optional ], children: [ form: Option = ("x", DATA_FORMS) => DataForm, @@ -38,7 +44,7 @@ generate_element!( Result_, "result", MAM, attributes: [ id: String = "id" => required, - queryid: String = "queryid" => required, + queryid: Option = "queryid" => optional, ], children: [ forwarded: Required = ("forwarded", FORWARD) => Forwarded