summaryrefslogtreecommitdiff
path: root/Presence/Stanza
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2018-11-06 04:33:32 -0500
committerJoe Crayne <joe@jerkface.net>2018-11-06 04:34:03 -0500
commita6e8c91b4f3b08d7be388ea0d588d95a1d8a5b06 (patch)
tree9317d8c662acbc5c7ec57dd3259bc22db8979f36 /Presence/Stanza
parent3187c366a985ecc8c3394248e7f03d0022575ed0 (diff)
More XEP-45 chatroom stuff.
Diffstat (limited to 'Presence/Stanza')
-rw-r--r--Presence/Stanza/Parse.hs4
-rw-r--r--Presence/Stanza/Types.hs5
2 files changed, 5 insertions, 4 deletions
diff --git a/Presence/Stanza/Parse.hs b/Presence/Stanza/Parse.hs
index 0335556b..b025f418 100644
--- a/Presence/Stanza/Parse.hs
+++ b/Presence/Stanza/Parse.hs
@@ -47,9 +47,9 @@ grokStanzaIQGet stanza = do
47 "{urn:xmpp:ping}ping" -> return Ping 47 "{urn:xmpp:ping}ping" -> return Ping
48 "{jabber:iq:roster}query" -> return RequestRoster 48 "{jabber:iq:roster}query" -> return RequestRoster
49 "{http://jabber.org/protocol/disco#items}query" 49 "{http://jabber.org/protocol/disco#items}query"
50 -> return RequestItems 50 -> return $ RequestItems $ lookupAttrib "node" $ tagAttrs tag
51 "{http://jabber.org/protocol/disco#info}query" 51 "{http://jabber.org/protocol/disco#info}query"
52 -> return RequestInfo 52 -> return $ RequestInfo $ lookupAttrib "node" $ tagAttrs tag
53 name -> return $ UnrecognizedQuery name 53 name -> return $ UnrecognizedQuery name
54 54
55grokStanzaIQResult :: XML.Event -> NestingXML o IO (Maybe StanzaType) 55grokStanzaIQResult :: XML.Event -> NestingXML o IO (Maybe StanzaType)
diff --git a/Presence/Stanza/Types.hs b/Presence/Stanza/Types.hs
index 3e039a34..6c5b8867 100644
--- a/Presence/Stanza/Types.hs
+++ b/Presence/Stanza/Types.hs
@@ -34,9 +34,9 @@ data StanzaType
34 | Pong 34 | Pong
35 | RequestResource (Maybe Text) (Maybe Text) -- ^ Client's name for this host followed by client's requested resource id. 35 | RequestResource (Maybe Text) (Maybe Text) -- ^ Client's name for this host followed by client's requested resource id.
36 | SetResource 36 | SetResource
37 | RequestItems 37 | RequestItems (Maybe Text)
38 | Items 38 | Items
39 | RequestInfo 39 | RequestInfo (Maybe Text)
40 | Info 40 | Info
41 | SessionRequest 41 | SessionRequest
42 | UnrecognizedQuery Name 42 | UnrecognizedQuery Name
@@ -112,6 +112,7 @@ data JabberShow = Offline
112 deriving (Show,Enum,Ord,Eq,Read) 112 deriving (Show,Enum,Ord,Eq,Read)
113 113
114class StanzaFirstTag a where 114class StanzaFirstTag a where
115 -- Peek at the stanza open tag.
115 stanzaFirstTag :: StanzaWrap a -> IO XML.Event 116 stanzaFirstTag :: StanzaWrap a -> IO XML.Event
116instance StanzaFirstTag (TChan XML.Event) where 117instance StanzaFirstTag (TChan XML.Event) where
117 stanzaFirstTag stanza = do 118 stanzaFirstTag stanza = do