From 68c87880acad55d8b77164ee8950aaea695aaf86 Mon Sep 17 00:00:00 2001 From: Janis Saldabols Date: Mon, 11 Nov 2024 12:30:31 +0200 Subject: [PATCH] PR-2023 Send directory entry delete event --- .../services/org/olf/reshare/AppListenerService.groovy | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/service/grails-app/services/org/olf/reshare/AppListenerService.groovy b/service/grails-app/services/org/olf/reshare/AppListenerService.groovy index c00d304..abee250 100644 --- a/service/grails-app/services/org/olf/reshare/AppListenerService.groovy +++ b/service/grails-app/services/org/olf/reshare/AppListenerService.groovy @@ -105,12 +105,15 @@ public class AppListenerService implements ApplicationListener { log.debug("logDirectoryEvent(id:${de.id} version:${de.version} / ${tenant})"); String topic = "${tenant}_DirectoryEntryUpdate".toString() - - - Map entry_data = makeDirentJSON(de, false, true, false, false); + Map entry_data if (deleted) { + entry_data = [:] + entry_data.slug = de.slug + entry_data.id = de.id entry_data.deleted = true + } else { + entry_data = makeDirentJSON(de, false, true, false, false) } log.debug("Publish DirectoryEntryChange_ind event on topic ${topic} ${entry_data.slug}");