Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging

pull/1/head
yflory 6 years ago
commit fe429885dd

@ -211,28 +211,6 @@ var send404 = function (res, path) {
}); });
}; };
var FONT_NAME_MAP = {};
[ './www/common/onlyoffice/fonts/' ].forEach(function (path) {
Fs.readdir(path, function (err, list) {
if (err) { throw err; }
list.forEach(function (fontName) {
FONT_NAME_MAP[fontName.toLowerCase()] = path + fontName;
});
});
});
/* Code to automatically transform font to js */
/* Currently not active, but might be necessary */
app.use("/common/onlyoffice/fonts/odttf/:name", function (req, res) {
var name = req.params.name.replace(/\.js$/, '').toLowerCase();
var path = Path.join('./www/common/onlyoffice/fonts/odttf/', name);
console.log(path);
Fs.createReadStream(path).pipe(res).on('error', function (e) {
console.error(e);
res.status(404).send('No such font');
});
});
/* All fonts file replaced by the list of fonts in ttf */ /* All fonts file replaced by the list of fonts in ttf */
app.use("/common/onlyoffice/sdkjs/common/AllFonts.js", app.use("/common/onlyoffice/sdkjs/common/AllFonts.js",
Express.static("./www/common/onlyoffice/AllFonts.js")); Express.static("./www/common/onlyoffice/AllFonts.js"));

@ -162,6 +162,7 @@ const mkOffsetCounter = () => {
const readMessagesBin = (env, id, start, msgHandler, cb) => { const readMessagesBin = (env, id, start, msgHandler, cb) => {
const stream = Fs.createReadStream(mkPath(env, id), { start: start }); const stream = Fs.createReadStream(mkPath(env, id), { start: start });
// TODO get the channel and add the atime
let keepReading = true; let keepReading = true;
Pull( Pull(
ToPull.read(stream), ToPull.read(stream),

Loading…
Cancel
Save