Skip to content

Commit

Permalink
fix: FollowersOnlyPostRule - Always allow author to interact with him…
Browse files Browse the repository at this point in the history
…self
  • Loading branch information
donosonaumczuk committed Feb 6, 2025
1 parent 9e407df commit ddba861
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contracts/rules/post/FollowersOnlyPostRule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ contract FollowersOnlyPostRule is IPostRule, OwnableMetadataBasedRule {
CreatePostParams calldata postParams
) internal view returns (bool) {
IFeed feed = IFeed(msg.sender);
if (feed.getPostAuthor(rootPostId) == postParams.author) {
// Author can always reply, repost or quote their own posts.
return false;
}
if (configuration.repliesRestricted && postParams.repliedPostId != 0) {
uint256 repliedPostRootId = feed.getPost(postParams.repliedPostId).rootPostId;
if (repliedPostRootId == rootPostId) {
Expand Down

0 comments on commit ddba861

Please sign in to comment.