Commit graph

98 commits

Author SHA1 Message Date
Jeremy Kescher
9090719153
Merge remote-tracking branch 'refs/remotes/upstream/stable-4.3' into develop 2024-10-10 22:57:13 +02:00
Matt Jankowski
25de2f57ee Add coverage for missing status scenario in NotificationMailer (#32256) 2024-10-07 10:54:23 +02:00
Jeremy Kescher
1290a5609d
Merge branch 'glitch-v4.3.0-rc.1' into develop 2024-10-03 22:25:40 +02:00
Matt Jankowski
83574f641a
Add coverage and use mailer callback to check functional user in notification mailer (#32055) 2024-09-25 08:07:48 +00:00
Matt Jankowski
19dedd7cfd
Set important mailer headers with after_action callback (#32057) 2024-09-24 13:16:31 +00:00
Matt Jankowski
2946a9286b
Use headers shorthand in mailers (#31956) 2024-09-19 13:38:32 +00:00
Jeremy Kescher
0b66cfbc8d
Merge remote-tracking branch 'upstream/main' into develop
Some checks failed
Bundler Audit / security (push) Has been cancelled
Check i18n / check-i18n (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (ruby) (push) Has been cancelled
Crowdin / Upload translations / upload-translations (push) Has been cancelled
Check formatting / lint (push) Has been cancelled
CSS Linting / lint (push) Has been cancelled
Haml Linting / lint (push) Has been cancelled
JavaScript Linting / lint (push) Has been cancelled
Ruby Linting / lint (push) Has been cancelled
JavaScript Testing / test (push) Has been cancelled
Historical data migration test / test (14-alpine) (push) Has been cancelled
Historical data migration test / test (15-alpine) (push) Has been cancelled
Ruby Testing / build (production) (push) Has been cancelled
Ruby Testing / build (test) (push) Has been cancelled
Ruby Testing / test (.ruby-version) (push) Has been cancelled
Ruby Testing / test (3.1) (push) Has been cancelled
Ruby Testing / test (3.2) (push) Has been cancelled
Ruby Testing / Libvips tests (.ruby-version) (push) Has been cancelled
Ruby Testing / Libvips tests (3.1) (push) Has been cancelled
Ruby Testing / Libvips tests (3.2) (push) Has been cancelled
Ruby Testing / End to End testing (.ruby-version) (push) Has been cancelled
Ruby Testing / End to End testing (3.1) (push) Has been cancelled
Ruby Testing / End to End testing (3.2) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.10.2) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (3.1, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (3.2, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Has been cancelled
2024-09-10 16:15:59 +02:00
Claire
559958f8c5
Fix email language when recipient has no selected locale (#31747) 2024-09-04 17:35:40 +00:00
Jeremy Kescher
fae98d1deb
Merge branch 'refs/heads/glitch-soc' into develop
# Conflicts:
#	app/javascript/flavours/glitch/initial_state.js
#	app/javascript/mastodon/initial_state.js
2024-05-20 23:57:04 +02:00
Matt Jankowski
a6d12299f2
Remove duplicate method def ApplicationHelper#instance_presenter (#30331) 2024-05-17 08:29:13 +00:00
Jeremy Kescher
e73c612cb1
Merge branch 'refs/heads/glitch-soc' into develop 2024-05-11 23:31:31 +02:00
Matt Jankowski
c4feba4347
Use existing MascotHelper#instance_presenter instead of local var in welcome email template (#29759) 2024-03-26 15:58:48 +00:00
Claire
cfea9cc172
Add list of pending releases directly in mail notifications for version updates (#29436) 2024-03-26 14:45:19 +00:00
Jeremy Kescher
caccc2e0f4
Merge branch 'glitch-soc' into develop
# Conflicts:
#	README.md
#	app/javascript/flavours/glitch/components/status.jsx
#	app/javascript/flavours/glitch/features/notifications/components/column_settings.jsx
#	app/javascript/flavours/glitch/locales/en.json
#	app/javascript/flavours/glitch/reducers/compose.js
#	app/javascript/flavours/glitch/styles/components.scss
#	app/javascript/mastodon/reducers/compose.js
#	app/models/notification.rb
2024-03-14 20:01:30 +01:00
HTeuMeuLeu
934cab7508
New welcome email (#28883)
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
2024-03-01 12:16:53 +00:00
Jeremy Kescher
a4e12a484d
Merge branch 'glitch-soc' into develop 2024-02-24 11:11:24 +01:00
Claire
d23f445527 Automatically switch from open to approved registrations in absence of moderators (#29318) 2024-02-22 20:45:40 +01:00
Claire
2751acb6cd
Automatically switch from open to approved registrations in absence of moderators (#29318) 2024-02-21 17:45:06 +00:00
Jeremy Kescher
c2c2afc294
Merge branch 'glitch-soc' into develop 2024-01-28 02:29:46 +01:00
Claire
e2d9635074
Add notification email on invalid second authenticator (#28822) 2024-01-22 13:55:43 +00:00
Jeremy Kescher
5d4cfe4cd8
Merge branch 'glitch-soc' into develop 2024-01-17 22:37:29 +01:00
HTeuMeuLeu
7f471e70c0
Update new email templates (#28416)
Co-authored-by: Matt Jankowski <matt@jankowski.online>
2024-01-15 18:18:59 +00:00
Essem
08a21c1af6
Add notification emails for reactions 2023-12-29 12:33:13 -06:00
Matt Jankowski
7cfc078198
Fix rails mailer preview not honouring locale (#28418) 2023-12-18 21:49:17 +00:00
Matt Jankowski
2d536bb05f
Use admin_mailer layout with initial salutation (#28085) 2023-11-28 07:41:26 +00:00
Matt Jankowski
9b8ba9b350
Remove unused plain_mailer layout (#28065) 2023-11-27 10:40:03 +00:00
Matt Jankowski
1f5187e2e2
Misc spec/refactor to user mailer and user mailer spec (#27486) 2023-10-27 09:57:16 +00:00
Claire
16681e0f20
Add admin notifications for new Mastodon versions (#26582) 2023-09-01 17:47:07 +02:00
Christian Schmidt
ca342d4838
Add List-Unsubscribe email header (#26085) 2023-08-01 19:34:40 +02:00
Matt Jankowski
f3fca78756
Refactor NotificationMailer to use parameterization (#25718) 2023-07-10 03:06:22 +02:00
Matt Jankowski
cf33028f35
Admin mailer parameterization (#25759) 2023-07-08 20:03:38 +02:00
Eugen Rochko
6637ef7852
Add unsubscribe link to e-mails (#25378) 2023-06-12 14:22:46 +02:00
Heitor de Melo Cardozo
4601e0dcbb
Add user handle to notification mail recipient address (#24240)
Co-authored-by: luccamps <luccamps@users.noreply.github.com>
Co-authored-by: Leonardo Negreiros de Oliveira <negreirosleo12@gmail.com>
Co-authored-by: Marcio Flavio <mflaviof1995@gmail.com>
Co-authored-by: Gabriel Quaresma <j.quaresmasantos_98@hotmail.com>
2023-04-17 11:06:06 +02:00
Claire
d6679d1751
Add mail headers to avoid auto-replies (#23597) 2023-03-03 20:44:46 +01:00
Nick Schonning
f0e1b12c10
Autofix Rubocop Style/ExplicitBlockArgument (#23704) 2023-02-20 11:18:08 +09:00
zunda
09191dee66
Add single splat to callback method definitions to avoid ArgumentError (#22246)
It looks like a [bug](https://bugs.ruby-lang.org/issues/18633) around
autosplat is [fixed](fbaadd1cfe)
on ruby-3.2.0-rc1 and breaks a test (but not on ruby <= 3.1.3):

```
$ bundle exec rspec ./spec/controllers/api/v1/emails/confirmations_controller_spec.rb:41
  :
  1) Api::V1::Emails::ConfirmationsController#create with an oauth token from an app that created the account when the account is already confirmed but user changed e-mail and has not confirmed it returns http success
     Failure/Error:
         def email_changed(user, **)
           @resource = user
           @instance = Rails.configuration.x.local_domain

           return unless @resource.active_for_authentication?

           I18n.with_locale(locale) do
             mail to: @resource.email, subject: I18n.t('devise.mailer.email_changed.subject')
           end
         end

     ArgumentError:
       wrong number of arguments (given 2, expected 1)
     # ./app/mailers/user_mailer.rb:51:in `email_changed'
     # ./app/models/user.rb:444:in `render_and_send_devise_message'
     # ./app/models/user.rb:430:in `block in send_pending_devise_notifications'
     # ./app/models/user.rb:429:in `each'
     # ./app/models/user.rb:429:in `send_pending_devise_notifications'
     # ./spec/controllers/api/v1/emails/confirmations_controller_spec.rb:38:in `block (7 levels) in <top (required)>'
```
2022-12-13 20:03:16 +01:00
Eugen Rochko
45ebdb72ca
Add support for language preferences for trending statuses and links (#18288) 2022-10-08 16:45:40 +02:00
Eugen Rochko
0b3e4fd5de
Remove digest e-mails (#17985)
* Remove digest e-mails

* Remove digest-related code
2022-08-25 23:38:22 +02:00
Jeong Arm
fed7380e9f
Prevent use locale with empty string (#18543)
Somehow user's locale could be an empty string, And empty string itself
are treated as true value.
2022-05-28 14:32:08 +02:00
Claire
ce9dcbea32
Fix failure when sending warning emails with custom text (#17983)
* Add tests

* Fix failure when sending warning emails with custom text
2022-04-07 14:47:30 +02:00
Eugen Rochko
6221b36b27
Remove sign-in token authentication, instead send e-mail about new sign-in (#17970) 2022-04-06 20:58:12 +02:00
Eugen Rochko
cefa526c6d
Refactor formatter (#17828)
* Refactor formatter

* Move custom emoji pre-rendering logic to view helpers

* Move more methods out of Formatter

* Fix code style issues

* Remove Formatter

* Add inline poll options to RSS feeds

* Remove unused helper method

* Fix code style issues

* Various fixes and improvements

* Fix test
2022-03-26 02:53:34 +01:00
Eugen Rochko
27965ce5ed
Add trending statuses (#17431)
* Add trending statuses

* Fix dangling items with stale scores in localized sets

* Various fixes and improvements

- Change approve_all/reject_all to approve_accounts/reject_accounts
- Change Trends::Query methods to not mutate the original query
- Change Trends::Query#skip to offset
- Change follow recommendations to be refreshed in a transaction

* Add tests for trending statuses filtering behaviour

* Fix not applying filtering scope in controller
2022-02-25 00:34:14 +01:00
helloworldstack
2426577a91
Fix sign in token and warning emails failed to send in some cases (#17589) 2022-02-18 20:43:42 +01:00
Eugen Rochko
564efd0651
Add appeals (#17364)
* Add appeals

* Add ability to reject appeals and ability to browse pending appeals in admin UI

* Add strikes to account page in settings

* Various fixes and improvements

- Add separate notification setting for appeals, separate from reports
- Fix style of links in report/strike header
- Change approving an appeal to not restore statuses (due to federation complexities)
- Change style of successfully appealed strikes on account settings page
- Change account settings page to only show unappealed or recently appealed strikes

* Change appealed_at to overruled_at

* Fix missing method error
2022-02-14 21:27:53 +01:00
Eugen Rochko
14f436c457
Add notifications for statuses deleted by moderators (#17204) 2022-01-17 09:41:33 +01:00
Eugen Rochko
a458b74c7e
Fix error on trending mailer due to missing constant (#17072) 2021-11-29 17:39:40 +01:00
Eugen Rochko
6e50134a42
Add trending links (#16917)
* Add trending links

* Add overriding specific links trendability

* Add link type to preview cards and only trend articles

Change trends review notifications from being sent every 5 minutes to being sent every 2 hours

Change threshold from 5 unique accounts to 15 unique accounts

* Fix tests
2021-11-25 13:07:38 +01:00
Claire
43eff898a0
Prepare Mastodon for Rails 6 (#15911)
* Fix misuse of foreign_type

* Fix use of removed "add_template_helper"

* Use response.media_type instead of response.content_type in tests

* Fix CSV export controller test on Rails 6

Rails 6 sets a "filename*" field in the Content-Disposition header to
explicitly encode the filename as UTF-8.

This changes checks the first part of the Content-Disposition header so
it matches in both Rails 5 and Rails 6.

* Fix emoji formatting with Rails 6

* Make emoji output more idiomatic and robust

* Switch from redis-rails gem to built-in Rails redis cache storage
2021-03-17 10:09:55 +01:00
Eugen Rochko
ed099d8bdc
Change account suspensions to be reversible by default (#14726) 2020-09-15 14:37:58 +02:00