~singpolyma/network-protocol-xmpp

3eeaaad68f9bb547d867fa9b6bd6bc7f3d33e10d — John Millikin 14 years ago 49d6bcf
In 'treeToStanza', treat the input as a root node.
1 files changed, 2 insertions(+), 1 deletions(-)

M Network/Protocol/XMPP/Stanza.hs
M Network/Protocol/XMPP/Stanza.hs => Network/Protocol/XMPP/Stanza.hs +2 -1
@@ 198,7 198,8 @@ stanzaToTree' stanza name typeStr = element ("", name) attrs payloads where
		Just text -> [("", label, T.unpack text)]

treeToStanza :: T.Text -> XmlTree -> Maybe ReceivedStanza
treeToStanza ns tree = do
treeToStanza ns root = do
	tree <- runMA A.getChildren root
	treeNS <- runMA A.getNamespaceUri tree
	if T.pack treeNS == ns then Just () else Nothing