diff --git a/kibicara/platforms/email/bot.py b/kibicara/platforms/email/bot.py index 43c3e12..e5f5f6b 100644 --- a/kibicara/platforms/email/bot.py +++ b/kibicara/platforms/email/bot.py @@ -24,11 +24,7 @@ class EmailBot(Censor): """ Loop which waits for new messages and sends emails to all subscribers. """ while True: message = await self.receive() - for subscriber in EmailSubscribers(hood=self.hood.id): - payload = { - 'email': subscriber.email, - 'hood': self.hood.id, - } + for subscriber in EmailSubscribers.objects.filter(hood=self.hood.id): token = to_token(email=subscriber.email, hood=self.hood.id) unsubscribe_link = ( config['root_url']