no need to store 0 for all messages

for deleted and system, if its missing it defaults to 0
This commit is contained in:
Barış Soner Uşaklı
2023-07-13 21:25:32 -04:00
parent bc8dbc2084
commit 3bf16f1c75

View File

@@ -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;
}