mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Add support for comments and reblogging to Blog Client
Comments and reblogs need to depend on the post they refer to. Since message dependencies are limited to one group, the post and also the comments need to be wrapped when commented on or reblogged to another blog. For this reason, in addition to comments, two new wrapping message types are introduced. They retain all data of the original messages and allow for reconstruction and signature verification. This commit breaks backwards compatibility with old blog posts. It removes the content type, title and parent ID from the post message structure.
This commit is contained in:
@@ -32,11 +32,6 @@ class BlogPostItem implements Comparable<BlogPostItem> {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getTitle() {
|
||||
return header.getTitle();
|
||||
}
|
||||
|
||||
public long getTimestamp() {
|
||||
return header.getTimestamp();
|
||||
}
|
||||
@@ -72,11 +67,6 @@ class BlogPostItem implements Comparable<BlogPostItem> {
|
||||
long aTime = getTimeReceived(), bTime = other.getTimeReceived();
|
||||
if (aTime > bTime) return -1;
|
||||
if (aTime < bTime) return 1;
|
||||
// Break ties by post title
|
||||
if (getTitle() != null && other.getTitle() != null) {
|
||||
return String.CASE_INSENSITIVE_ORDER
|
||||
.compare(getTitle(), other.getTitle());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user