From f1548e7ffb088b7bfa88919b9c326bbeaa0d75e2 Mon Sep 17 00:00:00 2001 From: Philip Ulrich Date: Mon, 30 Nov 2020 03:28:21 -0600 Subject: [PATCH] [HOTFIX] EMERG - RELEASE ASAP: add NOT_IN_LIST check for can_follow (#107) * add NOT_IN_LIST check for can_follow * Update version.py --- GramAddict/plugins/force_interact.dis | 7 ++++++- GramAddict/plugins/interact_blogger_followers.py | 8 ++++++-- GramAddict/plugins/interact_hashtag_likers.py | 7 ++++--- GramAddict/version.py | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/GramAddict/plugins/force_interact.dis b/GramAddict/plugins/force_interact.dis index 263998f0..5e294119 100644 --- a/GramAddict/plugins/force_interact.dis +++ b/GramAddict/plugins/force_interact.dis @@ -171,7 +171,12 @@ class ForceIteract(Plugin): can_follow = ( not is_myself and not is_follow_limit_reached() - and storage.get_following_status(username) == FollowingStatus.NONE + and ( + storage.get_following_status(username) + == FollowingStatus.NONE + or storage.get_following_status(username) + == FollowingStatus.NOT_IN_LIST + ) ) interaction_succeed, followed = interaction( diff --git a/GramAddict/plugins/interact_blogger_followers.py b/GramAddict/plugins/interact_blogger_followers.py index ab8a84e0..38cd5976 100644 --- a/GramAddict/plugins/interact_blogger_followers.py +++ b/GramAddict/plugins/interact_blogger_followers.py @@ -301,8 +301,12 @@ def scrolled_to_top(): can_follow = ( not is_myself and not is_follow_limit_reached() - and storage.get_following_status(username) - == FollowingStatus.NONE + and ( + storage.get_following_status(username) + == FollowingStatus.NONE + or storage.get_following_status(username) + == FollowingStatus.NOT_IN_LIST + ) ) interaction_succeed, followed = interaction( diff --git a/GramAddict/plugins/interact_hashtag_likers.py b/GramAddict/plugins/interact_hashtag_likers.py index 7ce7214b..ba986a5d 100644 --- a/GramAddict/plugins/interact_hashtag_likers.py +++ b/GramAddict/plugins/interact_hashtag_likers.py @@ -263,10 +263,11 @@ def handle_hashtag( logger.info(f"@{username}: interact") username_view.click() - can_follow = ( - not is_follow_limit_reached() - and storage.get_following_status(username) + can_follow = not is_follow_limit_reached() and ( + storage.get_following_status(username) == FollowingStatus.NONE + or storage.get_following_status(username) + == FollowingStatus.NOT_IN_LIST ) interaction_succeed, followed = interaction( diff --git a/GramAddict/version.py b/GramAddict/version.py index 6849410a..a82b376d 100644 --- a/GramAddict/version.py +++ b/GramAddict/version.py @@ -1 +1 @@ -__version__ = "1.1.0" +__version__ = "1.1.1"