Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
Add id & convert lot to JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
nicodh committed Apr 11, 2020
1 parent d61737b commit cf2f2d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/deltachat.ts
Expand Up @@ -105,7 +105,11 @@ export class DeltaChat extends EventEmitter {
checkQrCode (qrCode:string) {
debug(`checkQrCode ${qrCode}`)
const dc_lot = binding.dcn_check_qr(this.dcn_context, qrCode)
return dc_lot ? new Lot(dc_lot) : null
let result = dc_lot ? new Lot(dc_lot) : null
if (result) {
return {id: result.getId(), ...result.toJson()}
}
return result;
}

close (cb = noop) {
Expand Down

0 comments on commit cf2f2d3

Please sign in to comment.