message, iq, presence, stanza_error, forwarded: Add support for components hidden behind the component feature flag.
This commit is contained in:
parent
99b9525e6f
commit
69cc83c456
8 changed files with 161 additions and 28 deletions
12
src/mam.rs
12
src/mam.rs
|
|
@ -242,6 +242,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn test_result() {
|
||||
#[cfg(not(feature = "component"))]
|
||||
let elem: Element = r#"
|
||||
<result xmlns='urn:xmpp:mam:2' queryid='f27' id='28482-98726-73623'>
|
||||
<forwarded xmlns='urn:xmpp:forward:0'>
|
||||
|
|
@ -251,6 +252,17 @@ mod tests {
|
|||
</message>
|
||||
</forwarded>
|
||||
</result>
|
||||
"#.parse().unwrap();
|
||||
#[cfg(feature = "component")]
|
||||
let elem: Element = r#"
|
||||
<result xmlns='urn:xmpp:mam:2' queryid='f27' id='28482-98726-73623'>
|
||||
<forwarded xmlns='urn:xmpp:forward:0'>
|
||||
<delay xmlns='urn:xmpp:delay' stamp='2010-07-10T23:08:25Z'/>
|
||||
<message xmlns='jabber:component:accept' from="witch@shakespeare.lit" to="macbeth@shakespeare.lit">
|
||||
<body>Hail to thee</body>
|
||||
</message>
|
||||
</forwarded>
|
||||
</result>
|
||||
"#.parse().unwrap();
|
||||
Result_::try_from(elem).unwrap();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue