fix(hooks): remove postCid requirement from isAccountCommentAuthor check

This commit is contained in:
plebeius
2025-11-25 14:57:39 +01:00
parent 26278f92c6
commit 6175744e7b
+2 -2
View File
@@ -19,10 +19,10 @@ const useAuthorPrivileges = ({ commentAuthorAddress, subplebbitAddress, postCid
const accountAuthorRole = roles?.[accountAuthorAddress]?.role;
const isAccountMod = accountAuthorRole === 'admin' || accountAuthorRole === 'owner' || accountAuthorRole === 'moderator';
const isAccountCommentAuthor = !!postCid && accountAuthorAddress === commentAuthorAddress;
const isAccountCommentAuthor = accountAuthorAddress === commentAuthorAddress;
return { isCommentAuthorMod, isAccountMod, isAccountCommentAuthor, commentAuthorRole, accountAuthorRole };
}, [roles, commentAuthorAddress, accountAuthorAddress, postCid]);
}, [roles, commentAuthorAddress, accountAuthorAddress]);
return { isCommentAuthorMod, isAccountMod, isAccountCommentAuthor, commentAuthorRole, accountAuthorRole };
};