fix(plugin): Only active users can and should be notified

This commit is contained in:
Ferdinand Thiessen 2021-12-05 22:56:34 +01:00
parent 5819a0637f
commit 239faac7dd
1 changed files with 4 additions and 3 deletions

View File

@ -102,6 +102,7 @@ class Plugin:
db.session.commit()
def notify(self, user, text: str, data=None):
if not user.deleted:
n = Notification(text=text, data=data, plugin=self.id, user_=user)
db.session.add(n)
db.session.commit()