aboutsummaryrefslogtreecommitdiff
path: root/src/client/DocServer.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/DocServer.ts')
-rw-r--r--src/client/DocServer.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/DocServer.ts b/src/client/DocServer.ts
index 9683eab45..00f9877c3 100644
--- a/src/client/DocServer.ts
+++ b/src/client/DocServer.ts
@@ -1,6 +1,6 @@
import * as io from 'socket.io-client';
import { MessageStore, YoutubeQueryTypes, GestureContent, MobileInkOverlayContent, UpdateMobileInkOverlayPositionContent, MobileDocumentUploadContent } from "./../server/Message";
-import { Opt, Doc, fetchProto, FieldsSym, UpdatingFromServer } from '../fields/Doc';
+import { Opt, Doc, UpdatingFromServer } from '../fields/Doc';
import { Utils, emptyFunction } from '../Utils';
import { SerializationHelper } from './util/SerializationHelper';
import { RefField } from '../fields/RefField';
@@ -10,6 +10,7 @@ import MobileInkOverlay from '../mobile/MobileInkOverlay';
import { runInAction } from 'mobx';
import { ObjectField } from '../fields/ObjectField';
import { StrCast } from '../fields/Types';
+import * as rp from 'request-promise';
/**
* This class encapsulates the transfer and cross-client synchronization of
@@ -34,6 +35,12 @@ export namespace DocServer {
if (doc instanceof Doc) strings.push(StrCast(doc.author) + " " + StrCast(doc.title) + " " + StrCast(Doc.GetT(doc, "title", "string", true)));
});
strings.sort().forEach((str, i) => console.log(i.toString() + " " + str));
+ rp.post(Utils.prepend("/setCacheDocumentIds"), {
+ body: {
+ cacheDocumentIds: Array.from(Object.keys(_cache)).join(";"),
+ },
+ json: true,
+ });
}
export let _socket: SocketIOClient.Socket;
// this client's distinct GUID created at initialization