Skip to content

Commit

Permalink
Message forwarding (#6833)
Browse files Browse the repository at this point in the history
* [docs] Message Forwards feature

Add documentation for message forwards.

A message forward gives users the ability to send a snapshot of a message in one channel to another channel.
- snapshots are immutable, and do not receive updates from the original message (unlike replies)
- similar to a REPLY message, a forward is created using a `message_reference`

 # Examples
 ## Responses
```json
{
    "author": {
        "id": 123456789012345678,
    },
    "message_reference": {
        "type": 1,  // FORWARD
        "message_id": 123456789012345678,
        "channel_id": 123456789012345678,
        "guild_id": 123456789012345678
    },
    "message_snapshot": {
        "content": "hello world",
        "embeds": [
            // Embed objects
        ],
        "attachments": [
            // Attachment objects
        ],
    }
}

```

* udpate how reference pseudo types are defined

* multi snapshots + forward restrictions

* table formatting lint is too damn sensitive

* field name split blockquotes

* better formatting and some grammer cleanups

* add changelog

* suggestion updates

* Update docs/resources/Channel.md

Co-authored-by: val.le <81811276+valdotle@users.noreply.github.com>

* Update docs/resources/Channel.md

Co-authored-by: val.le <81811276+valdotle@users.noreply.github.com>

* Update docs/resources/Channel.md

Co-authored-by: val.le <81811276+valdotle@users.noreply.github.com>

* Update docs/resources/Channel.md

Co-authored-by: val.le <81811276+valdotle@users.noreply.github.com>

---------

Co-authored-by: Sam Shih <shih@discordapp.com>
Co-authored-by: val.le <81811276+valdotle@users.noreply.github.com>
  • Loading branch information
3 people authored Jul 16, 2024
1 parent d881693 commit 86641ea
Show file tree
Hide file tree
Showing 4 changed files with 161 additions and 71 deletions.
38 changes: 38 additions & 0 deletions docs/Change_Log.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# Change Log

## Message Forwarding rollout

#### 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 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": "1255957733279273083",
"message_reference": {
"type": 1, // Forward
...
}
"message_snapshots": [
{
"message": {
"content": "original message",
"embeds": [...],
"attachments": [...],
...
}
}
],
...
}
```

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://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

#### June 27, 2024
Expand Down
2 changes: 1 addition & 1 deletion docs/interactions/Receiving_and_Responding.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ All options have names, and an option can either be a parameter and input value-
This is sent on the [message object](#DOCS_RESOURCES_CHANNEL/message-object) when the message is a response to an Interaction without an existing message.

> info
> This means responses to [Message Components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/) do not include this property, instead including a [message reference](#DOCS_RESOURCES_CHANNEL/message-reference-object-message-reference-structure) object as components _always_ exist on preexisting messages.
> This means responses to [Message Components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/) do not include this property, instead including a [message reference](#DOCS_RESOURCES_CHANNEL/message-reference-structure) object as components _always_ exist on preexisting messages.
###### Message Interaction Structure

Expand Down
Loading

0 comments on commit 86641ea

Please sign in to comment.