Skip to content

Commit

Permalink
fix(galleries): ignore protocol when finding prompt submissions using…
Browse files Browse the repository at this point in the history
… a gallery submission (#1173)
  • Loading branch information
itinerare authored Jan 8, 2025
1 parent b1a146b commit 62840cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Models/Gallery/GallerySubmission.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand Down

0 comments on commit 62840cd

Please sign in to comment.