From 62840cdcd24e11a677ac05b97ac80ea2e2fa85f9 Mon Sep 17 00:00:00 2001 From: Mercury <63693594+itinerare@users.noreply.github.com> Date: Wed, 8 Jan 2025 10:23:56 -0500 Subject: [PATCH] fix(galleries): ignore protocol when finding prompt submissions using a gallery submission (#1173) --- app/Models/Gallery/GallerySubmission.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Gallery/GallerySubmission.php b/app/Models/Gallery/GallerySubmission.php index 8607b7e93e..4387bfed4f 100644 --- a/app/Models/Gallery/GallerySubmission.php +++ b/app/Models/Gallery/GallerySubmission.php @@ -480,7 +480,7 @@ public function getCollaboratorApprovedAttribute() { public function getPromptSubmissionsAttribute() { // Only returns submissions which are viewable to everyone, // but given that this is for the sake of public display, that's fine - return Submission::viewable()->whereNotNull('prompt_id')->where('url', $this->url)->get(); + return Submission::viewable()->whereNotNull('prompt_id')->where('url', 'like', '%'.request()->getHost().'/gallery/view/'.$this->id)->get(); } /**