dfsfds
This commit is contained in:
parent
f6e00b5958
commit
a6a145b125
1 changed files with 1 additions and 2 deletions
|
@ -766,7 +766,6 @@ def edit_comment(cid, v):
|
||||||
mentions = soup.find_all("a", href=re.compile("^/@(\w+)"))
|
mentions = soup.find_all("a", href=re.compile("^/@(\w+)"))
|
||||||
|
|
||||||
if len(mentions) > 0:
|
if len(mentions) > 0:
|
||||||
notifs = g.db.query(Notification)
|
|
||||||
for mention in mentions:
|
for mention in mentions:
|
||||||
username = mention["href"].split("@")[1]
|
username = mention["href"].split("@")[1]
|
||||||
|
|
||||||
|
@ -783,7 +782,7 @@ def edit_comment(cid, v):
|
||||||
if ('idio3' in body_html.lower() or 'idio ' in body_html.lower()) and 30 not in notify_users: notify_users.add(30)
|
if ('idio3' in body_html.lower() or 'idio ' in body_html.lower()) and 30 not in notify_users: notify_users.add(30)
|
||||||
|
|
||||||
for x in notify_users:
|
for x in notify_users:
|
||||||
notif = notifs.filter_by(comment_id=c.id, user_id=x).first()
|
notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=x).first()
|
||||||
if not notif:
|
if not notif:
|
||||||
n = Notification(comment_id=c.id, user_id=x)
|
n = Notification(comment_id=c.id, user_id=x)
|
||||||
g.db.add(n)
|
g.db.add(n)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue