From f1e07bfb900c3f2ab929590cdece7f936daced59 Mon Sep 17 00:00:00 2001 From: Grant Date: Fri, 12 Jul 2024 03:21:53 -0600 Subject: [PATCH] Give user pixel back after they undo (fixes #77) --- packages/server/src/lib/SocketServer.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/server/src/lib/SocketServer.ts b/packages/server/src/lib/SocketServer.ts index 18cac90..be74daf 100644 --- a/packages/server/src/lib/SocketServer.ts +++ b/packages/server/src/lib/SocketServer.ts @@ -379,6 +379,9 @@ export class SocketServer { // mark the undo as used await user.setUndo(); + // give user pixel back + await user.modifyStack(1); + // trigger re-cache on redis await Canvas.refreshPixel(pixel.x, pixel.y);