# TxComments

#### Blockchain operations

* comment

#### Columns

| Name             | Description                                                                                       |
| ---------------- | ------------------------------------------------------------------------------------------------- |
| author           | author of the post/comment (username)                                                             |
| permlink         | a unique string identifier for the post, linked to the author of the post                         |
| parent\_author   | the author that comment is being submitted to, when posting a new blog this is an empty string    |
| parent\_permlink | specific post that comment is being submitted to, when posting a new blog this is an empty string |
| title            | human-readable title of the post being submitted. This is left blank for comments                 |
| body             | body of the post/comment being submitted, or `diff-match-patch` when updating                     |
| json\_metadata   | JSON object string containing post or comment metadata                                            |

#### Description

This operation is used to create or update posts and comments.

* `permlink` - Two authors may have the same permlink as it’s unique to the author only. For example, there could be two authors, Alice and Bob, and both could have a permlink of `firstpost`
* `json_metadata` - There is no blockchain-enforced validation on `json_metadata`, but the community has adopted a particular structure. It should contain a JSON object with the following keys:
  * `tags` - An array of up to 5 strings. Although the blockchain will accept more than 5, the tags plugin only looks at the first five
  * `app` - A user agent style application identifier. Typically `app_name/version`, e.g. `hiveblog/0.1`
  * `format` - The format of the body, e.g. markdown
  * In addition to the above keys, application developers are free to add any other keys they want to help manage the content they broadcast.

**Create vs. Update**

When a comment is first broadcasted, the `permlink` must be unique for the `author`. Otherwise, it is interpreted as an update operation. Updates either replace the entire body with the latest operation or patch the body if using [`diff-match-patch`](https://github.com/google/diff-match-patch).

For example, if we have a paragraph that has already been broadcast:

> “It’s been quite a lot of fun working with these wonderful folk on the Open Hive Network”

and it's changed to :

> “It’s been quite a lot of fun working with these wonderful people on the Open Hive Network”

the `comment` operation will have the following `body`:

```
- "@@ -406,12 +406,14 @@"
- ful
- -folk
- +people
- at
```

In addition to `body`, the `title` and `json_metadata` fields are also replaced by the latest operation.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hivesql.io/technical-informations/operations/txcomments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
