From 23268f6557e4d4c1d4b1409f11bae99ec8d60db8 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Mon, 18 Jan 2021 16:11:44 +0100 Subject: [PATCH] Fixed hook for mail sending --- flaschengeist/plugins/message_mail.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flaschengeist/plugins/message_mail.py b/flaschengeist/plugins/message_mail.py index 9e6875f..3d2f162 100644 --- a/flaschengeist/plugins/message_mail.py +++ b/flaschengeist/plugins/message_mail.py @@ -1,9 +1,10 @@ import smtplib -from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText +from email.mime.multipart import MIMEMultipart from flaschengeist import logger from flaschengeist.models.user import User +from flaschengeist.utils.hook import HookAfter from flaschengeist.controller import userController from flaschengeist.controller.messageController import Message @@ -20,7 +21,7 @@ class MailMessagePlugin(Plugin): self.crypt = config["CRYPT"] self.mail = config["MAIL"] - # @send_message_hook + @HookAfter("send_message") def dummy_send(msg): self.send_mail(msg)