aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/SignatureManager.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-10-10 16:09:26 +0300
committerGravatar Vitaly Takmazov2018-10-10 16:09:26 +0300
commit31aeb6e69b5e7c329af9a0838caf848fd5300aa9 (patch)
treeca52ff79c7f9c28b86aac3dbae41df4d1fb274b6 /juick-server/src/main/java/com/juick/server/SignatureManager.java
parent5a2b506b5ecb56793807aacb47b7615bba80a7cc (diff)
ActivityPub: fix DeleteUserEvent publication
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/SignatureManager.java')
-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();