diff --git a/dist/libsignal-protocol.js b/dist/libsignal-protocol.js index 414ad59..4671f7c 100644 --- a/dist/libsignal-protocol.js +++ b/dist/libsignal-protocol.js @@ -36124,9 +36124,18 @@ SessionCipher.prototype = { preKeyMsg.message = message; var result = String.fromCharCode((3 << 4) | 3) + util.toString(preKeyMsg.encode()); - return {type: 3, body: result}; + return { + type : 3, + body : result, + registrationId : record.registrationId + }; + } else { - return {type: 1, body: util.toString(message)}; + return { + type : 1, + body : util.toString(message), + registrationId : record.registrationId + }; } }); }.bind(this)); diff --git a/src/SessionCipher.js b/src/SessionCipher.js index 71cb43e..5c6b914 100644 --- a/src/SessionCipher.js +++ b/src/SessionCipher.js @@ -94,9 +94,18 @@ SessionCipher.prototype = { preKeyMsg.message = message; var result = String.fromCharCode((3 << 4) | 3) + util.toString(preKeyMsg.encode()); - return {type: 3, body: result}; + return { + type : 3, + body : result, + registrationId : record.registrationId + }; + } else { - return {type: 1, body: util.toString(message)}; + return { + type : 1, + body : util.toString(message), + registrationId : record.registrationId + }; } }); }.bind(this));