Remove Twitter POSSE support
This commit is contained in:
parent
52b1220068
commit
88e1246f8b
15 changed files with 1 additions and 365 deletions
|
@ -6,9 +6,7 @@ namespace App\Services;
|
|||
|
||||
use App\Exceptions\InternetArchiveException;
|
||||
use App\Jobs\ProcessBookmark;
|
||||
use App\Jobs\SyndicateBookmarkToTwitter;
|
||||
use App\Models\Bookmark;
|
||||
use App\Models\SyndicationTarget;
|
||||
use App\Models\Tag;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\ClientException;
|
||||
|
@ -47,23 +45,6 @@ class BookmarkService extends Service
|
|||
$bookmark->tags()->save($tag);
|
||||
}
|
||||
|
||||
$mpSyndicateTo = null;
|
||||
if (Arr::get($request, 'mp-syndicate-to')) {
|
||||
$mpSyndicateTo = Arr::get($request, 'mp-syndicate-to');
|
||||
}
|
||||
if (Arr::get($request, 'properties.mp-syndicate-to')) {
|
||||
$mpSyndicateTo = Arr::get($request, 'properties.mp-syndicate-to');
|
||||
}
|
||||
$mpSyndicateTo = Arr::wrap($mpSyndicateTo);
|
||||
foreach ($mpSyndicateTo as $uid) {
|
||||
$target = SyndicationTarget::where('uid', $uid)->first();
|
||||
if ($target && $target->service_name === 'Twitter') {
|
||||
SyndicateBookmarkToTwitter::dispatch($bookmark);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ProcessBookmark::dispatch($bookmark);
|
||||
|
||||
return $bookmark;
|
||||
|
|
|
@ -6,7 +6,6 @@ namespace App\Services;
|
|||
|
||||
use App\Jobs\SendWebMentions;
|
||||
use App\Jobs\SyndicateNoteToMastodon;
|
||||
use App\Jobs\SyndicateNoteToTwitter;
|
||||
use App\Models\Media;
|
||||
use App\Models\Note;
|
||||
use App\Models\Place;
|
||||
|
@ -50,11 +49,6 @@ class NoteService extends Service
|
|||
|
||||
dispatch(new SendWebMentions($note));
|
||||
|
||||
// Syndication targets
|
||||
if (in_array('twitter', $this->getSyndicationTargets($request), true)) {
|
||||
dispatch(new SyndicateNoteToTwitter($note));
|
||||
}
|
||||
|
||||
if (in_array('mastodon', $this->getSyndicationTargets($request), true)) {
|
||||
dispatch(new SyndicateNoteToMastodon($note));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue