Skip to content

Commit

Permalink
Allow mastodon in SocialMediaSharersNew (#1770)
Browse files Browse the repository at this point in the history
  • Loading branch information
nlisgo authored Mar 31, 2023
1 parent 9a475dc commit 76ef17e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/ViewModel/Converter/ArticleContentHeaderConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ public function convert($object, string $viewModel = null, array $context = [])
'#cite-this-article',
new ViewModel\SocialMediaSharersNew(
strip_tags($object->getFullTitle()),
"https://doi.org/{$object->getDoi()}"
"https://doi.org/{$object->getDoi()}",
true,
true
),
!empty($context['metrics']) ? ViewModel\ContextualData::withMetrics($context['metrics']) : null,
null,
Expand Down
4 changes: 3 additions & 1 deletion src/ViewModel/Converter/ArticleModalConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ public function convert($object, string $viewModel = null, array $context = [])
ViewModel\Button::clipboard('Copy to clipboard', "https://doi.org/{$object->getDoi()}"),
new ViewModel\SocialMediaSharersNew(
strip_tags($object->getFullTitle()),
"https://doi.org/{$object->getDoi()}"
"https://doi.org/{$object->getDoi()}",
true,
true
),
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public function convert($object, string $viewModel = null, array $context = [])
new ViewModel\SocialMediaSharersNew(
strip_tags($object->getTitle()),
$this->urlGenerator->generate('inside-elife-article', [$object], UrlGeneratorInterface::ABSOLUTE_URL),
false
false,
true
),
!empty($context['metrics']) ? ViewModel\ContextualData::withMetrics($context['metrics']) : null,
null,
Expand Down
3 changes: 2 additions & 1 deletion src/ViewModel/Converter/DigestContentHeaderConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ public function convert($object, string $viewModel = null, array $context = [])
new ViewModel\SocialMediaSharersNew(
strip_tags($object->getTitle()),
$this->urlGenerator->generate('digest', [$object], UrlGeneratorInterface::ABSOLUTE_URL),
false
false,
true
),
!empty($context['metrics']) ? ViewModel\ContextualData::withMetrics($context['metrics']) : null,
null,
Expand Down

0 comments on commit 76ef17e

Please sign in to comment.