From b8e1871cb7bc42f14b551b25385e2f420f5ab8fe Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 24 Nov 2015 15:41:13 -0500 Subject: [PATCH] Bind to JID from command line --- Main.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Main.hs b/Main.hs index 02a1354..da97c50 100644 --- a/Main.hs +++ b/Main.hs @@ -167,7 +167,6 @@ getMessage (ReceivedMessage m) = Just m getMessage _ = Nothing viteltiy db toVitelity toComponent = do - bindJID (fromString "2266669991@s.ms/theone") putStanza $ emptyPresence PresenceAvailable forkXMPP $ forever $ flip catchError (const $ return ()) $ do @@ -223,4 +222,6 @@ main = do forkIO $ void $ runComponent (Server (fromString name) host (PortNumber $ fromIntegral (read port :: Int))) (fromString secret) (component db toVitelity toComponent) let Just vitelityParsedJid = parseJID $ fromString vitelityJid - runClient (Server (fromString "s.ms") "s.ms" (PortNumber 5222)) vitelityParsedJid (fromMaybe mempty $ strNode <$> jidNode vitelityParsedJid) (fromString vitelityPassword) $ viteltiy db toVitelity toComponent + runClient (Server (fromString "s.ms") "s.ms" (PortNumber 5222)) vitelityParsedJid (fromMaybe mempty $ strNode <$> jidNode vitelityParsedJid) (fromString vitelityPassword) $ do + bindJID vitelityParsedJid + viteltiy db toVitelity toComponent -- 2.45.2