Skip to content

Commit

Permalink
[BUGFIX] encode instagram message, since it could have smiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Andriy Oprysko committed Apr 3, 2018
1 parent df0356b commit 4421b13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions Classes/Utility/Task/ImportTaskUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,9 @@ private function saveInstagramFeed($data, Configuration $configuration)
}

if (isset($rawData['location']['name']) && !empty($rawData['location']['name'])) {
$instagram->setMessage($rawData['location']['name']);
$instagram->setMessage($this->encodeMessage($rawData['location']['name']));
} elseif (isset($rawData['caption']['text']) && !empty($rawData['caption']['text'])) {
$instagram->setMessage($rawData['caption']['text']);
$instagram->setMessage($this->encodeMessage($rawData['caption']['text']));
}

$instagram->setPostUrl($rawData['link']);
Expand Down Expand Up @@ -381,7 +381,6 @@ private function updateFacebookFeed($data, Configuration $configuration)
private function setFacebookData(Feed $feed, $rawData)
{
if (isset($rawData['message'])) {

$feed->setMessage($this->encodeMessage($rawData['message']));
}

Expand All @@ -406,14 +405,14 @@ private function updateYoutubeFeed($data, Configuration $configuration)
$rawData['id']['videoId'],
$configuration->getFeedStorage()
)) {
// TODO: Is there something to update?
// TODO: Is there something to update?
} else {
/** @var Feed $youtubeItem */
$youtubeItem = $this->objectManager->get(Feed::class);
$youtubeItem->setExternalIdentifier($rawData['id']['videoId']);
$youtubeItem->setPostDate(new \DateTime($rawData['snippet']['publishedAt']));
$youtubeItem->setPostUrl(
\sprintf(
sprintf(
'https://www.youtube.com/watch?v=%s',
$youtubeItem->getExternalIdentifier()
)
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'uploadfolder' => '0',
'createDirs' => '',
'clearCacheOnLoad' => 0,
'version' => '1.6.1',
'version' => '1.6.2',
'constraints' => [
'depends' => [
'typo3' => '7.6.0-8.9.99',
Expand Down

0 comments on commit 4421b13

Please sign in to comment.