Skip to content

Build your personal knowledge base with Trilium Notes

if the sender request contains a label and/or a labelValue, apply it (#1310)

Casey Dorana7c13ceacc34
diff --git a/src/routes/api/sender.js b/src/routes/api/sender.js
index dac2116d80..031c3fcf13 100644
--- a/src/routes/api/sender.js
+++ b/src/routes/api/sender.js
@@ -35,6 +35,14 @@ function saveNote(req) {
mime: 'text/html'
});
+ if (req.body.label && req.body.label.trim()){
+ let value;
+ if (req.body.labelValue && req.body.labelValue.trim()){
+ value = req.body.labelValue;
+ }
+ note.setLabel(req.body.label, value);
+ }
+
return {
noteId: note.noteId,
branchId: branch.branchId