Skip to content

Commit

Permalink
[HOTFIX] EMERG - RELEASE ASAP: add NOT_IN_LIST check for can_follow (#…
Browse files Browse the repository at this point in the history
…107)

* add NOT_IN_LIST check for can_follow

* Update version.py
  • Loading branch information
philip-ulrich authored Nov 30, 2020
1 parent 3b228fc commit f1548e7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
7 changes: 6 additions & 1 deletion GramAddict/plugins/force_interact.dis
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
8 changes: 6 additions & 2 deletions GramAddict/plugins/interact_blogger_followers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
7 changes: 4 additions & 3 deletions GramAddict/plugins/interact_hashtag_likers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion GramAddict/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.1.0"
__version__ = "1.1.1"

0 comments on commit f1548e7

Please sign in to comment.