Skip to content

Commit

Permalink
deactivate social avatars from twitter
Browse files Browse the repository at this point in the history
Signed-off-by: call-me-matt <nextcloud@matthiasheinisch.de>
  • Loading branch information
call-me-matt committed Jul 7, 2023
1 parent cecab50 commit 82fde0e
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 324 deletions.
1 change: 0 additions & 1 deletion img/twitter.svg

This file was deleted.

4 changes: 1 addition & 3 deletions lib/Service/Social/CompositeSocialProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class CompositeSocialProvider {

public function __construct(InstagramProvider $instagramProvider,
MastodonProvider $mastodonProvider,
TwitterProvider $twitterProvider,
// FacebookProvider $facebookProvider,
TumblrProvider $tumblrProvider,
DiasporaProvider $diasporaProvider,
Expand All @@ -43,8 +42,7 @@ public function __construct(InstagramProvider $instagramProvider,
$this->providers = [
$instagramProvider->name => $instagramProvider,
$mastodonProvider->name => $mastodonProvider,
$twitterProvider->name => $twitterProvider,
// $facebookProvider->name => $facebookProvider,
// $facebookProvider->name => $facebookProvider,
$tumblrProvider->name => $tumblrProvider,
$diasporaProvider->name => $diasporaProvider,
$xingProvider->name => $xingProvider,
Expand Down
2 changes: 0 additions & 2 deletions lib/Service/Social/TelegramProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\RequestOptions;
use OC\AppFramework\Http\Request;
use OCA\Contacts\AppInfo\Application;
use OCP\Http\Client\IClientService;
use Psr\Log\LoggerInterface;
Expand Down Expand Up @@ -127,7 +126,6 @@ protected function getFromHtml(string $url, string $desired) : ?string {
try {
$result = $this->httpClient->get($url, [
RequestOptions::HEADERS => [
// Make the request as google bot so twitter display the full static html page
'User-Agent' => 'Googlebot/2.1'
]
]);
Expand Down
156 changes: 0 additions & 156 deletions lib/Service/Social/TwitterProvider.php

This file was deleted.

4 changes: 2 additions & 2 deletions tests/unit/Service/Social/TelegramProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ public function dataProviderGetImageUrls() {
$contactWithoutSocialImgs = [];

return [
'contact with twitter fields' => [
'contact with social fields' => [
$contactWithSocial,
$contactWithSocialHtml,
$contactWithSocialUrls,
$contactWithSocialImgs
],
'contact without twitter fields' => [
'contact without social fields' => [
$contactWithoutSocial,
$contactWithoutSocialHtml,
$contactWithoutSocialUrls,
Expand Down
160 changes: 0 additions & 160 deletions tests/unit/Service/Social/TwitterProviderTest.php

This file was deleted.

0 comments on commit 82fde0e

Please sign in to comment.