(re)start XMPP when it's configured in the webapp

This commit is contained in:
Joey Hess 2012-10-27 00:50:14 -04:00
parent 2dc40ecbd1
commit c71836269b
5 changed files with 12 additions and 3 deletions

View file

@ -17,6 +17,7 @@ import Utility.Yesod
#ifdef WITH_XMPP
import Assistant.Common
import Assistant.XMPP
import Assistant.Pushes
import Utility.SRV
#endif
@ -45,6 +46,7 @@ getXMPPR = xmppPage $ do
where
storecreds creds = do
void $ runAnnex undefined $ setXMPPCreds creds
liftIO . notifyRestart =<< pushNotifier <$> getYesod
redirect ConfigR
#else
getXMPPR = xmppPage $

View file

@ -17,6 +17,7 @@ import Assistant.DaemonStatus
import Assistant.ScanRemotes
import Assistant.TransferQueue
import Assistant.TransferSlots
import Assistant.Pushes
import Assistant.Alert
import Assistant.Pairing
import Utility.NotificationBroadcaster
@ -38,6 +39,7 @@ data WebApp = WebApp
, scanRemotes :: ScanRemoteMap
, transferQueue :: TransferQueue
, transferSlots :: TransferSlots
, pushNotifier :: PushNotifier
, secretToken :: Text
, relDir :: Maybe FilePath
, getStatic :: Static