]> git.openstreetmap.org Git - rails.git/commitdiff
Set X-Entity-Ref-ID header on notification emails
authorTom Hughes <tom@compton.nu>
Thu, 2 Jan 2020 18:47:14 +0000 (18:47 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 2 Jan 2020 21:45:41 +0000 (21:45 +0000)
This disables threading in gmail completely - without it all
notifications of a given type are grouped together.

app/mailers/notifier.rb

index 1d33db9d8b9fc73e5239f0ee1506f61b27ce9dae..c60dff84b9f0265cfc66137cb5cac3271529e324 100644 (file)
@@ -218,7 +218,9 @@ class Notifier < ApplicationMailer
 
   def set_references(scope, reference_object)
     ref = "osm-#{scope}-#{reference_object.id}@#{Settings.server_url}"
+
+    headers["X-Entity-Ref-ID"] = ref
     headers["In-Reply-To"] = ref
-    headers["References"]  = ref
+    headers["References"] = ref
   end
 end