From a19fd3299573802770df4bfca77563bad160ab3e Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 26 Jan 2016 15:01:05 -0500 Subject: [PATCH] Include caps hash in presence Close #26 --- Main.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Main.hs b/Main.hs index 7c39306..53d4596 100644 --- a/Main.hs +++ b/Main.hs @@ -488,7 +488,15 @@ componentStanza _ _ toComponent _ (ReceivedPresence (Presence { presenceType = P componentStanza _ _ toComponent _ (ReceivedPresence (Presence { presenceType = PresenceAvailable, presenceFrom = Just from, presenceTo = Just to@JID { jidNode = Nothing } })) = writeStanzaChan toComponent $ (emptyPresence PresenceAvailable) { presenceTo = Just from, - presenceFrom = Just to + presenceFrom = Just to, + presencePayloads = [ + Element (fromString "{http://jabber.org/protocol/caps}c") [ + (fromString "{http://jabber.org/protocol/caps}hash", [ContentText $ fromString "sha-1"]), + (fromString "{http://jabber.org/protocol/caps}node", [ContentText $ fromString "xmpp:sms.cheogram.com"]), + -- gateway/sms//Cheogram SMS Gateway