From b51449a70a958834e5bb7d00b4863f7491403f2f Mon Sep 17 00:00:00 2001 From: b3yond Date: Wed, 28 Mar 2018 22:12:57 +0200 Subject: [PATCH] clean up after refactor --- active_bots/mastodonbot.py | 5 ++--- backend.py | 2 +- bot.py | 4 ++-- promotion/README.md | 1 + 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/active_bots/mastodonbot.py b/active_bots/mastodonbot.py index ad741f5..c0e0240 100755 --- a/active_bots/mastodonbot.py +++ b/active_bots/mastodonbot.py @@ -26,10 +26,9 @@ class MastodonBot(Bot): return mentions for status in notifications: if (status['type'] == 'mention' and - status['status']['id'] > self.seen_toots): + status['status']['id'] > user.get_seen_toot()): # save state - self.seen_toots = status['status']['id'] - self.save_last() + user.save_seen_toot(status['status']['id']) # add mention to mentions text = re.sub(r'<[^>]*>', '', status['status']['content']) text = re.sub( diff --git a/backend.py b/backend.py index 5ed1efd..bba591a 100755 --- a/backend.py +++ b/backend.py @@ -33,7 +33,7 @@ if __name__ == '__main__': time.sleep(60) # twitter rate limit >.< except: logger.error('Shutdown', exc_info=True) - mailer = sendmail.Mailer(config) + mailer = sendmail.Mailer() try: mailer.send('', config['web']['contact'], 'Ticketfrei Crash Report', diff --git a/bot.py b/bot.py index 0f135f7..b003ab8 100644 --- a/bot.py +++ b/bot.py @@ -1,8 +1,8 @@ class Bot(object): # returns a list of Report objects - def crawl(user): + def crawl(self, user): pass # post/boost Report object - def post(user, report): + def post(self, user, report): pass diff --git a/promotion/README.md b/promotion/README.md index 2c69555..5b89d99 100644 --- a/promotion/README.md +++ b/promotion/README.md @@ -8,6 +8,7 @@ Students: usually already have a ticket, but may be solidaric Leftist scene * Flyers in alternative centers * Graffitis in alternative neighbourhoods +* Posters in social centers Schools: * especially trade schools