From 0d967326df6332d701e39206d3389b4770735397 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 16 Mar 2013 15:37:23 -0400 Subject: 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. --- Assistant/XMPP.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Assistant/XMPP.hs') 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"] -- cgit v1.2.3