Send a more precise message when the history is synced

This commit is contained in:
yflory 2016-08-31 17:58:57 +02:00
parent 168338b898
commit dcc3b6cd21

View file

@ -157,7 +157,8 @@ const handleMessage = function (ctx, user, msg) {
getHistory(ctx, parsed[1], function (msg) {
sendMsg(ctx, user, [0, HISTORY_KEEPER_ID, 'MSG', user.id, JSON.stringify(msg)]);
}, function () {
sendMsg(ctx, user, [0, HISTORY_KEEPER_ID, 'MSG', user.id, 0]);
let parsedMsg = {state: 1, channel: parsed[1]};
sendMsg(ctx, user, [0, HISTORY_KEEPER_ID, 'MSG', user.id, JSON.stringify(parsedMsg)]);
});
}
return;