File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ module.exports = class Encrypt extends IMiddleware {
3737 const reply = new Message ( { msg : ctx . output } )
3838 const sender = Identity . fromString ( senderStr )
3939
40- const payload = await reply . encrypt ( ctx . party . privateIdentity , sender . key )
40+ const payload = ( await reply . encrypt ( ctx . party . privateIdentity , sender . key ) ) . toJSON ( )
4141
4242 ctx . debug ( 'setting payload' , payload )
4343 ctx . setOutput ( payload )
Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ module.exports = class Decrypt extends IMiddleware {
3838 context . debug ( 'input' , context . input , typeof context . input )
3939
4040
41- const msg = new Message ( context . input )
41+ const msg = new Message ( )
42+ msg . fromJSON ( context . input )
4243 context . debug ( 'privateIdentity' , context . party . privateIdentity . id )
4344
4445 const publicKeys = Routines . extractPublicKeys ( msg . enc )
You can’t perform that action at this time.
0 commit comments