diff options
author | Vitaly Takmazov | 2020-03-10 22:58:19 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2020-03-10 23:17:32 +0300 |
commit | eeb9da610d814b1b210366a456b3a0817d95a1af (patch) | |
tree | e3a0883a81bc2669fde48c5a156fa3d261ffec7d /src/main/java/com/juick/server/api/Service.java | |
parent | 218b0d9c42a924385bac552ebfff8fb9ab321247 (diff) |
mailto form of List-Unsubscribe header
Diffstat (limited to 'src/main/java/com/juick/server/api/Service.java')
-rw-r--r-- | src/main/java/com/juick/server/api/Service.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/com/juick/server/api/Service.java b/src/main/java/com/juick/server/api/Service.java index 12a9167f..d056d9b0 100644 --- a/src/main/java/com/juick/server/api/Service.java +++ b/src/main/java/com/juick/server/api/Service.java @@ -23,6 +23,7 @@ import com.juick.model.CommandResult; import com.juick.server.CommandsManager; import com.juick.server.EmailManager; import com.juick.server.ServerManager; +import com.juick.server.util.HttpBadRequestException; import com.juick.server.util.HttpForbiddenException; import com.juick.service.EmailService; import com.juick.service.MessagesService; @@ -188,7 +189,9 @@ public class Service { User visitor = userService.getUserByEmail(from); if (!visitor.isAnonymous()) { - + if (!emailService.disableEmail(visitor, from)) { + throw new HttpBadRequestException(); + } } } else { throw new HttpForbiddenException(); |