fix: saving webhooks fails with 404 after deleting an edited webhook (#35322)

In a channel's Webhooks dialog, editing a webhook's name and then deleting it made every following Save fail with a 404, and some edits to other webhooks were not saved until the dialog was reopened. Deleting a webhook now also drops its unsaved edits, so Save goes through for the remaining webhooks.

Fixes #35321
This commit is contained in:
Classic298 authored and GitHub committed 2026-12-01 00:07:04 +04:00
1 parent 9985caee57
commit c2bbab6cf6
1 file changed
+1
@@ -78,6 +78,7 @@
try {
await deleteChannelWebhook(localStorage.token, channel.id, selectedWebhookId);
webhooks = webhooks.filter((webhook) => webhook.id !== selectedWebhookId);
delete pendingChanges[selectedWebhookId];
toast.success($i18n.t('Deleted'));
} catch (error) {
toast.error(`${error}`);