summaryrefslogtreecommitdiff
path: root/Presence/Nesting.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2014-02-16 02:58:37 -0500
committerjoe <joe@jerkface.net>2014-02-16 02:58:37 -0500
commit00eb50e9876d9afcfdf6bd52ac937ffaedc1f27b (patch)
tree0b9c5e81bc6e4e6b325066a079063eaa68a9f080 /Presence/Nesting.hs
parentb0992c304dd48190f7cca0e7222501fd7eb56062 (diff)
Use XMPPServerParameters instead of ResourcePolicy.
Also: some presence status parsing.
Diffstat (limited to 'Presence/Nesting.hs')
-rw-r--r--Presence/Nesting.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Presence/Nesting.hs b/Presence/Nesting.hs
index 24f9baad..850cb8c0 100644
--- a/Presence/Nesting.hs
+++ b/Presence/Nesting.hs
@@ -27,6 +27,12 @@ doNestingXML m =
27nesting :: Monad m => NestingXML o m Int 27nesting :: Monad m => NestingXML o m Int
28nesting = lift $ (return . nestingLevel) =<< get 28nesting = lift $ (return . nestingLevel) =<< get
29 29
30xmlLang :: Monad m => NestingXML o m (Maybe Lang)
31xmlLang = fmap (fmap snd . top . langStack) (lift get)
32 where
33 top ( a :! as ) = Just a
34 top _ = Nothing
35
30 36
31trackNesting :: Monad m => ConduitM Event Event (StateT XMLState m) () 37trackNesting :: Monad m => ConduitM Event Event (StateT XMLState m) ()
32trackNesting = awaitForever doit 38trackNesting = awaitForever doit
@@ -77,3 +83,4 @@ nextElement = do
77 if (lvl'>=lvl) then loop 83 if (lvl'>=lvl) then loop
78 else return Nothing 84 else return Nothing
79 85
86