~singpolyma/cheogram-smtp

dd13c277ea1e34f591a31f52b9d2f18d78d4675b — Stephen Paul Weber 7 months ago 5250b03
lint
3 files changed, 5 insertions(+), 8 deletions(-)

M Email.hs
M Util.hs
M test/IQManagerTest.hs
M Email.hs => Email.hs +1 -2
@@ 297,8 297,7 @@ mkMessageID domain now message = ((s"<" ++) . (++ s">")) $
mkReferences :: XMPP.Message -> Maybe ByteString
mkReferences =
	fmap (limitReferencesLength . encodeUtf8) .
	(T.stripPrefix (s"References: ") =<<) .
	fmap (mconcat . XML.elementText) .
	(T.stripPrefix (s"References: ") . mconcat . XML.elementText) <=<
	child (s"{jabber:component:accept}thread")

data EmailWithEnvelope = EmailWithEnvelope {

M Util.hs => Util.hs +3 -5
@@ 134,11 134,9 @@ errorPayload typ definedCondition english morePayload =
	XML.Element (s"{jabber:component:accept}error")
	[(s"type", [XML.ContentText $ fromString typ])]
	(
		(
			XML.NodeElement $ XML.Element definedConditionName [] []
		) :
		(
			XML.NodeElement $ XML.Element
		XML.NodeElement (XML.Element definedConditionName [] []) :
		XML.NodeElement (
				XML.Element
				(s"{urn:ietf:params:xml:ns:xmpp-stanzas}text")
				[(s"xml:lang", [XML.ContentText $ s"en"])]
				[XML.NodeContent $ XML.ContentText english]

M test/IQManagerTest.hs => test/IQManagerTest.hs +1 -1
@@ 18,7 18,7 @@ unit_iqManager = do
	iqReceived iqResult
	result <- atomically stm
	fmap XMPP.stanzaToElement result @?=
		(Just $ XMPP.stanzaToElement iqResult)
		Just (XMPP.stanzaToElement iqResult)
	where
	iqToSend = (XMPP.emptyIQ XMPP.IQSet) {
		XMPP.iqID = Just (s"theID")