diff --git a/frappe/social/doctype/post/post.py b/frappe/social/doctype/post/post.py
index 0bb64c4046..1e57f93d90 100644
--- a/frappe/social/doctype/post/post.py
+++ b/frappe/social/doctype/post/post.py
@@ -15,9 +15,6 @@ class Post(Document):
frappe.publish_realtime('global_pin', after_commit=True)
def after_insert(self):
- mentions = extract_mentions(self.content)
- for mention in mentions:
- frappe.publish_realtime('mention', "Someone mentioned you", user=mention, after_commit=True)
frappe.publish_realtime('new_post', self.owner, after_commit=True)
@frappe.whitelist()
diff --git a/frappe/social/doctype/post_comment/post_comment.py b/frappe/social/doctype/post_comment/post_comment.py
index cda9f12f31..df24c4609a 100644
--- a/frappe/social/doctype/post_comment/post_comment.py
+++ b/frappe/social/doctype/post_comment/post_comment.py
@@ -11,5 +11,10 @@ class PostComment(Document):
def after_insert(self):
mentions = extract_mentions(self.content)
for mention in mentions:
- frappe.publish_realtime('mention', "Someone mentioned you", user=mention, after_commit=True)
+ if mention == self.owner: continue
+ frappe.publish_realtime('mention', """{} mentioned you!
+
Check Social"""
+ .format(frappe.utils.get_fullname(self.owner)),
+ user=mention,
+ after_commit=True)
frappe.publish_realtime('new_post_comment' + self.parent, self, after_commit=True)