From ef26fec30597904001d3aa8d342a9e6d96300595 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 27 Jun 2019 00:02:44 -0600 Subject: [PATCH 1/3] Update Autolinker --- app/Util/Lexer/Autolink.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Util/Lexer/Autolink.php b/app/Util/Lexer/Autolink.php index 4ec8c2ef7..4aa38d7f1 100755 --- a/app/Util/Lexer/Autolink.php +++ b/app/Util/Lexer/Autolink.php @@ -718,7 +718,7 @@ class Autolink extends Regex // Replace the username $linkText = Str::startsWith($screen_name, '@') ? $screen_name : '@'.$screen_name; $class = $this->class_user; - $url = $this->url_base_user.$screen_name;; + $url = $this->url_base_user . $screen_name; } if (!empty($class)) { $attributes['class'] = $class; From 28a1495e9e15b2476deebae3e4146612c97089ad Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 27 Jun 2019 00:44:09 -0600 Subject: [PATCH 2/3] Update AP --- app/Util/ActivityPub/Helpers.php | 2 +- app/Util/ActivityPub/Inbox.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Util/ActivityPub/Helpers.php b/app/Util/ActivityPub/Helpers.php index 88a30d585..49a881740 100644 --- a/app/Util/ActivityPub/Helpers.php +++ b/app/Util/ActivityPub/Helpers.php @@ -420,7 +420,7 @@ class Helpers { $profile = Profile::whereRemoteUrl($res['id'])->first(); if(!$profile) { - $profile = new Profile; + $profile = new Profile(); $profile->domain = $domain; $profile->username = (string) Purify::clean($remoteUsername); $profile->name = Purify::clean($res['name']) ?? 'user'; diff --git a/app/Util/ActivityPub/Inbox.php b/app/Util/ActivityPub/Inbox.php index f2bfb7ef6..54aaa4af4 100644 --- a/app/Util/ActivityPub/Inbox.php +++ b/app/Util/ActivityPub/Inbox.php @@ -274,8 +274,10 @@ class Inbox if(is_string($obj) && Helpers::validateUrl($obj)) { // actor object detected // todo delete actor + return; } else if (Helpers::validateUrl($obj['id']) && Helpers::validateObject($obj) && $obj['type'] == 'Tombstone') { // todo delete status or object + return; } } From 96a101e560c29c5db03341440103540deeaccbef Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 27 Jun 2019 00:44:34 -0600 Subject: [PATCH 3/3] Update StatusController --- app/Http/Controllers/StatusController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Http/Controllers/StatusController.php b/app/Http/Controllers/StatusController.php index c79954250..c5a1c9975 100644 --- a/app/Http/Controllers/StatusController.php +++ b/app/Http/Controllers/StatusController.php @@ -60,6 +60,11 @@ class StatusController extends Controller return view($template, compact('user', 'status')); } + public function showEmbed(Request $request, $username, int $id) + { + return; + } + public function showObject(Request $request, $username, int $id) { $user = Profile::whereNull('domain')->whereUsername($username)->firstOrFail();