FIX: Build quote share URL using post number, not post ID (#13622)

This commit is contained in:
David Taylor 2021-07-02 22:50:04 +01:00 committed by GitHub
parent 7e6a317597
commit ddaf2f55fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -250,7 +250,9 @@ export default Component.extend({
@discourseComputed("topic.{id,slug}", "quoteState")
shareUrl(topic, quoteState) {
return getAbsoluteURL(postUrl(topic.slug, topic.id, quoteState.postId));
const postId = quoteState.postId;
const postNumber = topic.postStream.findLoadedPost(postId).post_number;
return getAbsoluteURL(postUrl(topic.slug, topic.id, postNumber));
},
@discourseComputed("topic.details.can_create_post", "composerVisible")