aboutsummaryrefslogtreecommitdiff
path: root/juick-server
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-09-05 19:04:19 +0300
committerGravatar Vitaly Takmazov2018-09-05 19:04:19 +0300
commit5d6092caa30a3b03b22deb98f018ac7e742609f1 (patch)
treec38bd85e395ff03299cb4a2dfc338db6fc0288d5 /juick-server
parenta1559f23f2fb18506b9dc04e4fdd0575ee0eb94b (diff)
ActivityStreams: Activity actor is URL
Diffstat (limited to 'juick-server')
-rw-r--r--juick-server/src/main/java/com/juick/server/api/activity/Profile.java6
-rw-r--r--juick-server/src/main/java/com/juick/server/api/activity/model/Create.java6
2 files changed, 6 insertions, 6 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/activity/Profile.java b/juick-server/src/main/java/com/juick/server/api/activity/Profile.java
index 1b606948..80b8d6da 100644
--- a/juick-server/src/main/java/com/juick/server/api/activity/Profile.java
+++ b/juick-server/src/main/java/com/juick/server/api/activity/Profile.java
@@ -82,13 +82,13 @@ public class Profile {
User user = userService.getUserByName(userName);
if (!user.isAnonymous()) {
UriComponentsBuilder uri = UriComponentsBuilder.fromUriString(baseUri);
- String blogUri = uri.path(String.format("/u/%s/blog/toc", userName)).toUriString();
+ String personUri = uri.path(String.format("/u/%s", userName)).toUriString();
String followersUri = uri.replacePath(String.format("/u/%s/followers/toc", userName)).toUriString();
List<Integer> mids = messagesService.getUserBlog(user.getUid(), 0, before);
List<Note> notes = messagesService.getMessages(visitor, mids).stream().map(m -> {
Note note = new Note();
note.setId(uri.replacePath(String.format("/m/%d", m.getMid())).toUriString());
- note.setAttributedTo(blogUri);
+ note.setAttributedTo(personUri);
note.setTo(Arrays.asList(followersUri,
"https://www.w3.org/ns/activitystreams#Public"));
note.setPublished(m.getTimestamp());
@@ -109,7 +109,7 @@ public class Profile {
Create create = new Create();
create.setId(a.getId() + "#Create");
create.setTo(a.getTo());
- create.setActor(person);
+ create.setActor(personUri);
create.setObject(a);
create.setPublished(a.getPublished());
return create;
diff --git a/juick-server/src/main/java/com/juick/server/api/activity/model/Create.java b/juick-server/src/main/java/com/juick/server/api/activity/model/Create.java
index 60ad4ae3..2acdd6a6 100644
--- a/juick-server/src/main/java/com/juick/server/api/activity/model/Create.java
+++ b/juick-server/src/main/java/com/juick/server/api/activity/model/Create.java
@@ -4,15 +4,15 @@ import java.util.List;
public class Create extends ActivityObject {
- private Person actor;
+ private String actor;
private Note object;
private List<String> to;
- public Person getActor() {
+ public String getActor() {
return actor;
}
- public void setActor(Person actor) {
+ public void setActor(String actor) {
this.actor = actor;
}