Add method to mark message as read to REST API

When exposing unread messages counters in
https://code.briarproject.org/briar/briar/-/merge_requests/1283, I
noticed that they were never set to 0.

Fixes #1780
This commit is contained in:
Nico Alt
2020-10-03 19:29:39 +02:00
parent be0e21d39b
commit 9738dd2838
5 changed files with 69 additions and 0 deletions

View File

@@ -234,6 +234,19 @@ The text of the message should be posted as JSON:
}
```
### Marking private messages as read
`POST /v1/messages/{contactId}/read`
The `messageId` of the message to be marked as read
needs to be provided in the request body as follows:
```json
{
"messageId": "+AIMMgOCPFF8HDEhiEHYjbfKrg7v0G94inKxjvjYzA8="
}
```
### Listing blog posts
`GET /v1/blogs/posts`