From d038ddddaba887cfe2c17e8fbae9d51931a069ba Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Thu, 2 Aug 2018 20:05:35 +0200 Subject: [PATCH] mam: Replace Strings with proper wrappers, and make queryid optional as it should be. --- src/mam.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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