You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			26 lines
		
	
	
		
			871 B
		
	
	
	
		
			JavaScript
		
	
			
		
		
	
	
			26 lines
		
	
	
		
			871 B
		
	
	
	
		
			JavaScript
		
	
| ;(function() {
 | |
|     'use strict';
 | |
|     window.textsecure = window.textsecure || {};
 | |
|     window.textsecure.protobuf = {};
 | |
| 
 | |
|     function loadProtoBufs(filename) {
 | |
|         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];
 | |
|             }
 | |
|         });
 | |
|     };
 | |
| 
 | |
|     loadProtoBufs('IncomingPushMessageSignal.proto');
 | |
|     loadProtoBufs('SubProtocol.proto');
 | |
|     loadProtoBufs('DeviceMessages.proto');
 | |
| })();
 |