misc: Allow owner or DE of author to self-collect

This commit is contained in:
donosonaumczuk
2023-11-17 17:28:08 -03:00
parent 5c06611785
commit f0cda4f197

View File

@@ -585,9 +585,12 @@ contract LensHub is
if (__DEPRECATED__collectModuleWhitelisted[msg.sender]) {
// This state was pre-filled at LegacyCollectLib and it is a hack to make legacy collect work when
// configured for followers only.
return _legacyCollectFollowValidationHelper[followerAddress] == followedProfileId;
return
_legacyCollectFollowValidationHelper[followerAddress] == followedProfileId ||
ProfileLib.isExecutorApproved(followedProfileId, followerAddress) ||
ProfileLib.ownerOf(followedProfileId) == followerAddress;
} else {
revert(Errors.ExecutorInvalid());
revert Errors.ExecutorInvalid();
}
}
}