diff --git a/apiserver/plane/bgtasks/email_notification_task.py b/apiserver/plane/bgtasks/email_notification_task.py index 050f522c33d..fa154828b84 100644 --- a/apiserver/plane/bgtasks/email_notification_task.py +++ b/apiserver/plane/bgtasks/email_notification_task.py @@ -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}" diff --git a/apiserver/plane/bgtasks/notification_task.py b/apiserver/plane/bgtasks/notification_task.py index 5725abc624b..9dfd0c16dc8 100644 --- a/apiserver/plane/bgtasks/notification_task.py +++ b/apiserver/plane/bgtasks/notification_task.py @@ -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: @@ -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 [] @@ -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), }, }, )