* Remember the available public keys for later and set the recipients proposal gotten from the webmail ui to the editor * @param {Array} options.keys A list of all available public keys from the local keychain * @param {Array} options.recipients recipients gather from the webmail ui
({keys, to, cc})
| 152 | * @param {Array} options.recipients recipients gather from the webmail ui |
| 153 | */ |
| 154 | onPublicKeyUserids({keys, to, cc}) { |
| 155 | const markPending = list => list.map(r => r.checkServer ? {...r, lookupPending: true} : r); |
| 156 | to = markPending(to); |
| 157 | cc = markPending(cc); |
| 158 | // initiate key lookup if they aren't found locally |
| 159 | // we do it in the editor (not in the controller), because we'd like the UI to be dynamically updated |
| 160 | this.keyLookup([...to, ...cc]); |
| 161 | this.setState({ |
| 162 | publicKeys: keys, |
| 163 | recipients: to, |
| 164 | recipientsCc: cc, |
| 165 | showRecipientsCc: cc.length > 0, |
| 166 | encryptDisabled: !to.length |
| 167 | }); |
| 168 | } |
| 169 | |
| 170 | onKeyUpdate({keys}) { |
| 171 | this.setState({publicKeys: keys}); |
nothing calls this directly
no test coverage detected