(options)
| 278 | } |
| 279 | |
| 280 | async encryptMessage(options) { |
| 281 | options.unlockKey = async options => { |
| 282 | options.reason = 'PWD_DIALOG_REASON_SIGN'; |
| 283 | const result = await this.unlockKey(options); |
| 284 | return result; |
| 285 | }; |
| 286 | if (prefs.prefs.general.auto_add_primary) { |
| 287 | // get the sender key fingerprint |
| 288 | const defaultKeyFpr = await getDefaultKeyFpr(MAIN_KEYRING_ID); |
| 289 | if (defaultKeyFpr && !options.encryptionKeyFprs.includes(defaultKeyFpr)) { |
| 290 | options.encryptionKeyFprs.push(defaultKeyFpr); |
| 291 | } |
| 292 | } |
| 293 | return encryptMessage(options); |
| 294 | } |
| 295 | |
| 296 | async encryptFile(options) { |
| 297 | options.unlockKey = async options => { |
no test coverage detected