Browse Source

Update ap helpers, set text type when appropriate

Daniel Supernault 4 years ago
parent
commit
9f4f983f27
2 changed files with 3 additions and 0 deletions
  1. 2 0
      app/Http/Controllers/StatusController.php
  2. 1 0
      app/Util/ActivityPub/Helpers.php

+ 2 - 0
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) {

+ 1 - 0
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'];