From fdbdf83a0d8f37080b378837ffa634eb757dffa1 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Wed, 15 Jun 2022 19:11:52 +0800 Subject: [PATCH] Fix data type of `notification.isDefault` and `notification.active` (#1765) --- server/client.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/client.js b/server/client.js index f6f133d1..279acd3a 100644 --- a/server/client.js +++ b/server/client.js @@ -22,7 +22,10 @@ async function sendNotificationList(socket) { ]); for (let bean of list) { - result.push(bean.export()); + let notificationObject = bean.export(); + notificationObject.isDefault = (notificationObject.isDefault === 1); + notificationObject.active = (notificationObject.active === 1); + result.push(notificationObject); } io.to(socket.userID).emit("notificationList", result);