Give libtextsecure its own components (with way fewer deps)
This commit is contained in:
parent
899d756469
commit
07899557dc
7 changed files with 18237 additions and 11 deletions
|
@ -10,6 +10,11 @@ module.exports = function(grunt) {
|
|||
components.push('components/' + bower.concat.app[i] + '/**/*.js');
|
||||
}
|
||||
|
||||
var libcomponents = [];
|
||||
for (i in bower.concat.lib) {
|
||||
libcomponents.push('components/' + bower.concat.lib[i] + '/**/*.js');
|
||||
}
|
||||
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
concat: {
|
||||
|
@ -17,6 +22,10 @@ module.exports = function(grunt) {
|
|||
src: components,
|
||||
dest: 'js/components.js',
|
||||
},
|
||||
libcomponents: {
|
||||
src: libcomponents,
|
||||
dest: 'libtextsecure/components.js',
|
||||
},
|
||||
curve25519: {
|
||||
src: [
|
||||
'build/curve25519_compiled.js',
|
||||
|
|
|
@ -99,6 +99,13 @@
|
|||
"libphonenumber-api",
|
||||
"momentjs",
|
||||
"native-client"
|
||||
],
|
||||
"lib": [
|
||||
"jquery",
|
||||
"long",
|
||||
"bytebuffer",
|
||||
"protobuf",
|
||||
"native-client"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2524,7 +2524,8 @@ window.textsecure.messaging = function() {
|
|||
});
|
||||
}
|
||||
|
||||
_.each(numbers, function(number) {
|
||||
for (var i in numbers) {
|
||||
var number = numbers[i];
|
||||
var devicesForNumber = textsecure.storage.devices.getDeviceObjectsForNumber(number);
|
||||
|
||||
var promises = [];
|
||||
|
@ -2544,7 +2545,7 @@ window.textsecure.messaging = function() {
|
|||
} else
|
||||
doSendMessage(number, devicesForNumber, true);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
makeAttachmentPointer = function(attachment) {
|
||||
|
|
18210
libtextsecure/components.js
Normal file
18210
libtextsecure/components.js
Normal file
File diff suppressed because it is too large
Load diff
|
@ -203,7 +203,8 @@ window.textsecure.messaging = function() {
|
|||
});
|
||||
}
|
||||
|
||||
_.each(numbers, function(number) {
|
||||
for (var i in numbers) {
|
||||
var number = numbers[i];
|
||||
var devicesForNumber = textsecure.storage.devices.getDeviceObjectsForNumber(number);
|
||||
|
||||
var promises = [];
|
||||
|
@ -223,7 +224,7 @@ window.textsecure.messaging = function() {
|
|||
} else
|
||||
doSendMessage(number, devicesForNumber, true);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
makeAttachmentPointer = function(attachment) {
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<script type="text/javascript" src="test.js"></script>
|
||||
<script type="text/javascript" src="blanket_mocha.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../../js/components.js"></script>
|
||||
<script type="text/javascript" src="../components.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../../js/curve25519_compiled.js"></script>
|
||||
<script type="text/javascript" src="../../js/nativeclient.js"></script>
|
||||
|
@ -52,8 +52,6 @@
|
|||
<script type="text/javascript" src="../protocol.js" data-cover></script>
|
||||
<script type="text/javascript" src="../sendmessage.js" data-cover></script>
|
||||
|
||||
<script type="text/javascript" src="../../js/chromium.js"></script>
|
||||
|
||||
<script type="text/javascript" src="fake_api.js"></script>
|
||||
<script type="text/javascript" src="testvectors.js"></script>
|
||||
<script type="text/javascript" src="curve25519_test.js"></script>
|
||||
|
|
|
@ -219,14 +219,14 @@ describe('Protocol', function() {
|
|||
};
|
||||
|
||||
describe("test vectors", function() {
|
||||
_.each(axolotlTestVectors, function(t, i) {
|
||||
it(t.name, function(done) {
|
||||
for (var i in axolotlTestVectors) {
|
||||
it(axolotlTestVectors[i].name, function(done) {
|
||||
localStorage.clear();
|
||||
return runAxolotlTest(t.vectors).then(function(res) {
|
||||
return runAxolotlTest(axolotlTestVectors[i].vectors).then(function(res) {
|
||||
assert(res);
|
||||
}).then(done).catch(done);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue