diff options
Diffstat (limited to 'src/main/java/com/juick/www/api')
-rw-r--r-- | src/main/java/com/juick/www/api/Messages.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main/java/com/juick/www/api/Messages.java b/src/main/java/com/juick/www/api/Messages.java index ead2c076..ef55944b 100644 --- a/src/main/java/com/juick/www/api/Messages.java +++ b/src/main/java/com/juick/www/api/Messages.java @@ -21,7 +21,6 @@ import com.juick.model.Message; import com.juick.model.Tag; import com.juick.model.User; import com.juick.service.activities.UpdateEvent; -import com.juick.util.WebUtils; import com.juick.www.WebApp; import com.juick.model.CommandResult; import com.juick.util.HttpBadRequestException; @@ -43,7 +42,6 @@ import org.springframework.web.bind.annotation.*; import javax.inject.Inject; import java.io.IOException; import java.util.*; -import java.util.stream.Collectors; /** * @author ugnich @@ -216,7 +214,7 @@ public class Messages { public void togglePrivacy(@Parameter(hidden = true) User visitor, @RequestParam Integer mid) { if (visitor.isPremium() || userService.isAdminUser(visitor)) { var msg = messagesService.getMessage(mid).orElseThrow(HttpNotFoundException::new); - messagesService.setFriendsOnly(mid, !msg.FriendsOnly); + messagesService.setFriendsOnly(mid, !msg.isFriendsOnly()); msg = messagesService.getMessage(mid).orElseThrow(HttpNotFoundException::new); applicationEventPublisher.publishEvent( new UpdateEvent(this, visitor, msg)); |