summaryrefslogtreecommitdiff
path: root/Assistant/Threads/XMPPClient.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant/Threads/XMPPClient.hs')
-rw-r--r--Assistant/Threads/XMPPClient.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/Assistant/Threads/XMPPClient.hs b/Assistant/Threads/XMPPClient.hs
index d1cd375ed..6b6c14ea5 100644
--- a/Assistant/Threads/XMPPClient.hs
+++ b/Assistant/Threads/XMPPClient.hs
@@ -120,12 +120,12 @@ decodeStanza selfjid s@(ReceivedPresence p)
| presenceType p == PresenceError = [ProtocolError s]
| presenceFrom p == Nothing = [Ignorable s]
| presenceFrom p == Just selfjid = [Ignorable s]
- | otherwise = maybe [PresenceMessage p] decode (getGitAnnexAttrValue p)
+ | otherwise = maybe [PresenceMessage p] decode (gitAnnexTagInfo p)
where
- decode (attr, (val, _tag))
- | attr == pushAttr = impliedp $ GotNetMessage $ NotifyPush $
- decodePushNotification val
- | attr == queryAttr = impliedp $ GotNetMessage QueryPresence
+ decode i
+ | tagAttr i == pushAttr = impliedp $ GotNetMessage $ NotifyPush $
+ decodePushNotification (tagValue i)
+ | tagAttr i == queryAttr = impliedp $ GotNetMessage QueryPresence
| otherwise = [Unknown s]
{- Things sent via presence imply a presence message,
- along with their real meaning. -}
@@ -134,10 +134,10 @@ decodeStanza selfjid s@(ReceivedMessage m)
| messageFrom m == Nothing = [Ignorable s]
| messageFrom m == Just selfjid = [Ignorable s]
| messageType m == MessageError = [ProtocolError s]
- | otherwise = [fromMaybe (Unknown s) $ decode =<< getGitAnnexAttrValue m]
+ | otherwise = [fromMaybe (Unknown s) $ decode =<< gitAnnexTagInfo m]
where
- decode (attr, (val, tag)) = GotNetMessage <$>
- ((\d -> d m val tag) =<< M.lookup attr decoders)
+ decode i = GotNetMessage <$>
+ ((\d -> d m i) =<< M.lookup (tagAttr i) decoders)
decoders = M.fromList
[ (pairAttr, decodePairingNotification)
, (canPushAttr, decodeCanPush)