(raw, encoding)
| 71 | } |
| 72 | |
| 73 | async function parseInline(raw, encoding) { |
| 74 | // raw is a JS binary string of UTF-8 bytes — decode to a display-ready Unicode string once here. |
| 75 | const text = new TextDecoder('utf-8').decode(str2Uint8Array(raw)); |
| 76 | let message = ''; |
| 77 | if (encoding === 'html') { |
| 78 | message = await mvelo.util.text2autoLinkHtml(text); |
| 79 | } else { |
| 80 | message = html2textIfHtml(text); |
| 81 | } |
| 82 | return {message, attachments: []}; |
| 83 | } |
| 84 | |
| 85 | /** |
| 86 | * Parse message with detached signature |
no test coverage detected