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();