mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 11:49:04 +01:00
Address bugs and comments from reblogging code review
This commit is contained in:
@@ -12,8 +12,8 @@ import static org.briarproject.api.blogs.MessageType.WRAPPED_COMMENT;
|
||||
|
||||
public class BlogCommentHeader extends BlogPostHeader {
|
||||
|
||||
private String comment;
|
||||
private BlogPostHeader parent;
|
||||
private final String comment;
|
||||
private final BlogPostHeader parent;
|
||||
|
||||
public BlogCommentHeader(@NotNull MessageType type,
|
||||
@NotNull GroupId groupId, @Nullable String comment,
|
||||
@@ -36,7 +36,6 @@ public class BlogCommentHeader extends BlogPostHeader {
|
||||
return comment;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public BlogPostHeader getParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,10 @@ public interface BlogConstants {
|
||||
String KEY_COMMENT = "comment";
|
||||
String KEY_ORIGINAL_MSG_ID = "originalMessageId";
|
||||
String KEY_ORIGINAL_PARENT_MSG_ID = "originalParentMessageId";
|
||||
String KEY_WRAPPED_MSG_ID = "wrappedMessageId";
|
||||
/**
|
||||
* This is the ID of either a message wrapped from a different group
|
||||
* or of a message from the same group that therefore needed no wrapping.
|
||||
*/
|
||||
String KEY_PARENT_MSG_ID = "parentMessageId";
|
||||
|
||||
}
|
||||
|
||||
@@ -23,20 +23,20 @@ public interface BlogPostFactory {
|
||||
throws FormatException, GeneralSecurityException;
|
||||
|
||||
/** Wraps a blog post */
|
||||
Message createWrappedPost(GroupId groupId, byte[] descriptor,
|
||||
Message wrapPost(GroupId groupId, byte[] descriptor,
|
||||
long timestamp, BdfList body)
|
||||
throws FormatException;
|
||||
|
||||
/** Re-wraps a previously wrapped post */
|
||||
Message createWrappedPost(GroupId groupId, BdfList body)
|
||||
Message rewrapWrappedPost(GroupId groupId, BdfList body)
|
||||
throws FormatException;
|
||||
|
||||
/** Wraps a blog comment */
|
||||
Message createWrappedComment(GroupId groupId, byte[] descriptor,
|
||||
Message wrapComment(GroupId groupId, byte[] descriptor,
|
||||
long timestamp, BdfList body, MessageId currentId)
|
||||
throws FormatException;
|
||||
|
||||
/** Re-wraps a previously wrapped comment */
|
||||
Message createWrappedComment(GroupId groupId, BdfList body,
|
||||
Message rewrapWrappedComment(GroupId groupId, BdfList body,
|
||||
MessageId currentId) throws FormatException;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user