mirror of
https://github.com/discourse/discourse.git
synced 2025-03-05 00:42:09 +08:00

Since 3b13f1146b2a406238c50d6b45bc9aa721094f46 the email threading in mail clients has been broken, because the random suffix meant that the References header would always be different for non-group SMTP email notifications sent out. This commit fixes the issue by always using the "canonical" topic reference ID inside the References header in the format: topic/TOPIC_ID@HOST Which was the old format. We also add the References header to notifications sent for the first post arriving, so the threading works for subsequent emails. The Message-ID header is still random as per the previous change.