fix(plugin): Only active users can and should be notified
This commit is contained in:
parent
5819a0637f
commit
239faac7dd
|
@ -102,9 +102,10 @@ class Plugin:
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
def notify(self, user, text: str, data=None):
|
def notify(self, user, text: str, data=None):
|
||||||
n = Notification(text=text, data=data, plugin=self.id, user_=user)
|
if not user.deleted:
|
||||||
db.session.add(n)
|
n = Notification(text=text, data=data, plugin=self.id, user_=user)
|
||||||
db.session.commit()
|
db.session.add(n)
|
||||||
|
db.session.commit()
|
||||||
|
|
||||||
def serialize(self):
|
def serialize(self):
|
||||||
"""Serialize a plugin into a dict
|
"""Serialize a plugin into a dict
|
||||||
|
|
Loading…
Reference in New Issue