Update ap helpers, set text type when appropriate

This commit is contained in:
Daniel Supernault 2021-07-20 22:17:31 -06:00
parent f392fa4ed4
commit 9f4f983f27
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 3 additions and 0 deletions

View file

@ -364,6 +364,8 @@ class StatusController extends Controller
if($photos >= 1 && $videos >= 1) { if($photos >= 1 && $videos >= 1) {
return 'photo:video:album'; return 'photo:video:album';
} }
return 'text';
} }
public function toggleVisibility(Request $request) { public function toggleVisibility(Request $request) {

View file

@ -416,6 +416,7 @@ class Helpers {
public static function importNoteAttachment($data, Status $status) public static function importNoteAttachment($data, Status $status)
{ {
if(self::verifyAttachments($data) == false) { if(self::verifyAttachments($data) == false) {
$status->viewType();
return; return;
} }
$attachments = isset($data['object']) ? $data['object']['attachment'] : $data['attachment']; $attachments = isset($data['object']) ? $data['object']['attachment'] : $data['attachment'];