mirror of
https://github.com/lens-protocol/core.git
synced 2026-01-14 08:28:03 -05:00
feat: Added "followerProfileId" to isFollowing() check in follow modules.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -21,6 +21,7 @@ abstract contract FollowValidatorFollowModuleBase is ModuleBase, IFollowModule {
|
||||
* and other properties.
|
||||
*/
|
||||
function isFollowing(
|
||||
uint256,
|
||||
uint256 profileId,
|
||||
address follower,
|
||||
uint256 followNFTTokenId
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -27,6 +27,7 @@ contract MockFollowModule is IFollowModule {
|
||||
) external override {}
|
||||
|
||||
function isFollowing(
|
||||
uint256,
|
||||
uint256,
|
||||
address,
|
||||
uint256
|
||||
|
||||
Reference in New Issue
Block a user