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

move message_id threading to communication to work with inbox #2458

Merged
merged 4 commits into from
Dec 15, 2016

Conversation

RobertSchouten
Copy link
Contributor

moves thread matching by message_id to communcation to avoid issues with the upcoming email inbox
please merge before 7.2 to prevent patching

@RobertSchouten
Copy link
Contributor Author

missed a line all good

@rmehta
Copy link
Member

rmehta commented Dec 15, 2016

@RobertSchouten rebase required

if references:
if "notification" in references:
communication.unread_notification_sent = 1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allows direct sending of emails to erpnext systems without response emails being sent preventing infinte loops (though there is still validatation preventing sending to an internal account removed in inbox)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a link yet, so maybe it comes in the next PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notification is added to header here
https://github.com/frappe/frappe/pull/2458/files#diff-a95ae98f6737046bfb40cb1fd19689f8R191
so if email is directly recieved by an erpnext server it set's it so the server believes notifcations are sent


last_mail = frappe.get_doc('Email Queue', dict(reference_name=event.name))
last_mail = frappe.get_doc('Communication', dict(reference_name=event.name))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make a separate test case for communication?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rmehta with this change threading only occurs on messages sent from communications
though ive yet to see an email send from frappe.sendmail that should b included in a thread

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in "Daily Work Summary" threading is by email queue as there are no communications for sent emails

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rmehta modified daily work summary to send a communication
frappe/erpnext#7233

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not allow to thread via Email Queue too? Any harm?

@rmehta rmehta merged commit c044c47 into frappe:develop Dec 15, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants