diff --git a/app/labor/assign_tag_moderator.rb b/app/labor/assign_tag_moderator.rb index 7908cb27a..183d23c18 100644 --- a/app/labor/assign_tag_moderator.rb +++ b/app/labor/assign_tag_moderator.rb @@ -17,7 +17,7 @@ module AssignTagModerator add_tag_mod_role(user, tag) add_trusted_role(user) add_to_chat_channels(user, tag) - NotifyMailer.tag_moderator_confirmation_email(user, tag).deliver unless tag.name == "go" + NotifyMailer.tag_moderator_confirmation_email(user, tag, chat_channel_slug(tag)).deliver end end @@ -48,4 +48,8 @@ module AssignTagModerator Rails.cache.delete("user-#{user.id}/tag_moderators_list") MailchimpBot.new(user).manage_tag_moderator_list end + + def self.chat_channel_slug(tag) + tag.mod_chat_channel&.slug + end end diff --git a/app/mailers/notify_mailer.rb b/app/mailers/notify_mailer.rb index 343fdfbd9..7a8fc234e 100644 --- a/app/mailers/notify_mailer.rb +++ b/app/mailers/notify_mailer.rb @@ -112,9 +112,10 @@ class NotifyMailer < ApplicationMailer mail(to: @user.email, subject: "The export of your content is ready") end - def tag_moderator_confirmation_email(user, tag) + def tag_moderator_confirmation_email(user, tag, channel_slug) @tag = tag @user = user + @channel_slug = channel_slug subject = "Congrats! You're the moderator for ##{@tag.name}" mail(to: @user.email, subject: subject) end diff --git a/app/views/mailers/notify_mailer/tag_moderator_confirmation_email.html.erb b/app/views/mailers/notify_mailer/tag_moderator_confirmation_email.html.erb index bd8ad493d..338744b13 100644 --- a/app/views/mailers/notify_mailer/tag_moderator_confirmation_email.html.erb +++ b/app/views/mailers/notify_mailer/tag_moderator_confirmation_email.html.erb @@ -2,32 +2,57 @@ Hey <%= @user.name %>!

- Thanks for volunteering to be a <%= community_name %> tag moderator. We’ve added you as a moderator for - <%= @tag.name %>. You’re currently the only non-core <%= community_name %> member that’s moderating this tag. Over time, we’ll add additional mods to join you because we view moderation as a collaborative endeavor that benefits from the support of multiple people. + Thanks for volunteering to be a <%= community_name %> tag moderator. We’ve added you as a moderator for #<%= @tag.name %>. Note that your profile picture is now visible on this page.

- As a tag moderator, you are now able to: + As a tag moderator, you are able to:

-

For details on how to access these features, visit our - tag moderation page.

+

- To aid in communication, we’ve added you to a tag moderator - "><%= community_name %> Connect channel. You can use this channel to meet other tag moderators across site, and to coordinate with the <%= community_name %> team. When in doubt about how to exercise your new privileges, please ask! + For details on how to access them, visit our + tag moderation page.

+

- Tag moderation is still very much in beta, so we’ll be making adjustments and expanding features over time as we receive feedback. + To aid in communication, we’ve added you to the following <%= community_name %> Connect channels:

-

Thanks for volunteering your time to benefit the <%= community_qualified_name %>.

+ + +

- Happy Coding! + You can use these channels to meet other tag moderators across the site and co-moderators within your tag while coordinating with the <%= community_name %> team. When in doubt about how to exercise your new privileges, please ask! If these Connect channels become too distracting, you can mute or leave any channel as you wish. +

+ +

+ Tag moderation is something we're continuously iterating on, so you can expect adjustments and expanding features over time as we receive feedback. We regularly send out a biweekly Mod Newsletter to keep mods up to date on these changes, so look out for it! Of course, don't hesitate to reach out to us at any moment if you have any feedback — feel free to write to <%= SiteConfig.email_addresses[:default] %> and share your thoughts. +

+ +

+ Thanks so much for volunteering your time to benefit the <%= community_qualified_name %>. We sincerely appreciate your help!.

+

+ +

+ Happy Modding!
- <%= community_name %> Team

