clean up after refactor

This commit is contained in:
b3yond 2018-03-28 22:12:57 +02:00
parent ec3053a0ab
commit 49bd00fba3
4 changed files with 6 additions and 6 deletions

View file

@ -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(

View file

@ -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',

4
bot.py
View file

@ -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

View file

@ -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