Cable-Desktop/libaxolotl/protobufs.js
lilia 65c70a9117 Fix provisioning flow
Fix undefined axolotl.protobufs.ProvisionMessage, referenced in
libaxolotl/protocol.js
2015-02-12 16:41:04 -08:00

18 lines
795 B
JavaScript

;(function() {
function loadProtoBufs(filename) {
return dcodeIO.ProtoBuf.loadProtoFile({root: 'protos', file: filename}).build('textsecure');
};
var protocolMessages = loadProtoBufs('WhisperTextProtocol.proto');
var deviceMessages = loadProtoBufs('DeviceMessages.proto');
window.axolotl = window.axolotl || {};
window.axolotl.protobuf = {
WhisperMessage : protocolMessages.WhisperMessage,
PreKeyWhisperMessage : protocolMessages.PreKeyWhisperMessage,
DeviceInit : deviceMessages.DeviceInit,
IdentityKey : deviceMessages.IdentityKey,
DeviceControl : deviceMessages.DeviceControl,
ProvisionMessage : deviceMessages.ProvisionMessage,
};
})();