forked from ticketfrei/ticketfrei
clean up after refactor
This commit is contained in:
parent
21f1e9ddb3
commit
b51449a70a
|
@ -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(
|
||||
|
|
|
@ -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
4
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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue