Fix issue #51
This commit is contained in:
parent
9e2b930634
commit
41ea6c3b29
2 changed files with 10 additions and 3 deletions
|
@ -112,9 +112,13 @@ class NotesController extends Controller
|
|||
case 'in-reply-to':
|
||||
$content['source'] = $webmention->source;
|
||||
if (isset($microformats['items'][0]['properties']['published'][0])) {
|
||||
try {
|
||||
$content['date'] = $carbon->parse(
|
||||
$microformats['items'][0]['properties']['published'][0]
|
||||
)->toDayDateTimeString();
|
||||
} catch (\Exception $exception) {
|
||||
$content['date'] = $webmention->updated_at->toDayDateTimeString();
|
||||
}
|
||||
} else {
|
||||
$content['date'] = $webmention->updated_at->toDayDateTimeString();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
# Changelog
|
||||
|
||||
## Version 0.5.8 (2017-05-21)
|
||||
- Hotfix: if Carbon can’t parse the supplied published date of a webmention, use the Model’s `updated_at` value
|
||||
|
||||
## Version 0.5.7 (2017-05-19)
|
||||
- Hotfix: make sure `mpSyndicateTo` variable exists when accessed in if statements
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue