diff --git a/raven/api/upload_file.py b/raven/api/upload_file.py index f1ee1362..23e28bcd 100644 --- a/raven/api/upload_file.py +++ b/raven/api/upload_file.py @@ -79,6 +79,7 @@ def upload_file_with_message(): message_doc = frappe.new_doc("Raven Message") message_doc.channel_id = frappe.form_dict.channelID message_doc.message_type = "File" + message_doc.text = frappe.form_dict.caption message_doc.insert() frappe.form_dict.docname = message_doc.name diff --git a/raven/raven_integrations/doctype/raven_document_notification/raven_document_notification.py b/raven/raven_integrations/doctype/raven_document_notification/raven_document_notification.py index 44ffc0fb..7cf2a0d4 100644 --- a/raven/raven_integrations/doctype/raven_document_notification/raven_document_notification.py +++ b/raven/raven_integrations/doctype/raven_document_notification/raven_document_notification.py @@ -146,7 +146,14 @@ def resolve_recipient(recipient): return channels, users -doctypes_to_be_ignored = ["Raven Document Notification", "Version", "Comment"] +doctypes_to_be_ignored = [ + "Raven Document Notification", + "Version", + "Comment", + "DocType", + "Module Def", + "Custom Field", +] def run_document_notification(doc, method): @@ -157,7 +164,12 @@ def run_document_notification(doc, method): if doc.doctype in doctypes_to_be_ignored: return - if frappe.flags.in_import or frappe.flags.in_patch or frappe.flags.in_install: + if ( + frappe.flags.in_import + or frappe.flags.in_patch + or frappe.flags.in_install + or frappe.flags.in_uninstall + ): return def _get_notifications():