Automatically send webmentions, move the sending logic into the job
This commit is contained in:
parent
b9d30bf063
commit
995140bb95
3 changed files with 44 additions and 55 deletions
|
@ -5,6 +5,7 @@ namespace App\Services;
|
|||
use App\Note;
|
||||
use App\Place;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Jobs\SendWebmentions;
|
||||
use App\Jobs\SyndicateToTwitter;
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use App\Http\Controllers\WebMentionsController;
|
||||
|
@ -45,10 +46,7 @@ class NoteService
|
|||
}
|
||||
}
|
||||
|
||||
if ($request->input('webmentions')) {
|
||||
$wmc = new WebMentionsController();
|
||||
$wmc->send($note);
|
||||
}
|
||||
$this->dispatch(new SendWebmentions($note));
|
||||
|
||||
if (//micropub request, syndication sent as array
|
||||
(is_array($request->input('mp-syndicate-to'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue