2020-01-01 22:37:59 +01:00
|
|
|
---
|
|
|
|
title: Conversation
|
|
|
|
description: Represents a conversation with "direct message" visibility.
|
|
|
|
menu:
|
|
|
|
docs:
|
|
|
|
parent: entities
|
|
|
|
---
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
{
|
|
|
|
"id": "418450",
|
|
|
|
"unread": true,
|
|
|
|
"accounts": [
|
|
|
|
{
|
|
|
|
"id": "482403",
|
|
|
|
"username": "amic",
|
|
|
|
"acct": "amic@nulled.red",
|
|
|
|
...
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"last_status": {
|
|
|
|
"id": "103196583826321184",
|
|
|
|
"created_at": "2019-11-25T04:08:24.000Z",
|
|
|
|
"in_reply_to_id": "103196540587943467",
|
|
|
|
"in_reply_to_account_id": "14715",
|
|
|
|
...
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Required attributes
|
|
|
|
|
2020-01-12 14:11:56 +01:00
|
|
|
### `id` {#id}
|
2020-01-01 22:37:59 +01:00
|
|
|
|
2020-01-12 14:11:56 +01:00
|
|
|
**Description:** Local database ID of the conversation.\
|
|
|
|
**Type:** String \(cast from an integer, but not guaranteed to be a number\)\
|
2020-01-01 22:37:59 +01:00
|
|
|
**Version history:** Added in 2.6.0
|
|
|
|
|
2020-01-12 14:11:56 +01:00
|
|
|
### `accounts` {#accounts}
|
2020-01-01 22:37:59 +01:00
|
|
|
|
2020-01-12 14:11:56 +01:00
|
|
|
**Description:** Participants in the conversation.\
|
2020-08-10 23:01:50 +02:00
|
|
|
**Type:** Array of [Account]({{< relref "account.md" >}})\
|
2020-01-01 22:37:59 +01:00
|
|
|
**Version history:** Added in 2.6.0
|
|
|
|
|
2020-01-12 14:11:56 +01:00
|
|
|
### `unread` {#unread}
|
2020-01-01 22:37:59 +01:00
|
|
|
|
2020-01-12 14:11:56 +01:00
|
|
|
**Description:** Is the conversation currently marked as unread?\
|
|
|
|
**Type:** Boolean\
|
2020-01-01 22:37:59 +01:00
|
|
|
**Version history:** Added in 2.6.0
|
|
|
|
|
|
|
|
## Optional attributes
|
|
|
|
|
2020-01-12 14:11:56 +01:00
|
|
|
### `last_status` {#last_status}
|
2020-01-01 22:37:59 +01:00
|
|
|
|
2020-01-12 14:11:56 +01:00
|
|
|
**Description:** The last status in the conversation, to be used for optional display.\
|
2020-08-10 23:01:50 +02:00
|
|
|
**Type:** [Status]({{< relref "status.md" >}})\
|
2020-01-01 22:37:59 +01:00
|
|
|
**Version history:** Added in 2.6.0
|
|
|
|
|
|
|
|
## See also
|
|
|
|
|
|
|
|
{{< page-ref page="methods/timelines/conversations.md" >}}
|
|
|
|
|
|
|
|
{{< caption-link url="https://github.com/tootsuite/mastodon/blob/master/app/serializers/rest/conversation_serializer.rb" caption="app/serializers/rest/conversation\_serializer.rb" >}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|