Patch Changes
-
#3396
68b1b9eThanks @danielmlr! - Fixes the webhook notifier never sending webhooks for content saves, content deletions, or media uploads: it now declares thecontent:readandmedia:readcapabilities EmDash requires before it runs those hooks. -
#3412
c9ec24fThanks @danielmlr! - Fixes the webhook notifier ignoring its Events to Send and Include Content Data settings. "Content changes only" now sends only content create, update and delete webhooks, and "Media uploads only" sends only media upload webhooks. With Include Content Data on, content create and update payloads carry the saved entry's field values indata, and media upload payloads carry the file'sfilename,mimeTypeandsize; delete payloads have nodata. No earlier release sentdata, and releases before the plugin declaredcontent:readandmedia:readsent none of these webhooks, so there is no earlier payload shape to keep compatible.Content create and update payloads also carry
metadata.draftRevisionId. In a collection with revisions, saving changes to an existing entry stages a draft, sodataholds the draft's values;draftRevisionIdnames that draft and isnullwhen the saved values are the entry's current ones.Also fixes the plugin's delivery counts always being 0. Each content or media webhook now records its outcome, HTTP status and duration in the plugin's
deliveriesstorage collection, which prunes down to the 500 most recent deliveries after every write; thestatusroute and the dashboard widget's Delivered and Failed counts read from that same pruned log, so they only ever total the 500 most recent deliveries. The Test Webhook button's sends are not recorded. Both thestatusroute and the widget drop their Pending stat: nothing ever wrote a pending delivery, so it always read 0.