diff options
Diffstat (limited to 'Presence/XMPP.hs')
-rw-r--r-- | Presence/XMPP.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Presence/XMPP.hs b/Presence/XMPP.hs index c4e4d7f6..fb53c2fb 100644 --- a/Presence/XMPP.hs +++ b/Presence/XMPP.hs | |||
@@ -331,6 +331,11 @@ iq_service_unavailable host iq_id mjid req = | |||
331 | , EventEndElement "{jabber:client}iq" | 331 | , EventEndElement "{jabber:client}iq" |
332 | ] | 332 | ] |
333 | 333 | ||
334 | getRoster session = do | ||
335 | budies <- getMyBuddies session | ||
336 | subscribers <- getMySubscribers session | ||
337 | return ([]::[Event]) -- TODO | ||
338 | |||
334 | handleIQGet session cmdChan tag = do | 339 | handleIQGet session cmdChan tag = do |
335 | withJust (lookupAttrib "id" (tagAttrs tag)) $ \stanza_id -> do | 340 | withJust (lookupAttrib "id" (tagAttrs tag)) $ \stanza_id -> do |
336 | whenJust nextElement $ \child -> do | 341 | whenJust nextElement $ \child -> do |
@@ -356,6 +361,18 @@ handleIQGet session cmdChan tag = do | |||
356 | , EventEndElement "{jabber:client}iq" | 361 | , EventEndElement "{jabber:client}iq" |
357 | ] | 362 | ] |
358 | atomically . writeTChan cmdChan . Send $ pong | 363 | atomically . writeTChan cmdChan . Send $ pong |
364 | "{jabber:iq:roster}query" -> liftIO $ do | ||
365 | putStrLn $ "REQUESTED ROSTER " ++ show tag | ||
366 | -- REQUESTED ROSTER EventBeginElement | ||
367 | -- (Name {nameLocalName = "iq", nameNamespace = Just "jabber:client", namePrefix = Nothing}) | ||
368 | -- [(Name { nameLocalName = "id" | ||
369 | -- , nameNamespace = Nothing | ||
370 | -- , namePrefix = Nothing}, | ||
371 | -- [ContentText "32a337c2-7b22-45b6-9d21-15ded0d079ec"]) | ||
372 | -- ,(Name {nameLocalName = "type", nameNamespace = Nothing, namePrefix = Nothing}, | ||
373 | -- [ContentText "get"])] | ||
374 | roster <- getRoster session | ||
375 | atomically . writeTChan cmdChan . Send $ roster | ||
359 | req -> unhandledGet req | 376 | req -> unhandledGet req |
360 | 377 | ||
361 | 378 | ||