Users are now able to customize webhook avatars with a header override

pull/19/head
tycrek 4 years ago
parent 3e669299ff
commit ea42897e68
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

@ -17,7 +17,7 @@
- ✔️ Upload images, videos, gifs, files
- ✔️ Fancy embeds on Discord
- ✔️ Seamless inline video embeds on Discord
- ✔️ Upload log via Discord Webhooks
- ✔️ Upload log via customizable Discord Webhooks
- ✔️ File deletion
- ✔️ Usage metrics
- ✔️ Multiple access types
@ -130,6 +130,7 @@ Once you have these, add the following HTTP headers to your ShareX config:
| **`X-Ass-Webhook-Client`** | The **Webhook ID** |
| **`X-Ass-Webhook-Token`** | The **Webhook Token** |
| **`X-Ass-Webhook-Username`** | (Optional) the "username" of the Webhook; can be set to whatever you want |
| **`X-Ass-Webhook-Avatar`** | (Optional) URL to an image to use as the Webhook avatar. Use the **full** URL including `https://` |
Webhooks will show the filename, mimetype, size, upload timestamp, thumbail, and a link to delete the file. To disable webhooks, simply remove the headers from your config.

@ -135,7 +135,7 @@ function startup() {
// Send the embed to the webhook, then delete the client after to free resources
whc.send(null, {
username: req.headers['x-ass-webhook-username'] || 'ass',
avatarURL: ASS_LOGO,
avatarURL: req.headers['x-ass-webhook-avatar'] || ASS_LOGO,
embeds: [embed]
}).then((_msg) => whc.destroy());
}

Loading…
Cancel
Save