aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/api/Post.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/www/api/Post.java')
-rw-r--r--src/main/java/com/juick/www/api/Post.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/com/juick/www/api/Post.java b/src/main/java/com/juick/www/api/Post.java
index 9faf883a..63c95f2a 100644
--- a/src/main/java/com/juick/www/api/Post.java
+++ b/src/main/java/com/juick/www/api/Post.java
@@ -23,9 +23,10 @@ import java.util.List;
import java.util.Optional;
import javax.inject.Inject;
+
+import com.juick.www.api.activity.helpers.ProfileUriBuilder;
import jakarta.validation.constraints.NotNull;
-import com.juick.ActivityPubManager;
import com.juick.CommandsManager;
import com.juick.model.CommandResult;
import com.juick.model.Message;
@@ -75,7 +76,7 @@ public class Post {
@Inject
ApplicationEventPublisher applicationEventPublisher;
@Inject
- ActivityPubManager activityPubManager;
+ ProfileUriBuilder profileUriBuilder;
@RequestMapping(value = "/api/post", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(value = HttpStatus.OK)
@@ -236,7 +237,7 @@ public class Post {
messagesService.getMessage(mid).orElseThrow(IllegalStateException::new)
: messagesService.getReply(mid, rid);
applicationEventPublisher.publishEvent(
- new UpdateEvent(this, author, activityPubManager.messageUri(mid, rid)));
+ new UpdateEvent(this, author, profileUriBuilder.messageUri(mid, rid)));
return CommandResult.build(result, "Message updated", StringUtils.EMPTY);
}
throw new HttpBadRequestException();