...
},
"id" : "1",
- "unread" : 2
+ "unread" : 2,
+ "last_message" : {...} // The last message in that chat
}
```
+### Marking a chat as read
+
+To set the `unread` count of a chat to 0, call
+
+`POST /api/v1/pleroma/chats/:id/read`
+
+Returned data:
+
+```json
+{
+ "account": {
+ "id": "someflakeid",
+ "username": "somenick",
+ ...
+ },
+ "id" : "1",
+ "unread" : 0
+}
+```
+
+
### Getting a list of Chats
`GET /api/v1/pleroma/chats`
...
},
"id" : "1",
- "unread" : 2
+ "unread" : 2,
+ "last_message" : {...} // The last message in that chat
}
]
```
Parameters:
- content: The text content of the message
+- media_id: The id of an upload that will be attached to the message.
Currently, no formatting beyond basic escaping and emoji is implemented, as well as no
attachments. This will most probably change.