Browse Source

Fixed file send

master
Igor Zhukov 10 years ago
parent
commit
542affc671
  1. 2
      app/js/lib/mtproto.js
  2. 4
      app/js/lib/tl_utils.js

2
app/js/lib/mtproto.js

@ -30,8 +30,6 @@ angular.module('izhukov.mtproto', ['izhukov.utils']) @@ -30,8 +30,6 @@ angular.module('izhukov.mtproto', ['izhukov.utils'])
{id: 5, url: 'http://149.154.171.5'}
]);
var sslSubdomains = 'pluto,venus,aurora,vesta,flora';
var chosenServers = {};
function chooseServer(dcID) {

4
app/js/lib/tl_utils.js

@ -148,6 +148,9 @@ TLSerialization.prototype.storeString = function (s, field) { @@ -148,6 +148,9 @@ TLSerialization.prototype.storeString = function (s, field) {
TLSerialization.prototype.storeBytes = function (bytes, field) {
if (bytes instanceof ArrayBuffer) {
bytes = new Uint8Array(bytes);
}
this.debug && console.log('>>>', bytesToHex(bytes), (field || '') + ':bytes');
var len = bytes.byteLength || bytes.length;
@ -160,6 +163,7 @@ TLSerialization.prototype.storeBytes = function (bytes, field) { @@ -160,6 +163,7 @@ TLSerialization.prototype.storeBytes = function (bytes, field) {
this.byteView[this.offset++] = (len & 0xFF00) >> 8;
this.byteView[this.offset++] = (len & 0xFF0000) >> 16;
}
this.byteView.set(bytes, this.offset);
this.offset += len;

Loading…
Cancel
Save