feat: Added "followerProfileId" to isFollowing() check in follow modules.

This commit is contained in:
zer0dot
2022-09-30 15:35:32 -04:00
parent 77ef3747dc
commit 42b9e30204
4 changed files with 5 additions and 1 deletions

View File

@@ -33,7 +33,7 @@ abstract contract FollowValidationModuleBase is ModuleBase {
address followModule = ILensHub(HUB).getFollowModule(profileId);
bool isFollowing;
if (followModule != address(0)) {
isFollowing = IFollowModule(followModule).isFollowing(profileId, user, 0);
isFollowing = IFollowModule(followModule).isFollowing(0, profileId, user, 0);
} else {
address followNFT = ILensHub(HUB).getFollowNFT(profileId);
isFollowing = followNFT != address(0) && IERC721(followNFT).balanceOf(user) != 0;

View File

@@ -21,6 +21,7 @@ abstract contract FollowValidatorFollowModuleBase is ModuleBase, IFollowModule {
* and other properties.
*/
function isFollowing(
uint256,
uint256 profileId,
address follower,
uint256 followNFTTokenId

View File

@@ -77,6 +77,7 @@ interface IFollowModule {
* 2. The follow module:
* - Validates the subscription status for that given NFT, reverting on an invalid subscription.
*
* @param followerProfileId The LensHub profile token ID of the follower's profile (currently unused, preemptive interface upgrade).
* @param profileId The token ID of the profile to validate the follow for.
* @param follower The follower address to validate the follow for.
* @param followNFTTokenId The followNFT token ID to validate the follow for.
@@ -84,6 +85,7 @@ interface IFollowModule {
* @return true if the given address is following the given profile ID, false otherwise.
*/
function isFollowing(
uint256 followerProfileId,
uint256 profileId,
address follower,
uint256 followNFTTokenId

View File

@@ -27,6 +27,7 @@ contract MockFollowModule is IFollowModule {
) external override {}
function isFollowing(
uint256,
uint256,
address,
uint256