Browse Source

Switched follow bot to user stream to see boosts (seed follow account to start spread out from home instance); updated status checking for follow to properly handle boosts

merge-requests/3/head
KemoNine 4 years ago
parent
commit
1210aa0981
  1. 3
      botstreamlisteners.py
  2. 2
      toot_bot.py

3
botstreamlisteners.py

@ -313,6 +313,8 @@ CREATE TABLE IF NOT EXISTS follow_cache (
self.conn.commit()
def process_toot(self, status):
if 'reblog' in status:
status = status['reblog']
"""Method that follows unseen users."""
federated = '@' in status['account']['acct']
username = status['account']['acct']
@ -357,7 +359,6 @@ CREATE TABLE IF NOT EXISTS follow_cache (
mastodon.account_follow(status['account']['id'])
# Cache user to avoid duping welcome messages
self.cursor.execute('insert into follow_cache values (?, ?)',
(username, timestamp))

2
toot_bot.py

@ -166,7 +166,7 @@ def follow(config):
api_base_url=config['config']['api_base_url']
)
mastodon.public_stream(FollowBot(config))
mastodon.user_stream(FollowBot(config))
def autorespond(config):
"""Auto respond to @'s to the configured account"""

Loading…
Cancel
Save