signal-desktop/libtextsecure/protobufs.js
lilia 859d49b3f4
Use relative paths
// FREEBIE
2017-09-14 16:53:34 -07:00

18 lines
602 B
JavaScript

;(function() {
'use strict';
window.textsecure = window.textsecure || {};
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];
}
});
};
loadProtoBufs('IncomingPushMessageSignal.proto');
loadProtoBufs('SubProtocol.proto');
loadProtoBufs('DeviceMessages.proto');
})();