diff --git a/app/Transformer/Api/StatusTransformer.php b/app/Transformer/Api/StatusTransformer.php index 1ac8a700b..13d62b473 100644 --- a/app/Transformer/Api/StatusTransformer.php +++ b/app/Transformer/Api/StatusTransformer.php @@ -16,6 +16,7 @@ use App\Services\StatusMentionService; use App\Services\ProfileService; use Illuminate\Support\Str; use App\Services\PollService; +use App\Models\CustomEmoji; class StatusTransformer extends Fractal\TransformerAbstract { @@ -36,7 +37,7 @@ class StatusTransformer extends Fractal\TransformerAbstract 'content' => $status->rendered ?? $status->caption, 'content_text' => $status->caption, 'created_at' => $status->created_at->format('c'), - 'emojis' => [], + 'emojis' => CustomEmoji::scan($status->caption), 'reblogs_count' => 0, 'favourites_count' => $status->likes_count ?? 0, 'reblogged' => $status->shared(), diff --git a/public/js/profile.js b/public/js/profile.js index 28a3de548..06f34539d 100644 Binary files a/public/js/profile.js and b/public/js/profile.js differ diff --git a/public/js/rempos.js b/public/js/rempos.js index 507132274..025996e91 100644 Binary files a/public/js/rempos.js and b/public/js/rempos.js differ diff --git a/public/js/rempro.js b/public/js/rempro.js index e71c75983..0343573ae 100644 Binary files a/public/js/rempro.js and b/public/js/rempro.js differ diff --git a/public/js/spa.js b/public/js/spa.js index 6cfcf89c0..4d23f46bf 100644 Binary files a/public/js/spa.js and b/public/js/spa.js differ diff --git a/public/js/status.js b/public/js/status.js index 04ddf45e7..e1c8ae963 100644 Binary files a/public/js/status.js and b/public/js/status.js differ diff --git a/public/js/timeline.js b/public/js/timeline.js index f35154552..492d4c7f3 100644 Binary files a/public/js/timeline.js and b/public/js/timeline.js differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index f1c7068d2..a4a842cee 100644 Binary files a/public/mix-manifest.json and b/public/mix-manifest.json differ diff --git a/resources/assets/js/components/PostComponent.vue b/resources/assets/js/components/PostComponent.vue index 03790913e..9499cd8df 100644 --- a/resources/assets/js/components/PostComponent.vue +++ b/resources/assets/js/components/PostComponent.vue @@ -125,7 +125,7 @@

{{statusUsername}} - +


@@ -953,7 +953,8 @@ export default { }) } ] - } + }, + content: undefined } }, watch: { @@ -1027,6 +1028,11 @@ export default { } self.status = response.data.status; self.media = self.status.media_attachments; + self.content = response.data.status.content; + self.status.emojis.forEach(function(emoji) { + let img = `${emoji.shortcode}`; + self.content = self.content.replace(`:${emoji.shortcode}:`, img); + }); self.likesPage = 2; self.sharesPage = 2; self.showCaption = !response.data.status.sensitive; diff --git a/resources/assets/js/components/partials/StatusCard.vue b/resources/assets/js/components/partials/StatusCard.vue index 4d2422e4d..0b60723b2 100644 --- a/resources/assets/js/components/partials/StatusCard.vue +++ b/resources/assets/js/components/partials/StatusCard.vue @@ -160,7 +160,7 @@ {{status.account.username}} - +

@@ -241,11 +241,18 @@ replyText: '', replyNsfw: false, emoji: window.App.util.emoji, + content: undefined } }, mounted() { + let self = this; this.profile = window._sharedData.curUser; + this.content = this.status.content; + this.status.emojis.forEach(function(emoji) { + let img = `${emoji.shortcode}`; + self.content = self.content.replace(`:${emoji.shortcode}:`, img); + }); }, methods: {