aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/juick/ActivityPubManager.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main/java/com/juick/ActivityPubManager.java b/src/main/java/com/juick/ActivityPubManager.java
index 1fff41fc2..634176265 100644
--- a/src/main/java/com/juick/ActivityPubManager.java
+++ b/src/main/java/com/juick/ActivityPubManager.java
@@ -51,6 +51,7 @@ import java.io.StringWriter;
import java.io.Writer;
import java.net.URI;
import java.security.NoSuchAlgorithmException;
+import java.time.Instant;
import java.util.*;
import java.util.stream.Collectors;
@@ -127,6 +128,8 @@ public class ActivityPubManager implements ActivityListener, NotificationListene
signatureManager.post(me, follower, delete);
} catch (IOException | NoSuchAlgorithmException e) {
logger.warn("activitypub exception", e);
+ } catch (NoSuchElementException ex) {
+ logger.warn("Can not find {}", acct);
}
});
}
@@ -172,9 +175,10 @@ public class ActivityPubManager implements ActivityListener, NotificationListene
update.setId(note.getId() + "#update");
update.setActor(me.getId());
update.setObject(note);
+ update.setPublished(Instant.now());
logger.info("Update to follower {}", follower.getId());
signatureManager.post(me, follower, update);
- } catch (IOException | NoSuchAlgorithmException e) {
+ } catch (Exception e) {
logger.warn("{} exception", acct, e);
}
});
@@ -201,10 +205,11 @@ public class ActivityPubManager implements ActivityListener, NotificationListene
Update update = new Update();
update.setId(userUri + "#update");
update.setActor(me.getId());
- update.setObject(new Context(userUri));
+ update.setObject(me);
+ update.setPublished(Instant.now());
logger.info("Update to follower {}", follower.getId());
signatureManager.post(me, follower, update);
- } catch (IOException | NoSuchAlgorithmException e) {
+ } catch (Exception e) {
logger.warn("activitypub exception", e);
}
});