diff options
author | Joey Hess <joey@kitenet.net> | 2012-11-09 14:34:06 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-11-09 14:34:06 -0400 |
commit | dcaa93dd5aff1be6e085f689672c2ec35d5f49f1 (patch) | |
tree | ce5cd2bae1b8625f5f43ec0af6d65d12db2ba5fd /Assistant/XMPP.hs | |
parent | b8e1ac94f21661786dd1825418b9d1d512a6a878 (diff) |
add canpush xmpp command
Diffstat (limited to 'Assistant/XMPP.hs')
-rw-r--r-- | Assistant/XMPP.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Assistant/XMPP.hs b/Assistant/XMPP.hs index 104915b81..68da087a6 100644 --- a/Assistant/XMPP.hs +++ b/Assistant/XMPP.hs @@ -130,6 +130,15 @@ decodePairingNotification t m = parse $ words $ T.unpack t <*> pure (toUUID u) parse _ = Nothing +canPush :: JID -> JID -> Message +canPush = gitAnnexMessage $ gitAnnexTag canPushAttr T.empty + +decodeCanPush :: Message -> Maybe NetMessage +decodeCanPush m = CanPush <$> (formatJID <$> messageFrom m) + +canPushAttr :: Name +canPushAttr = "canpush" + pushRequest :: JID -> JID -> Message pushRequest = gitAnnexMessage $ gitAnnexTag pushRequestAttr T.empty |