@@ 132,7 132,6 @@ messageErrorHandler replyMap message = do
iqGetHandler :: XMPP.IQ -> XMPP.XMPP ()
iqGetHandler iq@XMPP.IQ {
- XMPP.iqType = XMPP.IQGet,
XMPP.iqTo = Just to,
XMPP.iqPayload = Just p
} | Nothing <- XMPP.jidNode to,
@@ 147,6 146,22 @@ iqGetHandler iq@XMPP.IQ {
where
nodeAttribute = fmap (\node -> (s"node", [XML.ContentText node])) $
XML.attributeText (s"node") p
+iqGetHandler iq@XMPP.IQ {
+ XMPP.iqTo = Just to,
+ XMPP.iqPayload = Just p
+} | Nothing <- XMPP.jidNode to,
+ [_] <- XML.isNamed (s"{vcard-temp}vCard") p =
+ XMPP.putStanza $ flip iqReply iq $ Just $ XML.Element
+ (s"{vcard-temp}vCard") [] [
+ XML.NodeElement $ mkElement (s"{vcard-temp}URL")
+ (s"https://smtp.cheogram.com"),
+ XML.NodeElement $ mkElement (s"{vcard-temp}DESC") (s"\
+ \A bidirectional gateway between XMPP and SMTP.\
+ \\n\nLicensed under AGPLv3+.\n\nSource code \
+ \for this gateway is available from \
+ \the listed homepage.\n\n\
+ \Part of the Soprani.ca project.")
+ ]
iqGetHandler iq = XMPP.putStanza $ iqError notImplemented iq
main :: IO ()