Merge pull request #1632 from nabinhait/develop
[fix] Don't notify to all system users from communication
This commit is contained in:
commit
4b35abd92b
1 changed files with 1 additions and 6 deletions
|
|
@ -3,10 +3,8 @@
|
|||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.desk.notifications import delete_notification_count_for
|
||||
from frappe.core.doctype.user.user import STANDARD_USERS
|
||||
from frappe.utils.user import get_enabled_system_users
|
||||
from frappe.utils import cint
|
||||
|
||||
@frappe.whitelist()
|
||||
|
|
@ -88,10 +86,7 @@ def post(txt, contact, parenttype=None, notify=False, subject=None):
|
|||
delete_notification_count_for("Messages")
|
||||
|
||||
if notify and cint(notify):
|
||||
if contact==frappe.session.user:
|
||||
_notify([user.name for user in get_enabled_system_users()], txt)
|
||||
else:
|
||||
_notify(contact, txt, subject)
|
||||
_notify(contact, txt, subject)
|
||||
|
||||
return d
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue