Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WEB-1151] fix: email notification for mentions #4360

Merged
merged 3 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apiserver/plane/bgtasks/email_notification_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def process_mention(mention_component):
soup = BeautifulSoup(mention_component, "html.parser")
mentions = soup.find_all("mention-component")
for mention in mentions:
user_id = mention["id"]
user_id = mention["entity_identifier"]
user = User.objects.get(pk=user_id)
user_name = user.display_name
highlighted_name = f"@{user_name}"
Expand Down
8 changes: 3 additions & 5 deletions apiserver/plane/bgtasks/notification_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def extract_mentions(issue_instance):
"mention-component", attrs={"target": "users"}
)

mentions = [mention_tag["id"] for mention_tag in mention_tags]
mentions = [mention_tag["entity_identifier"] for mention_tag in mention_tags]

return list(set(mentions))
except Exception:
Expand All @@ -144,7 +144,7 @@ def extract_comment_mentions(comment_value):
"mention-component", attrs={"target": "users"}
)
for mention_tag in mentions_tags:
mentions.append(mention_tag["id"])
mentions.append(mention_tag["entity_identifier"])
return list(set(mentions))
except Exception:
return []
Expand Down Expand Up @@ -663,9 +663,7 @@ def notifications(
"old_value": str(
last_activity.old_value
),
"activity_time": issue_activity.get(
"created_at"
),
"activity_time": str(last_activity.created_at),
},
},
)
Expand Down
Loading