diff options
author | 2012-10-26 14:17:09 -0400 | |
---|---|---|
committer | 2012-10-26 14:17:09 -0400 | |
commit | f41ba27ddbf3708e18931bec6fbe3aeea750f0dd (patch) | |
tree | f9e76eacc25199eac9d1fa14d72bfab760063063 /Assistant | |
parent | 0c01a949a686aadb2596434cf92990c715ad84a7 (diff) |
XMPP configuration form
Currently relies on SRV being set, or the JID's hostname being the server
hostname and the port being default. Future work: Allow manual
configuration of user name, hostname, and port.
Diffstat (limited to 'Assistant')
-rw-r--r-- | Assistant/Threads/PushNotifier.hs | 6 | ||||
-rw-r--r-- | Assistant/Threads/WebApp.hs | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Assistant/Threads/PushNotifier.hs b/Assistant/Threads/PushNotifier.hs index 0686aac7b..4ba8d677b 100644 --- a/Assistant/Threads/PushNotifier.hs +++ b/Assistant/Threads/PushNotifier.hs @@ -35,8 +35,7 @@ pushNotifierThread :: ThreadState -> DaemonStatusHandle -> PushNotifier -> Named pushNotifierThread st dstatus pushnotifier = NamedThread thisThread $ do v <- runThreadState st $ getXMPPCreds case v of - Nothing -> do - return () -- no creds? exit thread + Nothing -> return () -- no creds? exit thread Just c -> void $ connectXMPP c $ \jid -> do fulljid <- bindJID jid liftIO $ debug thisThread ["XMPP connected", show fulljid] @@ -83,7 +82,8 @@ connectXMPP c a = case parseJID (xmppJID c) of connectXMPP' :: JID -> XMPPCreds -> (JID -> XMPP a) -> IO (Either SomeException ()) connectXMPP' jid c a = go =<< lookupSRV srvrecord where - srvrecord = mkSRVTcp "xmpp-client" (T.unpack $ strDomain $ jidDomain jid) + srvrecord = mkSRVTcp "xmpp-client" $ + T.unpack $ strDomain $ jidDomain jid serverjid = JID Nothing (jidDomain jid) Nothing go [] = run (xmppHostname c) diff --git a/Assistant/Threads/WebApp.hs b/Assistant/Threads/WebApp.hs index c33dc2103..5eda88d36 100644 --- a/Assistant/Threads/WebApp.hs +++ b/Assistant/Threads/WebApp.hs @@ -24,6 +24,7 @@ import Assistant.WebApp.Configurators.Pairing #ifdef WITH_S3 import Assistant.WebApp.Configurators.S3 #endif +import Assistant.WebApp.Configurators.XMPP import Assistant.WebApp.Documentation import Assistant.WebApp.OtherRepos import Assistant.ThreadedMonad |