Skip to content

Commit dc8fb02

Browse files
committed
Merge branch 'main' into develop
2 parents 028d5f3 + 08fe3ff commit dc8fb02

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Release Notes for Webhooks for Craft CMS
22

3+
## Unreleased
4+
5+
### Fixed
6+
- Fixed a bug where the `FirstSave` and `ProvisionalDraft` filters would not respect negation. ([#74](https://github.com/craftcms/webhooks/pull/74))
7+
8+
## 3.0.3 - 2022-05-20
9+
10+
### Fixed
11+
- Fixed a bug where you couldn’t add custom headers when defining a webhook. ([#73](https://github.com/craftcms/webhooks/pull/73))
12+
313
## 3.0.2 - 2022-05-12
414

515
### Fixed
@@ -26,7 +36,7 @@
2636
## 2.4.0.1 - 2021-08-30
2737

2838
### Fixed
29-
- Fixed a bug where pending webhook requests weren’t being updated when new webhooks were trigered with matching debounce keys.
39+
- Fixed a bug where pending webhook requests weren’t being updated when new webhooks were triggered with matching debounce keys.
3040

3141
## 2.4.0 - 2021-08-30
3242

src/filters/FirstSaveFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ public static function excludes(): array
3131

3232
protected static function checkElement(ElementInterface $element, bool $value): bool
3333
{
34-
return $element->firstSave;
34+
return $element->firstSave === $value;
3535
}
3636
}

src/filters/ProvisionalDraftFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ public static function excludes(): array
3131
protected static function checkElement(ElementInterface $element, bool $value): bool
3232
{
3333
$root = ElementHelper::rootElement($element);
34-
return $root->isProvisionalDraft;
34+
return $root->isProvisionalDraft === $value;
3535
}
3636
}

src/templates/_manage/edit.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@
173173
}
174174
},
175175
rows: webhook.headers,
176+
allowAdd: true,
177+
allowDelete: true,
178+
allowReorder: true,
176179
addRowLabel: 'Add a header'|t('webhooks'),
177180
}) }}
178181

0 commit comments

Comments
 (0)