Skip to content

Commit

Permalink
feat: add emoji interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
bbb169 committed Oct 22, 2023
1 parent f954221 commit eb80cf3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bin/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,15 @@ websocketIo.on('connection', socket => {
});
});

socket.on('sendEmoji', (msg) => {
reportDataToAllPlayersInRoom({
roomId,
excludePlayerName: [],
data: msg,
evtKey: 'receiveEmoji',
});
});

// ================== handle disconnect =====================
// delete player from waiting room when it disconnects
socket.on('disconnect', () => {
Expand Down

0 comments on commit eb80cf3

Please sign in to comment.