mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
feat(comments): add isChannelOwner field
This commit is contained in:
parent
ea6da3736b
commit
57276a823c
2 changed files with 5 additions and 4 deletions
|
@ -344,7 +344,7 @@ public class StreamHandlers {
|
||||||
comments.add(new Comment(comment.getUploaderName(), getLastThumbnail(comment.getUploaderAvatars()),
|
comments.add(new Comment(comment.getUploaderName(), getLastThumbnail(comment.getUploaderAvatars()),
|
||||||
comment.getCommentId(), Optional.ofNullable(comment.getCommentText()).map(Description::getContent).orElse(null), comment.getTextualUploadDate(),
|
comment.getCommentId(), Optional.ofNullable(comment.getCommentText()).map(Description::getContent).orElse(null), comment.getTextualUploadDate(),
|
||||||
substringYouTube(comment.getUploaderUrl()), repliespage, comment.getLikeCount(), comment.getReplyCount(),
|
substringYouTube(comment.getUploaderUrl()), repliespage, comment.getLikeCount(), comment.getReplyCount(),
|
||||||
comment.isHeartedByUploader(), comment.isPinned(), comment.isUploaderVerified(), comment.hasCreatorReply()));
|
comment.isHeartedByUploader(), comment.isPinned(), comment.isUploaderVerified(), comment.hasCreatorReply(), comment.isChannelOwner()));
|
||||||
} catch (JsonProcessingException e) {
|
} catch (JsonProcessingException e) {
|
||||||
ExceptionHandler.handle(e);
|
ExceptionHandler.handle(e);
|
||||||
}
|
}
|
||||||
|
@ -382,7 +382,7 @@ public class StreamHandlers {
|
||||||
comments.add(new Comment(comment.getUploaderName(), getLastThumbnail(comment.getUploaderAvatars()),
|
comments.add(new Comment(comment.getUploaderName(), getLastThumbnail(comment.getUploaderAvatars()),
|
||||||
comment.getCommentId(), Optional.ofNullable(comment.getCommentText()).map(Description::getContent).orElse(null), comment.getTextualUploadDate(),
|
comment.getCommentId(), Optional.ofNullable(comment.getCommentText()).map(Description::getContent).orElse(null), comment.getTextualUploadDate(),
|
||||||
substringYouTube(comment.getUploaderUrl()), repliespage, comment.getLikeCount(), comment.getReplyCount(),
|
substringYouTube(comment.getUploaderUrl()), repliespage, comment.getLikeCount(), comment.getReplyCount(),
|
||||||
comment.isHeartedByUploader(), comment.isPinned(), comment.isUploaderVerified(), comment.hasCreatorReply()));
|
comment.isHeartedByUploader(), comment.isPinned(), comment.isUploaderVerified(), comment.hasCreatorReply(), comment.isChannelOwner()));
|
||||||
} catch (JsonProcessingException e) {
|
} catch (JsonProcessingException e) {
|
||||||
ExceptionHandler.handle(e);
|
ExceptionHandler.handle(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,10 +4,10 @@ public class Comment {
|
||||||
|
|
||||||
public String author, thumbnail, commentId, commentText, commentedTime, commentorUrl, repliesPage;
|
public String author, thumbnail, commentId, commentText, commentedTime, commentorUrl, repliesPage;
|
||||||
public int likeCount, replyCount;
|
public int likeCount, replyCount;
|
||||||
public boolean hearted, pinned, verified, creatorReplied;
|
public boolean hearted, pinned, verified, creatorReplied, channelOwner;
|
||||||
|
|
||||||
public Comment(String author, String thumbnail, String commentId, String commentText, String commentedTime,
|
public Comment(String author, String thumbnail, String commentId, String commentText, String commentedTime,
|
||||||
String commentorUrl, String repliesPage, int likeCount, int replyCount, boolean hearted, boolean pinned, boolean verified, boolean creatorReplied) {
|
String commentorUrl, String repliesPage, int likeCount, int replyCount, boolean hearted, boolean pinned, boolean verified, boolean creatorReplied, boolean channelOwner) {
|
||||||
this.author = author;
|
this.author = author;
|
||||||
this.thumbnail = thumbnail;
|
this.thumbnail = thumbnail;
|
||||||
this.commentId = commentId;
|
this.commentId = commentId;
|
||||||
|
@ -21,5 +21,6 @@ public class Comment {
|
||||||
this.pinned = pinned;
|
this.pinned = pinned;
|
||||||
this.verified = verified;
|
this.verified = verified;
|
||||||
this.creatorReplied = creatorReplied;
|
this.creatorReplied = creatorReplied;
|
||||||
|
this.channelOwner = channelOwner;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue