improve saveMessage (switch to class) and started to test

This commit is contained in:
grimhilt
2023-03-29 21:00:43 +02:00
parent 053213eecb
commit 1a63b3154a
9 changed files with 366 additions and 149 deletions

View File

@@ -1,7 +1,3 @@
function isDmOnEnvelope(envelope) {
return nbMembers(envelope) === 2;
}
function nbMembers(envelope) {
let nbMembers =
(envelope.bcc?.length ?? 0) +
@@ -18,6 +14,5 @@ function nbMembers(envelope) {
}
module.exports = {
isDmOnEnvelope,
nbMembers,
};