aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-04-09 20:00:36 +0300
committerGravatar Vitaly Takmazov2019-04-09 20:00:36 +0300
commit1b8b8b3d34157e5a8c034f9f9dbba3771048ec51 (patch)
tree9cdaa926e59d41bb0ce8fbb109e1fe6f8b5dacca /src/main/java/com/juick
parent81bb301742ddafdc58b63ab6d32f70b46097c789 (diff)
ActivityPub: Activity must have an ID
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r--src/main/java/com/juick/server/api/activity/model/Activity.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/com/juick/server/api/activity/model/Activity.java b/src/main/java/com/juick/server/api/activity/model/Activity.java
index 2af14479..d2ee712b 100644
--- a/src/main/java/com/juick/server/api/activity/model/Activity.java
+++ b/src/main/java/com/juick/server/api/activity/model/Activity.java
@@ -3,12 +3,18 @@ package com.juick.server.api.activity.model;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.juick.server.api.activity.helpers.ActivityIdDeserializer;
+import java.util.UUID;
+
public abstract class Activity extends Context {
@JsonDeserialize(using = ActivityIdDeserializer.class)
private String actor;
private Object object;
+ public Activity() {
+ setId(UUID.randomUUID().toString());
+ }
+
public String getActor() {
return actor;
}