~singpolyma/cheogram-smtp

d15f1442525ea910dfb3c00b7a226579174c2768 — Stephen Paul Weber 4 days ago 7b8fb82
Add file extension for webxdc
1 files changed, 5 insertions(+), 1 deletions(-)

M Email.hs
M Email.hs => Email.hs +5 -1
@@ 54,7 54,11 @@ mimeTypeTuple mimeBytes = (CI.mk typ, CI.mk sub)

mimeToExtMap :: SMap.Map (CI.CI ByteString, CI.CI ByteString) Text
mimeToExtMap = SMap.fromList $
	(\xs -> ((CI.mk $ s"audio", CI.mk $ s"amr"), s"amr") : xs) $
	(\xs ->
		((CI.mk $ s"audio", CI.mk $ s"amr"), s"amr")
		: ((CI.mk $ s"application", CI.mk $ s"webxdc+zip"), s"xdc")
		: xs
	) $
	mapMaybe (\(ext, mimeBytes) ->
		if ext `elem` badExts then
			Nothing