From d7e9498143c9ba8d4626e459828663d14efc134e Mon Sep 17 00:00:00 2001 From: Caleb James DeLisle Date: Mon, 23 Oct 2017 14:22:33 +0300 Subject: [PATCH] Fix and then disable the new OT --- www/common/sframe-app-framework.js | 7 +++++-- www/common/sframe-chainpad-netflux-inner.js | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/www/common/sframe-app-framework.js b/www/common/sframe-app-framework.js index d83086fb2..2bb6090aa 100644 --- a/www/common/sframe-app-framework.js +++ b/www/common/sframe-app-framework.js @@ -362,8 +362,11 @@ define([ }).nThen(function (waitFor) { cpNfInner = common.startRealtime({ // really basic operational transform - //transformFunction: options.transformFunction || JsonOT.validate, - patchTransformer: options.patchTransformer || JsonOT.patchTransformer, + transformFunction: options.transformFunction || JsonOT.validate, + + // This one causes a big mess. + //patchTransformer: options.patchTransformer || JsonOT.patchTransformer, + // cryptpad debug logging (default is 1) // logLevel: 0, validateContent: options.validateContent || function (content) { diff --git a/www/common/sframe-chainpad-netflux-inner.js b/www/common/sframe-chainpad-netflux-inner.js index 34e0a2284..0f150842c 100644 --- a/www/common/sframe-chainpad-netflux-inner.js +++ b/www/common/sframe-chainpad-netflux-inner.js @@ -38,6 +38,7 @@ define([ var userName = config.userName; var initialState = config.initialState; var transformFunction = config.transformFunction; + var patchTransformer = config.patchTransformer; var validateContent = config.validateContent; var avgSyncMilliseconds = config.avgSyncMilliseconds; var logLevel = typeof(config.logLevel) !== 'undefined'? config.logLevel : 1; @@ -50,6 +51,7 @@ define([ userName: userName, initialState: initialState, transformFunction: transformFunction, + patchTransformer: patchTransformer, validateContent: validateContent, avgSyncMilliseconds: avgSyncMilliseconds, logLevel: logLevel