Editable text

The message message type supports text editing. To allow text editing, add "editable": true to the message object.

Example

Example

JSON example

{
    "head": {
        "text": "I am a header",
        "sub_head": {
            "text": "I am a sub header"
        }
    },
    "body": [
        {
            "type": "message",
            "text": "I am a message with editable text",
            "editable": true
        }
    ]
}

User actions

When a user edits the text, a POST request with data about the edit is sent to the Bot Endpoint URL you specified in your apps dashboard. Here is an example request body.

{
    "event": "interactive_message_editable",
    "payload": {
        "accountId": "gVcjZnWWRLWvv_GtyGuaxg",
        "channelName": "Tommy Gaessler",
        "editItem": {
            "origin": "I am a message with editable text",
            "target": "I am a message with editable text that has been edited"
        },
        "messageId": "20190618205205291_tI1CUa6_aw1",
        "original": {
            "head": {
                "sub_head": {
                    "text": "I am a sub header"
                },
                "text": "I am a header"
            },
            "body": [
                {
                    "editable": true,
                    "text": "I am a message with editable text",
                    "type": "message"
                }
            ]
        },
        "robotJid": "v1m0yn1imztuogsxjje8fdew@xmpp.zoom.us",
        "timestamp": 1560891135776,
        "toJid": "kdykjnimt4kpd8kkdqt9fq@xmpp.zoom.us/robot_v1m0yn1imztuogsxjje8fdew@xmpp.zoom.us",
        "userId": "KdYKjnimT4KPd8KKdQt9FQ",
        "userJid": "kdykjnimt4kpd8kkdqt9fq@xmpp.zoom.us",
        "userName": "Tommy Gaessler"
    }
}