This commit is contained in:
Massimiliano Assante 2022-09-16 12:47:30 +02:00
parent 4efb919c00
commit 18b2fd231d
1 changed files with 3 additions and 2 deletions

View File

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