From b3111e908b98319f6d5d29f7e2a962835038f664 Mon Sep 17 00:00:00 2001
From: Benjamin Ulrich <b.ulrich@adito.de>
Date: Tue, 22 Dec 2020 13:06:42 +0000
Subject: [PATCH] =?UTF-8?q?[Projekt:=20Entwicklung=20-=20xRM][TicketNr.:?=
 =?UTF-8?q?=201068555][Serienbrief=20-=20Preview/Tab=20Empf=C3=A4nger=20-?=
 =?UTF-8?q?=20Meldung=20"Aktion=20nicht=20unterst=C3=BCtzt"=20obwohl=20odt?=
 =?UTF-8?q?=20vorhanden]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 process/buildSerialLetter_serverProcess/process.js | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/process/buildSerialLetter_serverProcess/process.js b/process/buildSerialLetter_serverProcess/process.js
index b3210e860d..7be5de72cd 100644
--- a/process/buildSerialLetter_serverProcess/process.js
+++ b/process/buildSerialLetter_serverProcess/process.js
@@ -21,4 +21,15 @@ SingleBinaryUtils.set("SERIALLETTER", "SERIALLETTERFILE", letterId, document.con
 
 var message = translate.text("Download ready");
 var description = translate.withArguments("Serial letter \"%0\" can now be downloaded", [document.title]);
-notification.addNotification(util.getNewUUID(), text.encodeMS(["SerialLetter", letterId]), null, null, "DownloadReady", null, notification.PRIO_NORMAL, 2, notification.STATE_UNSEEN, [user], message, description);
\ No newline at end of file
+
+var notificationConfig = notification.createConfig()
+.initialState(notification.STATE_UNSEEN)
+.forcedPriority(notification.PRIO_NORMAL)
+    .linkInfo(text.encodeMS(["SerialLetter", letterId]))
+    .daysToLive(2)
+    .addUserWithId(user)
+    .notificationType("DownloadReady")
+    .caption(message)
+    .description(description);
+    
+notification.addNotificationWith(notificationConfig);
\ No newline at end of file
-- 
GitLab