Skip to content
Snippets Groups Projects
Commit 8f12c025 authored by Nasreddin (bon)'s avatar Nasreddin (bon)
Browse files

[FIX] mail: mail not sent because partner not find in chatter + unit test


Issue

	- Install "Project" module
	- Go to the chatter of any Task
	- Log the following message (by selecting the partner) then send:
	"test@test.com
	@marc Demo "

	Message is not sent.

Cause

	When parsing the content, the match result is "@test.com\n@Marc Demo" due
	to no space between the two mentions

Solution

	Add space after line break (only when parsing selection).
	In this case, it will match with 2 mentions instead:
	"@test.com\n" and "@marc Demo "

	For _generateMentionsLinks step, add a space after '</br>',
	it will match 2 mentions but we remove the ones that end
	with '</br>'. This last fix is to avoid having a non-mention
	string containing '</br>' (for example), and therefore not
	having them escaped in final message content.

opw-2322577

closes odoo/odoo#59648

Signed-off-by: default avatarAlexandre Kühn (aku) <aku@odoo.com>
parent cf8545e1
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment