From 75af390f4b816a2c681acd3c06cbe225c6f6d8bd Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Sat, 25 Feb 2017 15:05:06 -0500 Subject: [PATCH] Send presence when subscribed --- Main.hs | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/Main.hs b/Main.hs index d316ba6..388da5d 100644 --- a/Main.hs +++ b/Main.hs @@ -141,6 +141,20 @@ code str status = <> hasAttributeText (fromString "code") (== fromString str) status +cheogramAvailable from to = + (emptyPresence PresenceAvailable) { + presenceTo = Just to, + presenceFrom = Just from, + presencePayloads = [ + Element (s"{http://jabber.org/protocol/caps}c") [ + (s"{http://jabber.org/protocol/caps}hash", [ContentText $ fromString "sha-1"]), + (s"{http://jabber.org/protocol/caps}node", [ContentText $ fromString "xmpp:cheogram.com"]), + -- gateway/sms//Cheogram SMS Gateway