Skip to content

Commit

Permalink
Fixed updating search index jobs with emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Croker committed Dec 11, 2019
1 parent 3c267de commit 22b72ab
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Release Notes for Campaign

## 1.12.4 - Unreleased
## 1.12.4 - 2019-12-11
### Changed
- Made sendout `notificationEmailAddress` field not required.

### Fixed
- Fixed a bug with anonymous actions in the `WebhookController` ([#99](https://github.com/putyourlightson/craft-campaign/issues/99)).
- Fixed a bug that was preventing updating search index jobs from completing because of an emoji in the sendout subject. ([#101](https://github.com/putyourlightson/craft-campaign/issues/101)).

## 1.12.3 - 2019-12-04
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "putyourlightson/craft-campaign",
"description": "Send and manage email campaigns, contacts and mailing lists.",
"version": "1.12.3",
"version": "1.12.4",
"type": "craft-plugin",
"homepage": "https://craftcampaign.com/",
"license": "proprietary",
Expand Down
12 changes: 12 additions & 0 deletions src/elements/SendoutElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,18 @@ public function getPlaintextBody()
return $campaign->getPlaintextBody();
}

/**
* @inheritdoc
*/
public function getSearchKeywords(string $attribute): string
{
if ($attribute == 'subject') {
return LitEmoji::unicodeToShortcode($this->$attribute);
}

return parent::getSearchKeywords($attribute);
}

/**
* @inheritdoc
*/
Expand Down

0 comments on commit 22b72ab

Please sign in to comment.