({selector, armored, keyringId, options = {}})
| 147 | } |
| 148 | |
| 149 | function displayContainer({selector, armored, keyringId, options = {}}) { |
| 150 | let container; |
| 151 | switch (getMessageType(armored)) { |
| 152 | case PGP_MESSAGE: |
| 153 | container = new DecryptContainer(selector, keyringId, options); |
| 154 | break; |
| 155 | case PGP_SIGNATURE: |
| 156 | throw new MvError('PGP signatures not supported.', 'WRONG_ARMORED_TYPE'); |
| 157 | case PGP_PUBLIC_KEY: |
| 158 | throw new MvError('PGP keys not supported.', 'WRONG_ARMORED_TYPE'); |
| 159 | default: |
| 160 | throw new MvError('No valid armored block found.', 'WRONG_ARMORED_TYPE'); |
| 161 | } |
| 162 | return container.create(armored); |
| 163 | } |
| 164 | |
| 165 | function editorContainer({selector, keyringId, options = {}}) { |
| 166 | if (options.quotedMailIndent === undefined && !options.armoredDraft) { |
nothing calls this directly
no test coverage detected