Skip to content

Delete Message Format

Overview

Messages can be deleted not only locally but deletion intent can be passed to server and forwarded to remote users or other instances of same user. Deletion is carried out through a special message carrying references to messages or individual attachments being deleted. Server can rely on receiving apps or parse and delete in server database. Scope can be limited to sending side (local deletion synced to other devices) or global scope (every user should delete). Sent through Send Message web service.

Content-type: application/x-acro-delete-message+json

Format

JSON array example:

[
    {
        "scope"  : "everywhere",
        "sms_id" : "1234"
    },
    {
        "scope"  : "everywhere",
        "sms_id" : "5555",
        "content_url" : "https://the.location.of/the/attachment.jpg"
    },
    {
        "scope"  : "here",
        "sms_id" : "5678"
    }
]

sms_id

Mandatory. Identifies the message being deleted.

content_url

Present when deleting a single attachment of a multi-attachment message. Uses content_url of the multimedia attachment as identifier.

scope

here
Delete only for sender (sync across devices).
everywhere
Delete for everyone. Normally user can only delete own messages; in group chats admin can delete any.

Configuring

Server mediated message deletion is enabled by the following keys:

msgLocalDeleteSupported

Turns on sync of local message deletion across devices. User can delete any message, deletion propagates to other devices. Not deleted for other party.

msgRemoteDeleteSupported

Turns on deleting message for both sender and receiver. User can only delete own sent messages (group chat: admin can delete any). User can choose "Delete for me" or "Delete for everyone". "Delete for me" is either purely local or server-mediated if msgLocalDeleteSupported is on.