Spaces:
Sleeping
Sleeping
Download sockets/Notification.js from merasabkuch/RaptusBackend: direct link, hf CLI and curl.
- Browser
- Download file 838 Bytes
-
https://huggingface.co/spaces/merasabkuch/RaptusBackend/resolve/main/sockets/Notification.js
- Command line
-
hf download hf://spaces/merasabkuch/RaptusBackend/sockets/Notification.js
-
curl -L -o Notification.js https://huggingface.co/spaces/merasabkuch/RaptusBackend/resolve/main/sockets/Notification.js
838 Bytes
| let io; | |
| module.exports.initialize = function initialize(ioInstance) { | |
| io = ioInstance; | |
| } | |
| module.exports.collaborativeNotification = function collaborativeNotification(board,message) { | |
| const roomID1 = board.TeamID1.toString(); | |
| io.to(roomID1).emit('notification',message); | |
| const roomID2 = board.TeamID2.toString(); | |
| io.to(roomID2).emit('notification', message); | |
| } | |
| module.exports.teamNotification = function teamNotification(user,message) { | |
| const roomID = user.TeamID.toString(); | |
| io.to(roomID).emit('notification',message); | |
| } | |
| module.exports.roomNotification = function roomNotification(user,message) { | |
| const roomID = user.RoomID.toString(); | |
| io.to(roomID).emit('notification',message); | |
| } | |
| module.exports.userNotification = function userNotification(message) { | |
| io.sockets.emit('notification',message); | |
| } | |