diff options
author | Vitaly Takmazov | 2018-09-05 11:39:20 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-09-05 11:39:20 +0300 |
commit | bf6dd8390c1419b8fec56f6dcf09822c2cf59b72 (patch) | |
tree | 973ddc11098aed2d1885edd3c049fe727b4ff644 /juick-server/src/main/java | |
parent | d90272c4a880cc7644fb168c41cec4e90801ff03 (diff) |
ActivityStreams: Article -> Note
Diffstat (limited to 'juick-server/src/main/java')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/activity/Profile.java | 12 | ||||
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/activity/model/Create.java | 6 | ||||
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/activity/model/Note.java (renamed from juick-server/src/main/java/com/juick/server/api/activity/model/Article.java) | 2 |
3 files changed, 10 insertions, 10 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 0b8db1fc..d19b1c9c 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 @@ -80,16 +80,16 @@ public class Profile { if (!user.isAnonymous()) { ServletUriComponentsBuilder uriComponentsBuilder = ServletUriComponentsBuilder.fromCurrentRequestUri(); List<Integer> mids = messagesService.getUserBlog(user.getUid(), 0, before); - List<Article> articles = messagesService.getMessages(visitor, mids).stream().map(m -> { - Article article = new Article(); - article.setPublished(m.getTimestamp()); - article.setContent(m.getText()); - return article; + List<Note> notes = messagesService.getMessages(visitor, mids).stream().map(m -> { + Note note = new Note(); + note.setPublished(m.getTimestamp()); + note.setContent(m.getText()); + return note; }).collect(Collectors.toList()); Person person = new Person(); person.setName(user.getName()); OrderedCollectionPage page = new OrderedCollectionPage(); - page.setOrderedItems(articles.stream().map(a -> { + page.setOrderedItems(notes.stream().map(a -> { Create create = new Create(); create.setActor(person); create.setObject(a); 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 7b4e7b16..8d81b26b 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 @@ -3,7 +3,7 @@ package com.juick.server.api.activity.model; public class Create extends ActivityObject { private Person actor; - private Article object; + private Note object; public Person getActor() { return actor; @@ -13,11 +13,11 @@ public class Create extends ActivityObject { this.actor = actor; } - public Article getObject() { + public Note getObject() { return object; } - public void setObject(Article object) { + public void setObject(Note object) { this.object = object; } } diff --git a/juick-server/src/main/java/com/juick/server/api/activity/model/Article.java b/juick-server/src/main/java/com/juick/server/api/activity/model/Note.java index e117475d..0716779a 100644 --- a/juick-server/src/main/java/com/juick/server/api/activity/model/Article.java +++ b/juick-server/src/main/java/com/juick/server/api/activity/model/Note.java @@ -1,6 +1,6 @@ package com.juick.server.api.activity.model; -public class Article extends ActivityObject { +public class Note extends ActivityObject { private String content; private String attributedTo; |