stub encode_attachments