Reputation: 21
I have a Slackbot message that has action buttons (see here). When a user click's a button, we perform a bit of work on our server and then use chat.update to remove the action buttons and update the message's footer:
removeButtons(reply, convo, footer) {
const data = reply.original_message;
delete data.attachments[0].actions;
data.channel = reply.channel;
if (footer) {
data.attachments[0].footer = footer;
}
this.bot.api.chat.update(data, (res) => {
});
}
Everything is working great but Slack appends an "(Edited)" to the message. I see a lot of other apps doing the same, but they seem to avoid the "(Edited)" text? What are they doing differently?
I've tried setting as_user
and replace_original
in the chat.update
call but haven't had any luck.
Upvotes: 2
Views: 5839
Reputation: 32852
There are two ways to "update" a message as result of an interaction.
With 2) the original message will be replaced by default and there will be no "edited" note.
Upvotes: 3