Skip to content

Commit

Permalink
Refs FedStoa#108 - Conditional posting from Twitter
Browse files Browse the repository at this point in the history
And fix behaviour for conditional toot relaying also.
  • Loading branch information
xurizaemon committed Mar 11, 2019
1 parent 4a65222 commit 40476ec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion moa/toot.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def should_skip(self):

elif self.settings.conditional_posting_faves and not self.is_favourited:
logger.info(f'Skipping: Not posting unfavourited toot')
pass
return True

elif self.settings.conditional_posting:

Expand Down
8 changes: 8 additions & 0 deletions moa/tweet.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ def should_skip(self):
# Posting retweets
pass

elif self.settings.conditional_posting_faves and not self.is_favorited:
logger.info(f'Skipping: Not posting unfavorited tweet')
return True

elif self.settings.conditional_posting:

for ht in self.data.hashtags:
Expand Down Expand Up @@ -138,6 +142,10 @@ def is_retweet(self):
def is_quoted(self):
return self.data.quoted_status is not None

@property
def is_favorited(self):
return self.data.favorited

@property
def is_reply(self):

Expand Down

0 comments on commit 40476ec

Please sign in to comment.