Skip to content

Commit

Permalink
suggestion updates
Browse files Browse the repository at this point in the history
  • Loading branch information
lytefast committed Jul 15, 2024
1 parent 45d8c08 commit bb2cb67
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
14 changes: 7 additions & 7 deletions docs/Change_Log.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

#### July 15, 2024

We are slowly rolling out the message forwarding feature to users. This feature allows callers to create a message using `message_reference.type = FORWARD` and have the API generate a `message_snapshot` for the sent message. The feature some limitations (see documentation) and the snapshot is a minimial version of a standard `MessageObject`, but does capture the core parts of a message.
We are slowly rolling out the message forwarding feature to users. This feature allows callers to create a message using `message_reference.type = FORWARD` and have the API generate a `message_snapshot` for the sent message. The feature has [some limitations](#DOCS_RESOURCES_CHANNEL/message-reference-types) and the snapshot is a minimal version of a standard `MessageObject`, but does capture the core parts of a message.

The resulting message will look something like:
```json
{
"id": 1234,
"id": "1255957733279273083",
"message_reference": {
"type": 1, // Forward
...
Expand All @@ -28,15 +28,15 @@ The resulting message will look something like:
}
```

We have applied stricter rate limits for this feature based on (intentionally omitting values since they might change as needed):
- number of forwards sent
We have applied stricter rate limits for this feature based on the following:
- number of forwards sent by the user
- total attachment size

###### API Updates since preview

This was [previously announced](https://canary.discord.com/channels/613425648685547541/1233463756160503859) and has since had a slight API changes depeneding on when you last read/used the api:
- `message_snapshot.guild` is not returned anymore
- `message_reference` is now populated with `type == FORWARD`
This was [previously announced](https://discord.com/channels/613425648685547541/697138785317814292/1233463756160503859) but note that the final API has a few changes since the API was first previewed:
- [`message snapshot`](#DOCS_RESOURCES_CHANNEL/message-snapshot-object) objects don't include a `guild` field anymore since the `message_reference` already provides that information
- forwarded messages have a distinctive `message_reference` type of `FORWARD` now

## User-Installed Apps General Availability

Expand Down
14 changes: 6 additions & 8 deletions docs/resources/Channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ Represents a message sent in a channel within Discord.
| application_id? | snowflake | if the message is an [Interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/) or application-owned webhook, this is the id of the application |
| flags? | integer | [message flags](#DOCS_RESOURCES_CHANNEL/message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) |
| message_reference? | [message reference](#DOCS_RESOURCES_CHANNEL/message-reference-structure) object | data showing the source of a crosspost, channel follow add, pin, or reply message |
| message_snapshots? \[5\] | array of [message snapshot](#DOCS_RESOURCES_CHANNEL/message-snapshot-object) objects | the message associated with the message_reference. This is a minimal subset of fields in a message (e.g. `author` is excluded.) |
| message_snapshots? \[5\] | array of [message snapshot](#DOCS_RESOURCES_CHANNEL/message-snapshot-object) objects | the message associated with the `message_reference`. This is a minimal subset of fields in a message (e.g. `author` is excluded.) |
| referenced_message? \[4\] | ?[message object](#DOCS_RESOURCES_CHANNEL/message-object) | the message associated with the message_reference |
| interaction_metadata? | [message interaction metadata object](#DOCS_RESOURCES_CHANNEL/message-interaction-metadata-object-message-interaction-metadata-structure) | [In preview](#DOCS_CHANGE_LOG/userinstallable-apps-preview). Sent if the message is sent as a result of an [interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/) |
| interaction? | [message interaction object](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/message-interaction-object-message-interaction-structure) | **Deprecated in favor of `interaction_metadata`**; sent if the message is a response to an [interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/) |
Expand Down Expand Up @@ -535,7 +535,7 @@ Information about the call in a private channel.
\* If `type` is unset, `DEFAULT` can be assumed in order to match the behaviour before message reference had types.
In future API versions this will become a required field.

\*\* `channel_id` is optional when creating a reply, but will always be present when receiving an event/response that includes this data model.
\*\* `channel_id` is optional when creating a reply, but will always be present when receiving an event/response that includes this data model. Reqruired for forwards.

#### Message Reference Types

Expand Down Expand Up @@ -575,10 +575,10 @@ There are multiple message types that have a `message_reference` object.
- These are messages which capture a snapshot of a message.
- These messages have an array of [`message_snapshots`](#DOCS_RESOURCES_CHANNEL/message-snapshot-object) field containing a copy of the original message. This copy follows the same structure as a message, but has only the minimal set of fields returned required for context/rendering.
- of note: `author` will be excluded
- A forwarded message can be identified by looking at it's `message_reference.type` field
- A forwarded message can be identified by looking at its `message_reference.type` field
- `message_snapshots` will be the message data associated with the forward. Currently we support only 1 snapshot.
- prevents spoofing forwarded data
- `message_snapshots` are taken at moment the forward message is created, and are **immutable**; any mutations to the orignal message will not be propagated.
- `message_snapshots` are taken the moment a forward message is created, and are **immutable**; any mutations to the original message will not be propagated.
- Forwards are created by including a message_reference with `FORWARD` type when sending a message.
- Required fields: `type`, `message_id`, `channel_id`
- the requestor must have `VIEW_CHANNEL` permissions
Expand Down Expand Up @@ -624,9 +624,7 @@ The encoding, and the waveform details, are an implementation detail and may cha
| message\* | [message] | subset of fields in the [message object](#DOCS_RESOURCES_CHANNEL/message-object) |

\* The current list of message fields subset consists of:
'type`, `content`, `embeds`, `attachments`, `timestamp`, `edited_timestamp`, `flags`, `mentions`, `mention_roles`.

\*\* This contains only the `id` for the guild. May hold additional fields in future apis.
`type`, `content`, `embeds`, `attachments`, `timestamp`, `edited_timestamp`, `flags`, `mentions`, `mention_roles`.

> info
> While message snapshots are able to support nested snapshots, we currently limit the depth of nesting to 1.
Expand Down Expand Up @@ -1122,7 +1120,7 @@ If operating on a guild channel, this endpoint requires the current user to have
Post a message to a guild text or DM channel. Returns a [message](#DOCS_RESOURCES_CHANNEL/message-object) object. Fires a [Message Create](#DOCS_TOPICS_GATEWAY_EVENTS/message-create) Gateway event. See [message formatting](#DOCS_REFERENCE/message-formatting) for more information on how to properly format messages.

To create a message as a reply or forward of another message, apps can include a [`message_reference`](#DOCS_RESOURCES_CHANNEL/message-reference-structure).
Refer to the documentation of for required fields.
Refer to the documentation for required fields.

Files must be attached using a `multipart/form-data` body as described in [Uploading Files](#DOCS_REFERENCE/uploading-files).

Expand Down

0 comments on commit bb2cb67

Please sign in to comment.