|
|
|
@ -160,9 +160,19 @@ var archiveDocument = function (Env, Server, cb, data) {
|
|
|
|
|
switch (id.length) {
|
|
|
|
|
case 32:
|
|
|
|
|
// TODO disconnect users from active sessions
|
|
|
|
|
return void Env.msgStore.archiveChannel(id, cb);
|
|
|
|
|
return void Env.msgStore.archiveChannel(id, Util.both(cb, function (err) {
|
|
|
|
|
Env.Log.info("ARCHIVAL_CHANNEL_BY_ADMIN_RPC", {
|
|
|
|
|
channelId: id,
|
|
|
|
|
status: err? String(err): "SUCCESS",
|
|
|
|
|
});
|
|
|
|
|
}));
|
|
|
|
|
case 48:
|
|
|
|
|
return void Env.blobStore.archive.blob(id, cb);
|
|
|
|
|
return void Env.blobStore.archive.blob(id, Util.both(cb, function (err) {
|
|
|
|
|
Env.Log.info("ARCHIVAL_BLOB_BY_ADMIN_RPC", {
|
|
|
|
|
id: id,
|
|
|
|
|
status: err? String(err): "SUCCESS",
|
|
|
|
|
});
|
|
|
|
|
}));
|
|
|
|
|
default:
|
|
|
|
|
return void cb("INVALID_ID_LENGTH");
|
|
|
|
|
}
|
|
|
|
|