diff options
author | Joey Hess <joey@kitenet.net> | 2012-11-03 17:34:19 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-11-03 17:46:22 -0400 |
commit | bc94dde8f6c5d7ca213fa81a6c03a4c9e22e16d5 (patch) | |
tree | 9a5384d53b222577004ce2cbe8b1540a5e3f2e90 /Assistant/XMPP | |
parent | efa88a0f1589a82a91a06ed3a3cbd5f4106aabb4 (diff) |
XMPP pair requests are now received, and an alert displayed
Diffstat (limited to 'Assistant/XMPP')
-rw-r--r-- | Assistant/XMPP/Buddies.hs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Assistant/XMPP/Buddies.hs b/Assistant/XMPP/Buddies.hs index d784f316d..087a34879 100644 --- a/Assistant/XMPP/Buddies.hs +++ b/Assistant/XMPP/Buddies.hs @@ -17,9 +17,6 @@ import qualified Data.Set as S import Data.Text (Text) import qualified Data.Text as T -genBuddyID :: JID -> BuddyID -genBuddyID j = BuddyID $ formatJID j - genKey :: JID -> BuddyKey genKey j = BuddyKey $ formatJID $ JID (jidNode j) (jidDomain j) Nothing @@ -29,9 +26,9 @@ buddyName j = maybe (T.pack "") strNode (jidNode j) {- Summary of info about a buddy. - - If the buddy has no clients at all anymore, returns Nothing. -} -buddySummary :: Buddy -> Maybe (Text, Bool, Bool, BuddyID) +buddySummary :: Buddy -> Maybe (Text, Bool, Bool, BuddyKey) buddySummary b = case clients of - ((Client j):_) -> Just (buddyName j, away, canpair, genBuddyID j) + ((Client j):_) -> Just (buddyName j, away, canpair, genKey j) [] -> Nothing where away = S.null (buddyPresent b) && S.null (buddyAssistants b) |