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) {
|
switch ($webmention->type) {
|
||||||
case 'in-reply-to':
|
case 'in-reply-to':
|
||||||
$content['source'] = $webmention->source;
|
$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']);
|
$content['reply'] = $this->filterHTML($microformats['items'][0]['properties']['content'][0]['html']);
|
||||||
$replies[] = $content;
|
$replies[] = $content;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
# Changelog
|
# 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)
|
## Version 0.0.15.7 (2016-11-07)
|
||||||
- Add a reply icon in note metadata
|
- Add a reply icon in note metadata
|
||||||
- Allow notes to be deleted
|
- Allow notes to be deleted
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue