add env var to enable and disable collecting all service envelopes
This commit is contained in:
parent
984d996e4a
commit
24fdcdb707
1 changed files with 17 additions and 15 deletions
|
|
@ -91,6 +91,7 @@ client.on("message", async (topic, message) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// create service envelope in db
|
// create service envelope in db
|
||||||
|
if(process.env.MM_COLLECT_SERVICE_ENVELOPES === "true"){
|
||||||
try {
|
try {
|
||||||
await prisma.serviceEnvelope.create({
|
await prisma.serviceEnvelope.create({
|
||||||
data: {
|
data: {
|
||||||
|
|
@ -107,6 +108,7 @@ client.on("message", async (topic, message) => {
|
||||||
envelope: envelope.packet,
|
envelope: envelope.packet,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// attempt to decrypt encrypted packets
|
// attempt to decrypt encrypted packets
|
||||||
const isEncrypted = envelope.packet.encrypted?.length > 0;
|
const isEncrypted = envelope.packet.encrypted?.length > 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue