summaryrefslogtreecommitdiff
path: root/Assistant/XMPP.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-03-16 15:37:23 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-03-16 16:00:37 -0400
commit0d967326df6332d701e39206d3389b4770735397 (patch)
treeee1935781f6398685cc04322bdf9c93c168f477e /Assistant/XMPP.hs
parente49fedcb95420362ee2c37540e095ba430f64372 (diff)
xmpp: Re-enable XA flag, since disabling it did not turn out to help with the problems Google Talk has with not always sending presence messages to clients.
Diffstat (limited to 'Assistant/XMPP.hs')
-rw-r--r--Assistant/XMPP.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Assistant/XMPP.hs b/Assistant/XMPP.hs
index 49cc82368..2c0004403 100644
--- a/Assistant/XMPP.hs
+++ b/Assistant/XMPP.hs
@@ -52,8 +52,9 @@ instance GitAnnexTaggable Message where
extractGitAnnexTag = headMaybe . filter isGitAnnexTag . messagePayloads
instance GitAnnexTaggable Presence where
+ -- always mark extended away and set presence priority to negative
insertGitAnnexTag p elt = p
- { presencePayloads = negativePriority : elt : presencePayloads p }
+ { presencePayloads = extendedAway : negativePriority : elt : presencePayloads p }
extractGitAnnexTag = headMaybe . filter isGitAnnexTag . presencePayloads
data GitAnnexTagInfo = GitAnnexTagInfo
@@ -204,6 +205,10 @@ silentMessage = (emptyMessage MessageChat)
, elementNodes = []
}
+{- Add to a presence to mark its client as extended away. -}
+extendedAway :: Element
+extendedAway = Element "show" [] [NodeContent $ ContentText "xa"]
+
{- Add to a presence to give it a negative priority. -}
negativePriority :: Element
negativePriority = Element "priority" [] [NodeContent $ ContentText "-1"]