From 9f4f983f27022b04a71d65a418b7a64d7ea8436a Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 20 Jul 2021 22:17:31 -0600 Subject: [PATCH] Update ap helpers, set text type when appropriate --- app/Http/Controllers/StatusController.php | 2 ++ app/Util/ActivityPub/Helpers.php | 1 + 2 files changed, 3 insertions(+) diff --git a/app/Http/Controllers/StatusController.php b/app/Http/Controllers/StatusController.php index 0cf4a513..f4b5f74c 100644 --- a/app/Http/Controllers/StatusController.php +++ b/app/Http/Controllers/StatusController.php @@ -364,6 +364,8 @@ class StatusController extends Controller if($photos >= 1 && $videos >= 1) { return 'photo:video:album'; } + + return 'text'; } public function toggleVisibility(Request $request) { diff --git a/app/Util/ActivityPub/Helpers.php b/app/Util/ActivityPub/Helpers.php index 48d37615..f2e1adec 100644 --- a/app/Util/ActivityPub/Helpers.php +++ b/app/Util/ActivityPub/Helpers.php @@ -416,6 +416,7 @@ class Helpers { public static function importNoteAttachment($data, Status $status) { if(self::verifyAttachments($data) == false) { + $status->viewType(); return; } $attachments = isset($data['object']) ? $data['object']['attachment'] : $data['attachment'];