Skip to content

Build your personal knowledge base with Trilium Notes

allow sender to save labels

zadamb990239219c6
diff --git a/src/routes/api/sender.js b/src/routes/api/sender.js
index dac2116d80..4d26407ae2 100644
--- a/src/routes/api/sender.js
+++ b/src/routes/api/sender.js
@@ -35,6 +35,12 @@ function saveNote(req) {
mime: 'text/html'
});
+ if (req.body.labels) {
+ for (const {name, value} of req.body.labels) {
+ note.setLabel(name, value);
+ }
+ }
+
return {
noteId: note.noteId,
branchId: branch.branchId