aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/juick/server/ActivityPubManager.java1
-rw-r--r--src/main/java/com/juick/server/SignatureManager.java5
-rw-r--r--src/main/java/com/juick/server/api/activity/model/Context.java2
3 files changed, 3 insertions, 5 deletions
diff --git a/src/main/java/com/juick/server/ActivityPubManager.java b/src/main/java/com/juick/server/ActivityPubManager.java
index 94a8434e..400a63d4 100644
--- a/src/main/java/com/juick/server/ActivityPubManager.java
+++ b/src/main/java/com/juick/server/ActivityPubManager.java
@@ -193,7 +193,6 @@ public class ActivityPubManager implements ActivityListener, NotificationListene
create.setPublished(note.getPublished());
create.setObject(note);
try {
- logger.info("Posting to subscriber {}", follower.getId());
signatureManager.post(me, follower, create);
} catch (IOException e) {
logger.warn("activitypub exception", e);
diff --git a/src/main/java/com/juick/server/SignatureManager.java b/src/main/java/com/juick/server/SignatureManager.java
index b64b6bd7..fc458533 100644
--- a/src/main/java/com/juick/server/SignatureManager.java
+++ b/src/main/java/com/juick/server/SignatureManager.java
@@ -38,7 +38,7 @@ import static com.juick.server.api.activity.model.Context.ACTIVITY_MEDIA_TYPE;
@Component
public class SignatureManager {
- private static final Logger logger = LoggerFactory.getLogger(ActivityPubManager.class);
+ private static final Logger logger = LoggerFactory.getLogger(SignatureManager.class);
@Inject
private KeystoreManager keystoreManager;
@Inject
@@ -63,9 +63,8 @@ public class SignatureManager {
requestHeaders.add("Signature", signatureString);
HttpEntity<Context> request = new HttpEntity<>(Context.build(data), requestHeaders);
logger.info("Sending context to {}: {}", to.getId(), jsonMapper.writeValueAsString(data));
- logger.info("Request date: {}", requestDate);
ResponseEntity<Void> response = apClient.postForEntity(inbox, request, Void.class);
- logger.info("accepted follower: {}", response.getStatusCodeValue());
+ logger.info("Remote response: {}", response.getStatusCodeValue());
}
public String addSignature(Person from, String host, String method, String path, String dateString) throws IOException {
diff --git a/src/main/java/com/juick/server/api/activity/model/Context.java b/src/main/java/com/juick/server/api/activity/model/Context.java
index 87e04a89..687848cc 100644
--- a/src/main/java/com/juick/server/api/activity/model/Context.java
+++ b/src/main/java/com/juick/server/api/activity/model/Context.java
@@ -94,7 +94,7 @@ public abstract class Context {
}
public static Context build(Context response) {
- response.context = new ArrayList(Arrays.asList(ACTIVITY_STREAMS_URI, SECURITY_URI));
+ response.context = new ArrayList<>(Arrays.asList(ACTIVITY_STREAMS_URI, SECURITY_URI));
response.context.add(Collections.singletonMap("Hashtag", "as:Hashtag"));
return response;
}