diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-08-05 19:54:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-05 19:54:29 +0200 |
commit | 115dab78f1cc5357281dcb593f04ac8b2629cec6 (patch) | |
tree | 36725f7a5013a37ab690f59b90d3508ef6742640 /app/mailers | |
parent | 6201bfdfba7626c2b6bc5154dda1f41ee8c3ae71 (diff) |
Change admin UI for hashtags and add back whitelisted trends (#11490)
Fix #271 Add back the `GET /api/v1/trends` API with the caveat that it does not return tags that have not been allowed to trend by the staff. When a hashtag begins to trend (internally) and that hashtag has not been previously reviewed by the staff, the staff is notified. The new admin UI for hashtags allows filtering hashtags by where they are used (e.g. in the profile directory), whether they have been reviewed or are pending reviewal, they show by how many people the hashtag is used in the directory, how many people used it today, how many statuses with it have been created today, and it allows fixing the name of the hashtag to make it more readable. The disallowed hashtags feature has been reworked. It is now controlled from the admin UI for hashtags instead of from the file `config/settings.yml`
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/admin_mailer.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/mailers/admin_mailer.rb b/app/mailers/admin_mailer.rb index 9ab3e2bbd..8abce5f05 100644 --- a/app/mailers/admin_mailer.rb +++ b/app/mailers/admin_mailer.rb @@ -24,4 +24,14 @@ class AdminMailer < ApplicationMailer mail to: @me.user_email, subject: I18n.t('admin_mailer.new_pending_account.subject', instance: @instance, username: @account.username) end end + + def new_trending_tag(recipient, tag) + @tag = tag + @me = recipient + @instance = Rails.configuration.x.local_domain + + locale_for_account(@me) do + mail to: @me.user_email, subject: I18n.t('admin_mailer.new_trending_tag.subject', instance: @instance, name: @tag.name) + end + end end |