diff --git a/app/views/mailers/notify_mailer/tag_moderator_confirmation_email.text.erb b/app/views/mailers/notify_mailer/tag_moderator_confirmation_email.text.erb index 3ac7ae252..bb2af020a 100644 --- a/app/views/mailers/notify_mailer/tag_moderator_confirmation_email.text.erb +++ b/app/views/mailers/notify_mailer/tag_moderator_confirmation_email.text.erb @@ -1,18 +1,25 @@ Hey <%= @user.name %>! -Thanks for volunteering to be a <%= community_name %> tag moderator. We’ve added you as a moderator for <%= tag_url(@tag) %>. You’re currently the only non-core <%= community_name %> member that’s moderating this tag. Over time, we’ll add additional mods to join you because we view moderation as a collaborative endeavor that benefits from the support of multiple people. +Thanks for volunteering to be a <%= community_name %> tag moderator. We’ve added you as a moderator for <%= tag_url(@tag) %>. Note that your profile picture is now visible on this page. -As a tag moderator, you are now able to: -- Remove the tag if it’s been added to an irrelevant post. -- Update the the tag sidebar +As a tag moderator, you are able to: -For details on how to access these features, visit our tag moderation page: <%= app_url("tag_moderation_url") %>. +- Remove #<%= @tag %> if it’s been added to an irrelevant post. +- Add #<%= @tag %> to posts if applicable. +- Update the #<%= @tag %> tag landing page, including submission guidelines and design visible in the sidebar. -To aid in communication, we’ve added you to a tag moderator <%= community_name %> Connect channel: <%= app_url("/connect/tag-moderators") %>. You can use this channel to meet other tag moderators across site, and to coordinate with the <%= community_name %> team. When in doubt about how to exercise your new privileges, please ask! +For details on all available features and how to access them, visit our tag moderation page. -Tag moderation is still very much in beta, so we’ll be making adjustments and expanding features over time as we receive feedback. +To aid in communication, we’ve added you to the following <%= community_name %> Connect channels: -Thanks for volunteering your time to benefit the <%= community_qualified_name %>. +- Tag Moderators <%= app_url("/connect/tag-moderators") %> +- #<%= @tag %> -Happy Coding! -- <%= community_name %> Team +You can use these channels to meet other tag moderators across the site and co-moderators within your tag while coordinating with the <%= community_name %> team. When in doubt about how to exercise your new privileges, please ask! If these Connect channels become too distracting, you can mute or leave any channel as you wish. + +Tag moderation is something we're continuously iterating on, so you can expect adjustments and expanding features over time as we receive feedback. We regularly send out a biweekly Mod Newsletter to keep mods up to date on these changes, so look out for it! Of course, don't hesitate to reach out to us at any moment if you have any feedback — feel free to write to <%= SiteConfig.email_addresses[:default] %> and share your thoughts. + +Thanks so much for volunteering your time to benefit the <%= community_qualified_name %>. We sincerely appreciate your help! + +Happy Modding! +<%= community_name %> Team diff --git a/spec/mailers/notify_mailer_spec.rb b/spec/mailers/notify_mailer_spec.rb index 6d9d88962..6f123d10b 100644 --- a/spec/mailers/notify_mailer_spec.rb +++ b/spec/mailers/notify_mailer_spec.rb @@ -428,7 +428,7 @@ RSpec.describe NotifyMailer, type: :mailer do describe "#tag_moderator_confirmation_email" do let(:tag) { create(:tag) } - let(:email) { described_class.tag_moderator_confirmation_email(user, tag) } + let(:email) { described_class.tag_moderator_confirmation_email(user, tag, "javascript-4l67") } it "renders proper subject" do expect(email.subject).to eq("Congrats! You're the moderator for ##{tag.name}") diff --git a/spec/mailers/previews/notify_mailer_preview.rb b/spec/mailers/previews/notify_mailer_preview.rb index d0275450f..1f67bda00 100644 --- a/spec/mailers/previews/notify_mailer_preview.rb +++ b/spec/mailers/previews/notify_mailer_preview.rb @@ -39,7 +39,7 @@ class NotifyMailerPreview < ActionMailer::Preview end def tag_moderator_confirmation_email - NotifyMailer.tag_moderator_confirmation_email(User.first, Tag.find(1)) + NotifyMailer.tag_moderator_confirmation_email(User.first, Tag.find(1), nil) end def trusted_role_email