From 1b8b8b3d34157e5a8c034f9f9dbba3771048ec51 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 9 Apr 2019 20:00:36 +0300 Subject: ActivityPub: Activity must have an ID --- src/main/java/com/juick/server/api/activity/model/Activity.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main') 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; } -- cgit v1.2.3