Skip to content

An edited message ​

Editing replaces the text of one of your own text messages. On a message of a conversation it is the message's own edit(text). The conversation lists the peer's messages too, so the message you edit must be yours — the menu offers Edit on your own message only (DirectThreadNotOwnMessageError) — and a text one (DirectThreadNotTextMessageError): the menu of a link, voice, photo or sticker message has no Edit. The menu also stops offering Edit 15 minutes after the send, after five edits, on a disappearing message and on one with bot commands (DirectThreadMessageNotEditableError, its reason names the rule); the message's data carries timestamp, edit_count, message_ephemeral_lifetime_ms and command_count for it.

The 451 app saves the edit with the GraphQL mutation IGDirectEditMessageMutation on graphql_www: the conversation, the message and the new text as body.sensitive_string_value, and the message's own client_context as offline_threading_id. The brick is DirectEditMessage({ threadId, itemId, body, offlineThreadingId? }) of @igpapi/mobile.

Instagram can refuse the edit — the app offers Edit only for a while after the send — and a GraphQL refusal arrives as a successful HTTP answer with errors in it. The edit reads the answer, so a refusal is the typed DirectEditMessageRejectedError, never a success; an accepted edit answers the mutation's direct_edit_message as Instagram sent it.

The menu with EditEdit in a message's menu.

The composer in edit modeedit(text): the composer carries the message's text.

The edited text typedThe corrected text before saving.

The message after the editThe message shown with its edited text.

The pages of this site are the README files of the repository. The API reference is generated from the source.