Store file upload history on server

This commit is contained in:
Torjus
2018-07-31 09:56:29 +02:00
parent 8b6ebe39b2
commit 35b3da155d
4 changed files with 60 additions and 1 deletions
+15
View File
@@ -28,6 +28,8 @@ class Room extends EventEmitter
this._chatHistory = [];
this._fileHistory = [];
try
{
// Protoo Room instance.
@@ -278,6 +280,8 @@ class Room extends EventEmitter
const { file } = request.data;
this._fileHistory.push(file);
this._protooRoom.spread('file-receive', {
file
}, [ protooPeer ]);
@@ -285,6 +289,17 @@ class Room extends EventEmitter
break;
}
case 'file-history':
{
accept();
protooPeer.send('file-history-receive', {
fileHistory: this._fileHistory
});
break;
}
case 'raisehand-message':
{
accept();