1
0
mirror of https://github.com/mastodon/documentation synced 2025-04-11 22:56:17 +02:00
documentation/content/en/entities/EncryptedMessage.md
Nik Clayton 49868155b9
feat: Document datetime and date formats (#1565)
Add a new document that precisely describes the string representation of
datetime and date types.

The previous description of them as "ISO 8601 Datetime" was very
imprecise, as ISO 8601 describes many different ways of representing a
datetime and date.

Specify the datetime format precisely as the ISO 8601 profile described
in RFC 3339, and the date format precisely as the "Complete date" format
from the W3C note on date and time formats.

Adjust all the references to ISO 8601 datetimes or dates to link back
to the definition.

Fixes #1420
2024-11-27 15:08:51 +00:00

91 lines
2.3 KiB
Markdown

---
title: EncryptedMessage
description: Represents an encrypted message.
menu:
docs:
parent: entities
aliases: [
"/entities/encryptedmessage",
"/entities/EncryptedMessage",
"/entities/encryptedmessage",
"/entities/EncryptedMessage",
]
draft: true
---
{{< hint style="info" >}}
This entity is currently unused.
{{</hint>}}
## Example
```json
```
## Attributes
### `id` {#id}
**Description:** The ID of the EncryptedMessage in the database.\
**Type:** String (cast from an integer, but not guaranteed to be a number)\
**Version history:**\
3.2.0 - added
### `account_id` {#account_id}
**Description:** The ID of the Account that sent this message.\
**Type:** String (cast from an integer, but not guaranteed to be a number)\
**Version history:**\
3.2.0 - added
### `device_id` {#device_id}
**Description:** The ID of the Device that sent this message.\
**Type:** String (cast from an integer, but not guaranteed to be a number)\
**Version history:**\
3.2.0 - added
### `type` {#type}
**Description:** Whether the message is a pre-key message (used to establish a new session) or a normally encrypted message (part of an existing session).\
**Type:** String (Enumerable, oneOf)\
`0` = Pre-key message (used to establish a new session)\
`1` = Normal encrypted message (part of an existing session)\
**Version history:**\
3.2.0 - added
### `body` {#body}
**Description:** The encrypted message content.\
**Type:** String\
**Version history:**\
3.2.0 - added
### `digest` {#digest}
**Description:** An HMAC SHA-256 digest hash of the message.\
**Type:** String (SHA256)\
**Version history:**\
3.2.0 - added
### `message_franking` {#message_franking}
**Description:** A signed value to be used when reporting the message body for its content.\
**Type:** String\
**Version history:**\
3.2.0 - added
### `created_at` {#created_at}
**Description:** A timestamp for when the message was created.\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
3.2.0 - added
## See also
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/serializers/rest/encrypted_message_serializer.rb" caption="app/serializers/rest/encrypted_message_serializer.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/pull/13820" caption="Add end-to-end encryption API (#13820)" >}}