Store file upload history on server
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user