diff options
author | Vitaly Takmazov | 2019-04-09 20:00:36 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2019-04-09 20:00:36 +0300 |
commit | 1b8b8b3d34157e5a8c034f9f9dbba3771048ec51 (patch) | |
tree | 9cdaa926e59d41bb0ce8fbb109e1fe6f8b5dacca /src/main/java/com/juick/server/api/activity | |
parent | 81bb301742ddafdc58b63ab6d32f70b46097c789 (diff) |
ActivityPub: Activity must have an ID
Diffstat (limited to 'src/main/java/com/juick/server/api/activity')
-rw-r--r-- | src/main/java/com/juick/server/api/activity/model/Activity.java | 6 |
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 2af14479f..d2ee712b6 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; } |