Add a fallback published date
This commit is contained in:
parent
cfbc3daff6
commit
6afc9758e2
2 changed files with 8 additions and 1 deletions
|
@ -104,7 +104,11 @@ class NotesController extends Controller
|
|||
switch ($webmention->type) {
|
||||
case 'in-reply-to':
|
||||
$content['source'] = $webmention->source;
|
||||
$content['date'] = $carbon->parse($microformats['items'][0]['properties']['published'][0])->toDayDateTimeString();
|
||||
if (isset($microformats['items'][0]['properties']['published'][0])) {
|
||||
$content['date'] = $carbon->parse($microformats['items'][0]['properties']['published'][0])->toDayDateTimeString();
|
||||
} else {
|
||||
$content['date'] = $note->webmention->updated_at->toDayDateTimeString();
|
||||
}
|
||||
$content['reply'] = $this->filterHTML($microformats['items'][0]['properties']['content'][0]['html']);
|
||||
$replies[] = $content;
|
||||
break;
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
# Changelog
|
||||
|
||||
## Version 0.0.15.8 (2016-11-07)
|
||||
- Hotfix: facebook’s love-of appears as an in-reply-to without a published date
|
||||
|
||||
## Version 0.0.15.7 (2016-11-07)
|
||||
- Add a reply icon in note metadata
|
||||
- Allow notes to be deleted
|
||||
|
|
Loading…
Add table
Reference in a new issue