diff --git a/app/js/lib/mtproto.js b/app/js/lib/mtproto.js index 3a640a8e..f9fb040d 100644 --- a/app/js/lib/mtproto.js +++ b/app/js/lib/mtproto.js @@ -997,7 +997,9 @@ factory('MtpRsaKeysManager', function () { }; }). -service('MtpSecureRandom', SecureRandom). +service('MtpSecureRandom', function () { + return new SecureRandom(); +}). factory('MtpMessageIdGenerator', function (AppConfigManager) { var lastMessageID = [0, 0], @@ -2475,7 +2477,7 @@ factory('MtpApiManager', function (AppConfigManager, MtpAuthorizer, MtpNetworker AppConfigManager.set({dc: baseDcID = newDcID}); } - mtpGetNetworker(newDcID).then(function (networker) { + mtpGetNetworker(newDcID, options).then(function (networker) { networker.wrapApiCall(method, params, options).then(function (result) { deferred.resolve(result); }, function (error) { diff --git a/gulpfile.js b/gulpfile.js index a81ed526..9feb1b37 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -21,7 +21,7 @@ gulp.task('usemin', ['templates', 'enable-production'], function() { return gulp.src('app/index.html') .pipe($.usemin({ html: [$.minifyHtml({empty: true})], - js: ['concat', $.rev()], + js: [$.ngmin(), $.uglify(), 'concat', $.rev()], css: [$.minifyCss(), 'concat'] })) .pipe(gulp.dest('dist')); diff --git a/package.json b/package.json index d59b6ec6..055b59dd 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "gulp-grep-stream": "0.0.2", "event-stream": "^3.1.0", "gulp-zip": "^0.1.2", - "gulp-manifest": "0.0.3" + "gulp-manifest": "0.0.3", + "gulp-ngmin": "~0.1.2" } }