bb
This commit is contained in:
parent
094a1537fe
commit
e1457d558e
5 changed files with 6 additions and 22 deletions
|
@ -104,7 +104,9 @@ def NOTIFY_USERS(text, v):
|
|||
soup = BeautifulSoup(text, features="html.parser")
|
||||
for mention in soup.find_all("a", href=re.compile("^\/id\/([0-9]+)")):
|
||||
id = int(mention["href"].split("/id/")[1])
|
||||
if id != v.id: notify_users.add(id)
|
||||
if id != v.id:
|
||||
user = g.db.query(User).filter_by(id=id).one_or_none()
|
||||
if user and not v.any_block_exists(user): notify_users.add(user.id)
|
||||
|
||||
return notify_users
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue