aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/ActivityPubManager.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2021-10-23 05:37:09 +0300
committerGravatar Vitaly Takmazov2021-10-23 05:37:09 +0300
commit37e6d26e02d51a4de257200bbf207712fa3a6980 (patch)
treed010d09492475a310c0a4217af46799b120e70cb /src/main/java/com/juick/ActivityPubManager.java
parent26e4c1c4046914f064046229e927461d93bce534 (diff)
ImagesService refactoring
* Merge ImagesService and ImageUtils * add avatar metadata to RSS feeds
Diffstat (limited to 'src/main/java/com/juick/ActivityPubManager.java')
-rw-r--r--src/main/java/com/juick/ActivityPubManager.java72
1 files changed, 43 insertions, 29 deletions
diff --git a/src/main/java/com/juick/ActivityPubManager.java b/src/main/java/com/juick/ActivityPubManager.java
index 57110729..5df89527 100644
--- a/src/main/java/com/juick/ActivityPubManager.java
+++ b/src/main/java/com/juick/ActivityPubManager.java
@@ -17,30 +17,63 @@
package com.juick;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.net.URI;
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import javax.annotation.Nonnull;
+import javax.inject.Inject;
+
import com.juick.model.Message;
import com.juick.model.Reaction;
+import com.juick.model.Tag;
import com.juick.model.User;
+import com.juick.service.MessagesService;
+import com.juick.service.SocialService;
+import com.juick.service.activities.ActivityListener;
+import com.juick.service.activities.AnnounceEvent;
+import com.juick.service.activities.DeleteMessageEvent;
+import com.juick.service.activities.DeleteUserEvent;
+import com.juick.service.activities.FollowEvent;
+import com.juick.service.activities.UndoAnnounceEvent;
+import com.juick.service.activities.UndoFollowEvent;
+import com.juick.service.activities.UpdateEvent;
+import com.juick.service.activities.UpdateUserEvent;
+import com.juick.service.component.NotificationListener;
+import com.juick.service.component.PingEvent;
+import com.juick.service.component.SystemEvent;
+import com.juick.util.HttpBadRequestException;
+import com.juick.util.HttpUtils;
+import com.juick.util.MessageUtils;
import com.juick.util.formatters.PlainTextFormatter;
-import com.juick.model.Tag;
import com.juick.www.api.SystemActivity.ActivityType;
import com.juick.www.api.activity.model.Context;
-import com.juick.www.api.activity.model.activities.*;
+import com.juick.www.api.activity.model.activities.Accept;
+import com.juick.www.api.activity.model.activities.Announce;
+import com.juick.www.api.activity.model.activities.Create;
+import com.juick.www.api.activity.model.activities.Delete;
+import com.juick.www.api.activity.model.activities.Update;
import com.juick.www.api.activity.model.objects.Actor;
import com.juick.www.api.activity.model.objects.Hashtag;
import com.juick.www.api.activity.model.objects.Image;
import com.juick.www.api.activity.model.objects.Mention;
import com.juick.www.api.activity.model.objects.Note;
import com.juick.www.api.activity.model.objects.Person;
-import com.juick.util.HttpBadRequestException;
-import com.juick.util.HttpUtils;
-import com.juick.service.MessagesService;
-import com.juick.service.SocialService;
-import com.juick.service.UserService;
-import com.juick.service.activities.*;
-import com.juick.service.component.*;
-import com.juick.util.MessageUtils;
import com.mitchellbosecke.pebble.PebbleEngine;
import com.mitchellbosecke.pebble.template.PebbleTemplate;
+
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -48,25 +81,6 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.util.UriComponents;
import org.springframework.web.util.UriComponentsBuilder;
-import javax.annotation.Nonnull;
-import javax.annotation.PostConstruct;
-import javax.inject.Inject;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.net.URI;
-import java.security.NoSuchAlgorithmException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Optional;
-import java.util.Set;
-import java.util.stream.Collectors;
-
public class ActivityPubManager implements ActivityListener, NotificationListener {
private static final Logger logger = LoggerFactory.getLogger("ActivityPub");
@Inject