Remove test/protos symlink, use window.PROTO_ROOT for config
This commit is contained in:
parent
f4aa6d93a7
commit
3a3aa3efb6
6 changed files with 27 additions and 14 deletions
|
@ -37095,11 +37095,18 @@ Internal.SessionLock.queueJobForNumber = function queueJobForNumber(number, runJ
|
|||
window.textsecure.protobuf = {};
|
||||
|
||||
function loadProtoBufs(filename) {
|
||||
return dcodeIO.ProtoBuf.loadProtoFile({root: 'protos', file: filename}, function(error, result) {
|
||||
var protos = result.build('textsecure');
|
||||
for (var protoName in protos) {
|
||||
textsecure.protobuf[protoName] = protos[protoName];
|
||||
}
|
||||
return dcodeIO.ProtoBuf.loadProtoFile({root: window.PROTO_ROOT, file: filename}, function(error, result) {
|
||||
if (error) {
|
||||
throw error;
|
||||
}
|
||||
var protos = result.build('textsecure');
|
||||
if (!protos) {
|
||||
var text = 'Error loading protos from ' + filename + ' (root: ' + window.PROTO_ROOT + ')';
|
||||
throw new Error(text);
|
||||
}
|
||||
for (var protoName in protos) {
|
||||
textsecure.protobuf[protoName] = protos[protoName];
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue