From 18b2fd231d606592255b3ae44be74bd27a467c38 Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Fri, 16 Sep 2022 12:47:30 +0200 Subject: [PATCH] aaaa --- .../social/networking/ws/methods/v2/Notifications.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/gcube/portal/social/networking/ws/methods/v2/Notifications.java b/src/main/java/org/gcube/portal/social/networking/ws/methods/v2/Notifications.java index c32d74b..3fb3a14 100644 --- a/src/main/java/org/gcube/portal/social/networking/ws/methods/v2/Notifications.java +++ b/src/main/java/org/gcube/portal/social/networking/ws/methods/v2/Notifications.java @@ -214,8 +214,9 @@ public class Notifications { try{ String opExecutor = caller.getClient().getId(); Boolean result = setUserNotificationsOnOff(setting.getUsername(), setting.isDisableNotification(), opExecutor); - String toReturn = "Notifications have been set"; + String toReturn = "Could not set notifications"; if (result) { + toReturn = "Notifications have been set"; toReturn += setting.isDisableNotification() ? " OFF ": " ON "; toReturn += "for username=" + setting.getUsername(); } @@ -260,7 +261,7 @@ public class Notifications { if (disable) { result = entries.set(key, SocialUtils.CACHING_TIME_TO_EXPIRATION, "op.ex:" + callerId); //operator executor is who silenced the user } else { - result = entries.delete(username); + result = entries.delete(key); } try { return result.getStatus().isSuccess();