mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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;
|
const likeAction = post.likeAction;
|
||||||
if (likeAction) {
|
if (likeAction) {
|
||||||
postAtts.showLike = true;
|
|
||||||
postAtts.liked = likeAction.acted;
|
postAtts.liked = likeAction.acted;
|
||||||
postAtts.canToggleLike = likeAction.get('canToggle');
|
postAtts.canToggleLike = likeAction.get('canToggle');
|
||||||
|
postAtts.showLike = postAtts.liked || postAtts.canToggleLike;
|
||||||
postAtts.likeCount = likeAction.count;
|
postAtts.likeCount = likeAction.count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user