Fix people who aren't logged in being able to "ghost vote" on a post

This commit is contained in:
2025-09-10 14:29:48 -07:00
parent 7e7e43f6f4
commit 6ea64d3be9

View File

@@ -221,7 +221,7 @@ public class ProfileMenu : MonoBehaviour
entryLikesCount.text = Tools.FormatWithCommas(post.Likes); entryLikesCount.text = Tools.FormatWithCommas(post.Likes);
entryLikesButton.onClick.AddListener(() => entryLikesButton.onClick.AddListener(() =>
{ {
if (canVote && BazookaManager.Instance.GetAccountID() != post.UserID) if (canVote && BazookaManager.Instance.GetAccountID() != null && BazookaManager.Instance.GetAccountID() != post.UserID)
{ {
var likedPosts = BazookaManager.Instance var likedPosts = BazookaManager.Instance
.GetLikedPosts() .GetLikedPosts()