forked from mirror/pixelfed
Update AP Inbox, fix url parser
This commit is contained in:
parent
4b90b1e0df
commit
72a1a1ea19
1 changed files with 4 additions and 4 deletions
|
@ -287,12 +287,12 @@ class Inbox
|
|||
}
|
||||
}
|
||||
|
||||
if(filter_var($msg, FILTER_VALIDATE_URL)) {
|
||||
if(Helpers::validateUrl($msg)) {
|
||||
if(filter_var($msgText, FILTER_VALIDATE_URL)) {
|
||||
if(Helpers::validateUrl($msgText)) {
|
||||
$dm->type = 'link';
|
||||
$dm->meta = [
|
||||
'domain' => parse_url($msg, PHP_URL_HOST),
|
||||
'local' => parse_url($msg, PHP_URL_HOST) ==
|
||||
'domain' => parse_url($msgText, PHP_URL_HOST),
|
||||
'local' => parse_url($msgText, PHP_URL_HOST) ==
|
||||
parse_url(config('app.url'), PHP_URL_HOST)
|
||||
];
|
||||
$dm->save();
|
||||
|
|
Loading…
Reference in a new issue