Update custom emoji json-ld

This commit is contained in:
Daniel Supernault 2022-01-21 01:55:58 -07:00
parent 6ec1c8468a
commit 46d5f12590
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
3 changed files with 7 additions and 3 deletions

View file

@ -31,7 +31,7 @@ class CustomEmoji extends Model
$url = url('/storage/' . $tag->media_path); $url = url('/storage/' . $tag->media_path);
if($activitypub == true) { if($activitypub == true) {
$mediaType = Str::endsWith($url, '.png') ? 'image/png' : 'image/jpeg'; $mediaType = Str::endsWith($url, '.png') ? 'image/png' : 'image/jpg';
return [ return [
'id' => url('emojis/' . $tag->id), 'id' => url('emojis/' . $tag->id),
'type' => 'Emoji', 'type' => 'Emoji',

View file

@ -64,7 +64,9 @@ class CreateNote extends Fractal\TransformerAbstract
'announce' => ['@type' => '@id'], 'announce' => ['@type' => '@id'],
'like' => ['@type' => '@id'], 'like' => ['@type' => '@id'],
'reply' => ['@type' => '@id'] 'reply' => ['@type' => '@id']
] ],
'toot' => 'http://joinmastodon.org/ns#',
'Emoji' => 'toot:Emoji'
] ]
], ],
'id' => $status->permalink(), 'id' => $status->permalink(),

View file

@ -65,7 +65,9 @@ class Note extends Fractal\TransformerAbstract
'announce' => ['@type' => '@id'], 'announce' => ['@type' => '@id'],
'like' => ['@type' => '@id'], 'like' => ['@type' => '@id'],
'reply' => ['@type' => '@id'], 'reply' => ['@type' => '@id'],
] ],
'toot' => 'http://joinmastodon.org/ns#',
'Emoji' => 'toot:Emoji'
] ]
], ],
'id' => $status->url(), 'id' => $status->url(),