summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2bc1332)
so that the images are just as persistent as the comments
io.on('connection', (socket) => {
io.on('connection', (socket) => {
- // Replay old comments to a newly-joining client
+ // Replay old comments and images to a newly-joining client
state.comments.forEach((comment) => {
socket.emit('comment', comment)
});
state.comments.forEach((comment) => {
socket.emit('comment', comment)
});
+ state.images.forEach((image) => {
+ socket.emit('image', image)
+ });
// When any client comments, send that to all clients (including sender)
socket.on('comment', (comment) => {
// When any client comments, send that to all clients (including sender)
socket.on('comment', (comment) => {