formatAttachments :: [(T.Text, T.Text)] -> T.Text
formatAttachments pairs =
  decodeUtf8 . BC.toStrict . encode $ map mkAttachment pairs
    where
      mkAttachment (k,v) = Attachment
        { atId       = -1
        , atFallback = ""
        , atFields =
          [ AttachmentField
            { afTitle = k
            , afValue = v
            , afShort = False
            }
          ]
        }
formatAttachments :: [(T.Text, T.Text)] -> T.Text
formatAttachments pairs =
  decodeUtf8 . BC.toStrict . encode $ map mkAttachment pairs
    where
      mkAttachment (k,v) = Attachment
        { atId       = -1
        , atFallback = ""
        , atFields =
          [ AttachmentField
            { afTitle = k
            , afValue = v
            , afShort = False
            }
          ]
        }
formatAttachments pairs =
  decodeUtf8 . BC.toStrict . encode $ map mkAttachment pairs
    where
      mkAttachment (k,v) = Attachment
        { atId       = -1
        , atFallback = ""
        , atFields =
          [ AttachmentField
            { afTitle = k
            , afValue = v
            , afShort = False
            }
          ]
        }