fix redirect from XMPP prompt to pairing pages

This commit is contained in:
Joey Hess 2013-03-16 19:19:58 -04:00
parent 4c0642a70d
commit 0400c5f596
2 changed files with 9 additions and 3 deletions

View file

@ -58,7 +58,10 @@ getStartXMPPPairFriendR = ifM (isJust <$> liftAnnex getXMPPCreds)
liftAssistant $ sendNetMessage QueryPresence
pairPage $
$(widgetFile "configurators/pairing/xmpp/friend/prompt")
, redirect XMPPR -- go get XMPP configured, then come back
, do
-- go get XMPP configured, then come back
setUltDestCurrent
redirect XMPPR
)
#else
getStartXMPPPairFriendR = noXMPPPairing
@ -71,7 +74,10 @@ getStartXMPPPairSelfR :: Handler RepHtml
#ifdef WITH_XMPP
getStartXMPPPairSelfR = go =<< liftAnnex getXMPPCreds
where
go Nothing = redirect XMPPR -- go get XMPP configured, then come back
go Nothing = do
-- go get XMPP configured, then come back
setUltDestCurrent
redirect XMPPR
go (Just creds) = do
{- Ask buddies to send presence info, to get
- the buddy list populated. -}

View file

@ -110,7 +110,7 @@ postXMPPR = xmppPage $ do
storecreds creds = do
void $ liftAnnex $ setXMPPCreds creds
liftAssistant notifyNetMessagerRestart
redirectBack
redirectUltDest DashboardR
#else
getXMPPR = xmppPage $
$(widgetFile "configurators/xmpp/disabled")