mirror of
https://github.com/discourse/discourse.git
synced 2025-03-09 14:34:35 +00:00
FIX: Could like your own posts if they already had likes
This commit is contained in:
parent
68db4057dc
commit
0b84426a3a
@ -172,9 +172,9 @@ export default function transformPost(currentUser, site, post, prevPost, nextPos
|
||||
|
||||
const likeAction = post.likeAction;
|
||||
if (likeAction) {
|
||||
postAtts.showLike = true;
|
||||
postAtts.liked = likeAction.acted;
|
||||
postAtts.canToggleLike = likeAction.get('canToggle');
|
||||
postAtts.showLike = postAtts.liked || postAtts.canToggleLike;
|
||||
postAtts.likeCount = likeAction.count;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user