From 3bf16f1c7515874be6542a5da52b01e3dbc66d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 13 Jul 2023 21:25:32 -0400 Subject: [PATCH] no need to store 0 for all messages for deleted and system, if its missing it defaults to 0 --- src/messaging/create.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/messaging/create.js b/src/messaging/create.js index fa83a22c42..ed6b0b6a33 100644 --- a/src/messaging/create.js +++ b/src/messaging/create.js @@ -48,10 +48,12 @@ module.exports = function (Messaging) { timestamp: timestamp, fromuid: uid, roomId: roomId, - deleted: 0, - system: data.system || 0, }; + if (data.system) { + message.system = data.system; + } + if (data.ip) { message.ip = data.ip; }