Update Blog Client

akwizgran
2018-04-29 14:11:58 +00:00
parent ff7f4ee2d2
commit 9d351824dc

@@ -1,10 +1,16 @@
The blog client is a [BSP client](BSP) that synchronises blog posts among groups of devices. Only the creator of a blog can write posts. Posts and comments from other blogs can be reblogged with optional comments. The blog client is a [BSP client](BSP) that synchronises blog posts among groups of devices. It is used in conjunction with the [blog sharing client](blog sharing client).
### Group identifiers The creator of a blog is the only user who can post messages. Posts and comments from other blogs can be reblogged with optional comments.
The client's identifier is `org.briarproject.briar.blog`. A blog may consist of posts imported from an RSS feed.
Each blog has its own BSP group. The [group descriptor](BSP#group-identifiers) is a [BDF list](BDF) with two elements: `author` (list) and `rss` (boolean). ### Identifier
The client's identifier is `org.briarproject.briar.blog`. The major version is 0.
### Groups
Each blog is represented by a separate BSP group. The [group descriptor](BSP#group-identifiers) is a [BDF list](BDF) with two elements: `author` (list) and `rss` (boolean).
`author` is a list with three elements: `formatVersion` (int), `nickname` (string) and `publicKey` (raw). This identifies the user who publishes the blog. `author` is a list with three elements: `formatVersion` (int), `nickname` (string) and `publicKey` (raw). This identifies the user who publishes the blog.
@@ -14,23 +20,23 @@ Each blog has its own BSP group. The [group descriptor](BSP#group-identifiers) i
**0: POST** - A blog post. The message body is a BDF list with three elements: `messageType` (int), `content` (string), and `signature` (raw). **0: POST** - A blog post. The message body is a BDF list with three elements: `messageType` (int), `content` (string), and `signature` (raw).
The signature covers a BDF list with three elements: `groupId` (unique ID), `timestamp` (int), and `content` (string). The group ID and timestamp are taken from the message header. The public key from the group descriptor is used for verifying the signature. The signature covers a BDF list with three elements: `groupId` (unique ID), `timestamp` (int), and `content` (string). The group ID and timestamp are taken from the message header. The public key from the group descriptor is used for verifying the signature. The signature label is `org.briarproject.briar.blog/POST`.
**1: COMMENT** - A pointer to a reblogged post or comment, with an optional comment. The message body is a BDF list with five elements: `messageType` (int), `comment` (string or null), `parentOriginalId` (unique ID), `parentId` (unique ID), and `signature` (raw). **1: COMMENT** - A pointer to a reblogged post or comment, with an optional comment. The message body is a BDF list with five elements: `messageType` (int), `comment` (string or null), `parentOriginalId` (unique ID), `parentId` (unique ID), and `signature` (raw).
`parentOriginalId` is the ID of a post or comment in this blog or another blog. `parentId` is the ID of this comment's parent, which is a post, comment, wrapped post or wrapped comment in this blog, which had the ID `parentOriginalId` in the blog where the parent was originally posted. `parentOriginalId` is the ID of a post or comment in this blog or another blog. `parentId` is the ID of this comment's parent, which is a post, comment, wrapped post or wrapped comment in this blog, which had the ID `parentOriginalId` in the blog where the parent was originally posted.
The signature covers a BDF list with five elements: `groupId` (unique ID), `timestamp` (int), `comment` (string or null), `parentOriginalId` (unique ID), and `parentId` (unique ID). The group ID and timestamp are taken from the message header. The public key from the group descriptor is used for verifying the signature. The signature covers a BDF list with five elements: `groupId` (unique ID), `timestamp` (int), `comment` (string or null), `parentOriginalId` (unique ID), and `parentId` (unique ID). The group ID and timestamp are taken from the message header. The public key from the group descriptor is used for verifying the signature. The signature label is `org.briarproject.briar.blog/COMMENT`.
**2: WRAPPED_POST** - A reblogged post from another blog. The message body is a BDF list with five elements: `messageType` (int), `copiedGroupDescriptor` (list), `copiedTimestamp` (int), `copiedContent` (string), and `copiedSignature` (raw). **2: WRAPPED_POST** - A reblogged post from another blog. The message body is a BDF list with five elements: `messageType` (int), `copiedGroupDescriptor` (list), `copiedTimestamp` (int), `copiedContent` (string), and `copiedSignature` (raw).
`copiedGroupDescriptor` is the descriptor of the blog where this post was originally posted. `copiedTimestamp`, `copiedContent` and `copiedSignature` are copied from the original post. The public key from the copied group descriptor is used for verifying the signature. `copiedGroupDescriptor` is the descriptor of the blog where this post was originally posted. `copiedTimestamp`, `copiedContent` and `copiedSignature` are copied from the original post. The public key from the copied group descriptor is used for verifying the signature. The signature label is `org.briarproject.briar.blog/POST`.
The original group ID must be calculated, as it is covered by the signature. The original message ID must also be calculated, as it is referenced by comments. The original group ID must be calculated, as it is covered by the signature. The original message ID must also be calculated, as it is referenced by comments.
**3: WRAPPED_COMMENT** - A reblogged comment from another blog. The message body is a BDF list with eight elements: `messageType` (int), `copiedGroupDescriptor` (list), `copiedTimestamp` (int), `copiedComment` (string or null), `copiedParentOriginalId` (unique ID), `copiedParentId` (unique ID), `copiedSignature` (raw), and `parentId` (unique ID). **3: WRAPPED_COMMENT** - A reblogged comment from another blog. The message body is a BDF list with eight elements: `messageType` (int), `copiedGroupDescriptor` (list), `copiedTimestamp` (int), `copiedComment` (string or null), `copiedParentOriginalId` (unique ID), `copiedParentId` (unique ID), `copiedSignature` (raw), and `parentId` (unique ID).
`copiedGroupDescriptor` is the descriptor of the blog where this comment was originally posted. `copiedTimestamp`, `copiedComment`, `copiedParentOriginalId`, `copiedParentId` and `copiedSignature` are copied from the original comment. The public key from the copied group descriptor is used for verifying the signature. `copiedGroupDescriptor` is the descriptor of the blog where this comment was originally posted. `copiedTimestamp`, `copiedComment`, `copiedParentOriginalId`, `copiedParentId` and `copiedSignature` are copied from the original comment. The public key from the copied group descriptor is used for verifying the signature. The signature label is `org.briarproject.briar.blog/COMMENT`.
The original group ID must be calculated, as it is covered by the signature. The original message ID must also be calculated, as it is referenced by comments. The original group ID must be calculated, as it is covered by the signature. The original message ID must also be calculated, as it is referenced by comments.