diff options
Diffstat (limited to 'src/client/DocServer.ts')
-rw-r--r-- | src/client/DocServer.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/DocServer.ts b/src/client/DocServer.ts index 0da4dc08d..ad39529df 100644 --- a/src/client/DocServer.ts +++ b/src/client/DocServer.ts @@ -38,9 +38,15 @@ export namespace DocServer { }); strings.sort().forEach((str, i) => console.log(i.toString() + ' ' + str)); } + const filtered = Array.from(Object.keys(_cache)).filter(key => { + const doc = _cache[key] as Doc; + if (!(StrCast(doc.author).includes(".edu")||StrCast(doc.author).includes(".com")) || doc.author == Doc.CurrentUserEmail) return true; + return false; + }); + rp.post(Utils.prepend('/setCacheDocumentIds'), { body: { - cacheDocumentIds: Array.from(Object.keys(_cache)).join(';'), + cacheDocumentIds: filtered.join(';'), }, json: true, }); |