Skip to content

Allow webhooks to use reply messages #2251

@davfsa

Description

@davfsa

A webhook is attached to a specific channel. Surely the channel association alone would be enough to say "this webhook can reply to messages in this channel"? If that's not enough, what about the (bot) user that created the webhook?

In our particular use case, we use a bot user for reading messages, but a webhook for sending messages. So we would always be able to get message IDs of non-webhook-sent messages. It's just that the webhook specifically allows for added flexibility in setting the username/avatar.

Note that WebhookExecute returns the message ID that was created (if you provide ?wait=1), so a webhook on its own (without a bot user) is always able to get some message ID to reply to.

And similarly webhooks have these other endpoints that allow a webhook to modify messages that it sent:

  • PATCH /webhooks/{webhook.id}/{webhook.token}/messages/{message.id}
  • DELETE /webhooks/{webhook.id}/{webhook.token}/messages{message.id}

So, at the very least, the functionality to reply to a webhook's own messages seems reasonable to me. Although, it would be ideal if a webhook could reply to any messages in its channel. I would be extremely thankful if you could consider this.

Originally posted by @qaisjp in #2118 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions