Browse Source

minor correction

master
Jon Kristensen 14 years ago
parent
commit
354335fd9d
  1. 4
      source/Network/Xmpp/Stream.hs

4
source/Network/Xmpp/Stream.hs

@ -120,10 +120,10 @@ xmppStream expectedTo = do
Right r -> validateData r Right r -> validateData r
validateData (_, _, _, _, Nothing) = throwError $ StreamWrongLangTag Nothing validateData (_, _, _, _, Nothing) = throwError $ StreamWrongLangTag Nothing
validateData (ver, from, to, i, lang) validateData (ver, from, to, i, Just lang)
| ver /= "1.0" = throwError $ StreamWrongVersion (Just ver) | ver /= "1.0" = throwError $ StreamWrongVersion (Just ver)
| isJust to && to /= expectedTo = throwError $ StreamWrongTo (Text.pack . show <$> to) | isJust to && to /= expectedTo = throwError $ StreamWrongTo (Text.pack . show <$> to)
| otherwise = return (from, to, i, fromJust lang) | otherwise = return (from, to, i, lang)
xmppStreamFeatures :: StreamSink ServerFeatures xmppStreamFeatures :: StreamSink ServerFeatures
xmppStreamFeatures = do xmppStreamFeatures = do
e <- lift $ elements =$ CL.head e <- lift $ elements =$ CL.head

Loading…
Cancel
Save