js: decrypt callback is_mime fix

--

* src/gpgmejs: is_mime should report its' counterpart. Also,
  file_name is not optional in specification. We'll send null if
  there is no file_name
This commit is contained in:
Maximilian Krambach 2018-08-17 17:44:06 +02:00
parent 8e87790db3
commit 5b0f8230b2

View File

@ -193,9 +193,11 @@ export class GpgME {
msg.post().then(function(result){
let _result = {data: result.data};
_result.base64 = result.base64 ? true: false;
_result.is_mime = result.mime ? true: false;
_result.is_mime = result.is_mime ? true: false;
if (result.file_name){
_result.file_name = result.file_name;
} else {
_result.file_name = null;
}
if (
result.hasOwnProperty('signatures') &&