remove volatile because problems even on local connections (not drawn lines)

This commit is contained in:
raphael 2020-05-09 15:06:21 +02:00
parent 677f3d95a1
commit e3cec1a194
1 changed files with 2 additions and 2 deletions

View File

@ -202,14 +202,14 @@ function startBackendServer(port) {
if (smallestScreenResolutions && smallestScreenResolutions[whiteboardId] && socket && socket.id) { if (smallestScreenResolutions && smallestScreenResolutions[whiteboardId] && socket && socket.id) {
delete smallestScreenResolutions[whiteboardId][socket.id]; delete smallestScreenResolutions[whiteboardId][socket.id];
} }
socket.compress(false).volatile.broadcast.emit('refreshUserBadges', null); //Removes old user Badges socket.compress(false).broadcast.emit('refreshUserBadges', null); //Removes old user Badges
sendSmallestScreenResolution(); sendSmallestScreenResolution();
}); });
socket.on('drawToWhiteboard', function (content) { socket.on('drawToWhiteboard', function (content) {
content = escapeAllContentStrings(content); content = escapeAllContentStrings(content);
if (accessToken === "" || accessToken == content["at"]) { if (accessToken === "" || accessToken == content["at"]) {
socket.compress(false).volatile.broadcast.to(whiteboardId).emit('drawToWhiteboard', content); //Send to all users in the room (not own socket) socket.compress(false).broadcast.to(whiteboardId).emit('drawToWhiteboard', content); //Send to all users in the room (not own socket)
s_whiteboard.handleEventsAndData(content); //save whiteboardchanges on the server s_whiteboard.handleEventsAndData(content); //save whiteboardchanges on the server
} else { } else {
socket.emit('wrongAccessToken', true); socket.emit('wrongAccessToken', true);