Skip to content

Commit

Permalink
Merge pull request #25 from pixelant/development
Browse files Browse the repository at this point in the history
[BUGFIX] encode instagram message, since it could have smiles
  • Loading branch information
anjeylink authored Apr 3, 2018
2 parents df0356b + 4421b13 commit 89e1437
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 89e1437

Please sign in to comment.