Fix support for ownyourgram, hopefully

This commit is contained in:
Jonny Barnes 2017-06-11 20:54:10 +01:00
parent 2cd8a2c110
commit 2d7aee25c6
6 changed files with 112 additions and 2 deletions

View file

@ -87,6 +87,7 @@ class MicropubController extends Controller
//create checkin place
if (array_key_exists('checkin', $request->input('properties'))) {
$data['checkin'] = $request->input('properties.checkin.0.properties.url.0');
$data['swarm-url'] = $request->input('properties.syndication.0');
try {
$this->placeService->createPlaceFromCheckin($request->input('properties.checkin.0'));
} catch (\Exception $e) {
@ -143,6 +144,9 @@ class MicropubController extends Controller
$data['photo'][] = $photo;
}
}
if (starts_with($request->input('properties.syndication.0'), 'https://www.instagram.com')) {
$data['instagram-url'] = $request->input('properties.syndication.0');
}
}
try {
$note = $this->noteService->createNote($data);