Browse Source

examples/echoclient/Main.hs: Adapt to new API

master
Jon Kristensen 13 years ago
parent
commit
61d1e6ed7a
  1. 5
      examples/echoclient/Main.hs

5
examples/echoclient/Main.hs

@ -20,12 +20,13 @@ main = do @@ -20,12 +20,13 @@ main = do
updateGlobalLogger "Pontarius.Xmpp" $ setLevel DEBUG
result <- session
"example.com"
(Just (\_ -> ( [scramSha1 "username" Nothing "password"])
, Nothing))
def
(Just ([scramSha1 "username" Nothing "password"], Nothing))
sess <- case result of
Right s -> return s
Left e -> error $ "XmppFailure: " ++ (show e)
sendPresence (Presence Nothing Nothing Nothing Nothing Nothing []) sess
sendPresence def sess
forever $ do
msg <- getMessage sess
case answerMessage msg (messagePayload msg) of

Loading…
Cancel
Save