Fix the issue where attachments are not properly encoded in chat.postMessage