Skip to content

Commit

Permalink
Update custom emoji json-ld
Browse files Browse the repository at this point in the history
  • Loading branch information
dansup committed Jan 21, 2022
1 parent 6ec1c84 commit 46d5f12
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/Models/CustomEmoji.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static function scan($text, $activitypub = false)
$url = url('/storage/' . $tag->media_path);

if($activitypub == true) {
$mediaType = Str::endsWith($url, '.png') ? 'image/png' : 'image/jpeg';
$mediaType = Str::endsWith($url, '.png') ? 'image/png' : 'image/jpg';
return [
'id' => url('emojis/' . $tag->id),
'type' => 'Emoji',
Expand Down
4 changes: 3 additions & 1 deletion app/Transformer/ActivityPub/Verb/CreateNote.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ public function transform(Status $status)
'announce' => ['@type' => '@id'],
'like' => ['@type' => '@id'],
'reply' => ['@type' => '@id']
]
],
'toot' => 'http://joinmastodon.org/ns#',
'Emoji' => 'toot:Emoji'
]
],
'id' => $status->permalink(),
Expand Down
4 changes: 3 additions & 1 deletion app/Transformer/ActivityPub/Verb/Note.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ public function transform(Status $status)
'announce' => ['@type' => '@id'],
'like' => ['@type' => '@id'],
'reply' => ['@type' => '@id'],
]
],
'toot' => 'http://joinmastodon.org/ns#',
'Emoji' => 'toot:Emoji'
]
],
'id' => $status->url(),
Expand Down

0 comments on commit 46d5f12

Please sign in to comment.