mirror of
https://github.com/discourse/discourse.git
synced 2025-02-22 07:17:57 +08:00

We recently fixed a problem where secure upload images weren't re-attached when sending the activity summary e-mail. This fix contained a bug that would lead to n copies of the e-mail body being included, n being the number of duplicates. This is because #fix_parts_after_attachments! was called once per attachment, and adding more parts to the multipart e-mail. This PR fixes that by: Adding a failing test case for the above. Moving the looping over multiple posts into #fix_parts_after_attachments! itself.