Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to Olm 2.0 #309

Merged
merged 1 commit into from
Dec 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
"watchify": "^3.2.1"
},
"optionalDependencies": {
"olm": "https://matrix.org/packages/npm/olm/olm-1.3.0.tgz"
"olm": "https://matrix.org/packages/npm/olm/olm-2.0.0.tgz"
}
}
18 changes: 12 additions & 6 deletions spec/integ/megolm.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,9 +548,11 @@ describe("megolm", function() {
'PUT', '/send/'
).respond(200, function(path, content) {
var ct = content.ciphertext;
var decrypted = JSON.parse(inboundGroupSession.decrypt(ct));
var r = inboundGroupSession.decrypt(ct);
console.log('Decrypted received megolm message', r);

console.log('Decrypted received megolm message', decrypted);
expect(r.message_index).toEqual(0);
var decrypted = JSON.parse(r.plaintext);
expect(decrypted.type).toEqual('m.room.message');
expect(decrypted.content.body).toEqual('test');

Expand Down Expand Up @@ -795,8 +797,10 @@ describe("megolm", function() {
'PUT', '/send/'
).respond(200, function(path, content) {
var ct = content.ciphertext;
decrypted = JSON.parse(inboundGroupSession.decrypt(ct));
console.log('Decrypted received megolm message', decrypted);
var r = inboundGroupSession.decrypt(ct);
console.log('Decrypted received megolm message', r);
decrypted = JSON.parse(r.plaintext);

return {
event_id: '$event_id',
};
Expand Down Expand Up @@ -838,9 +842,11 @@ describe("megolm", function() {
'PUT', '/send/'
).respond(200, function(path, content) {
var ct = content.ciphertext;
var decrypted = JSON.parse(inboundGroupSession.decrypt(ct));
var r = inboundGroupSession.decrypt(ct);
console.log('Decrypted received megolm message', r);

console.log('Decrypted received megolm message', decrypted);
expect(r.message_index).toEqual(0);
var decrypted = JSON.parse(r.plaintext);
expect(decrypted.type).toEqual('m.room.message');
expect(decrypted.content.body).toEqual('test');

Expand Down
2 changes: 1 addition & 1 deletion spec/unit/crypto.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ describe("Crypto", function() {
}

it("Crypto exposes the correct olm library version", function() {
expect(Crypto.getOlmVersion()).toEqual([1, 3, 0]);
expect(Crypto.getOlmVersion()).toEqual([2, 0, 0]);
});
});