aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main')
-rw-r--r--juick-server/src/main/java/com/juick/server/SignatureManager.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/juick-server/src/main/java/com/juick/server/SignatureManager.java b/juick-server/src/main/java/com/juick/server/SignatureManager.java
index 869edbfc..c610ea12 100644
--- a/juick-server/src/main/java/com/juick/server/SignatureManager.java
+++ b/juick-server/src/main/java/com/juick/server/SignatureManager.java
@@ -6,6 +6,7 @@ import com.juick.server.api.activity.model.Person;
import com.juick.service.activities.DeleteUserEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.context.ApplicationEventPublisher;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
@@ -38,6 +39,8 @@ public class SignatureManager {
private KeystoreManager keystoreManager;
@Inject
private ObjectMapper jsonMapper;
+ @Inject
+ private ApplicationEventPublisher applicationEventPublisher;
public void post(Person from, Person to, Context data) throws IOException {
UriComponentsBuilder uriComponentsBuilder = UriComponentsBuilder.fromUriString(to.getInbox());
@@ -87,7 +90,7 @@ public class SignatureManager {
logger.warn("Cannot identify {}", contextUri);
if (e.getStatusCode().equals(HttpStatus.GONE)) {
logger.warn("Server report {} is gone, deleting", contextUri);
- new DeleteUserEvent(this, contextUri.toASCIIString());
+ applicationEventPublisher.publishEvent(new DeleteUserEvent(this, contextUri.toASCIIString()));
}
}
return Optional.empty();