diff options
author | joe <joe@jerkface.net> | 2013-07-20 22:54:50 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2013-07-20 22:54:50 -0400 |
commit | f2a0bc19921db76d528d24347fc34c7fd0d78b38 (patch) | |
tree | 84c4684ba13815a72df9e93df6ac6421ab550cbd | |
parent | e57941161715a28543794bdd346110c67f0cf224 (diff) |
remove eroneous requirement of "from" attribute on client announced
presence.
-rw-r--r-- | Presence/XMPP.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Presence/XMPP.hs b/Presence/XMPP.hs index 756d300a..6c802fb4 100644 --- a/Presence/XMPP.hs +++ b/Presence/XMPP.hs | |||
@@ -362,12 +362,14 @@ handleIQGet session cmdChan tag = do | |||
362 | handleClientPresence session stanza = do | 362 | handleClientPresence session stanza = do |
363 | -- online (Available or Away) | 363 | -- online (Available or Away) |
364 | let log = liftIO . debugL . ("(C) " <++>) | 364 | let log = liftIO . debugL . ("(C) " <++>) |
365 | withJust (lookupAttrib "from" (tagAttrs stanza)) $ \jid -> do | 365 | log $ "handleClientPresence "<++>bshow stanza |
366 | jid <- liftIO $ getJID session | ||
366 | -- cjid <- liftIO $ parseAddressJID (textToByteString jid) | 367 | -- cjid <- liftIO $ parseAddressJID (textToByteString jid) |
367 | let parseChildren stat = do | 368 | let parseChildren stat = do |
368 | child <- nextElement | 369 | child <- nextElement |
370 | log $ " child: "<++> bshow child | ||
369 | case child of | 371 | case child of |
370 | Just tag | tagName tag=="{jabber:server}show" | 372 | Just tag | tagName tag=="{jabber:client}show" |
371 | -> fmap toStat (lift content) | 373 | -> fmap toStat (lift content) |
372 | Just tag | otherwise -> parseChildren stat | 374 | Just tag | otherwise -> parseChildren stat |
373 | Nothing -> return stat | 375 | Nothing -> return stat |