From 52131a143b2afa5643ca1fa94885a656476c7b41 Mon Sep 17 00:00:00 2001 From: MillenniumEarl Date: Wed, 3 Mar 2021 11:43:17 +0100 Subject: [PATCH] Find correct owner --- src/scripts/classes/mapping/post.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scripts/classes/mapping/post.ts b/src/scripts/classes/mapping/post.ts index a98f69a..0b618e5 100644 --- a/src/scripts/classes/mapping/post.ts +++ b/src/scripts/classes/mapping/post.ts @@ -116,7 +116,8 @@ export default class Post { this._lastEdit = new Date(sLastEdit); // Find post's owner - this._owner = new PlatformUser(0); + const sOwnerID: string = post.find(POST.OWNER_ID).attr("data-user-id").trim(); + this._owner = new PlatformUser(parseInt(sOwnerID)); await this._owner.fetch(); // Find if the post is bookmarked