about summary refs log tree commit diff
path: root/app/views/user_mailer
AgeCommit message (Collapse)Author
2020-06-09Add e-mail-based sign in challenge for users with disabled 2FA (#14013)Eugen Rochko
2020-04-15Fix “Email changed” notification sometimes having wrong e-mail (#13475)ThibG
* Fix “Email changed” notification sometimes having wrong e-mail Fixes #6778 The root of the issue is that `send_devise_notification` was called before the changes were properly commited to the database, causing the mailer to pick previous values if running too early. Devise's documentation provides guidance on how to handle that[1][2], however, I have found it to not be working, as the following happens, in that order: - `send_devise_notification` is called for the `email_changed` notification. In that case, `changed?` is false and `saved_changes?` is true, so if we use the former, we have the same issue. - the `after_commit` hook is called - `send_devise_notification` is called for the `confirmation_instructions` notification. In that case, `changed?` is still false, and `saved_changes?` still true, so if we use the latter, that second notification email is simply not going to be sent (as we would be queuing the notification *after* executing the after_commit hook). This is because it may be called from either an `after_update` or `after_commit` hook, the difference not being a call to `save` but the transaction actually being committed to the database. This may arguably be a bug in Devise, or Devise's notification. The proposed workaround is inspired by Devise's documentation but checks whether a transaction is open to make the call whether to immediately send the notification or defer it to the `after_commit` hook. [1]: https://www.rubydoc.info/github/plataformatec/devise/Devise%2FModels%2FAuthenticatable:send_devise_notification [2]: https://github.com/heartcombo/devise/blob/406915cb781e38255a30ad2a0609e33952b9ec50/lib/devise/models/authenticatable.rb#L133-L194 * Fix cases when sending notifications without changing the model * Defer sending if and only if in transaction including current record
2019-09-18Add password challenge to 2FA settings, e-mail notifications (#11878)Eugen Rochko
Fix #3961
2019-09-12Fix nil error in warning e-mail template (#11812)Eugen Rochko
2019-09-03Fix error in user warning template (#11741)Eugen Rochko
2019-08-30Fix error in warning e-mail template (#11698)Eugen Rochko
2019-08-23Add option to include reported statuses in warning e-mail (#11639)Eugen Rochko
2019-03-15Bump webpacker from 3.5.5 to 4.0.2 (#10277)Yamagishi Kazutoshi
Bumps [webpacker](https://github.com/rails/webpacker) from 3.5.5 to 4.0.2. - [Release notes](https://github.com/rails/webpacker/releases) - [Changelog](https://github.com/rails/webpacker/blob/master/CHANGELOG.md) - [Commits](https://github.com/rails/webpacker/compare/v3.5.5...v4.0.2) Signed-off-by: dependabot[bot] <support@dependabot.com> Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2019-03-14Admission-based registrations mode (#10250)Eugen Rochko
Fix #6856 Fix #6951
2018-12-24Add REST API for creating an account (#9572)Eugen Rochko
* Add REST API for creating an account The method is available to apps with a token obtained via the client credentials grant. It creates a user and account records, as well as an access token for the app that initiated the request. The user is unconfirmed, and an e-mail is sent as usual. The method returns the access token, which the app should save for later. The REST API is not available to users with unconfirmed accounts, so the app must be smart to wait for the user to click a link in their e-mail inbox. The method is rate-limited by IP to 5 requests per 30 minutes. * Redirect users back to app from confirmation if they were created with an app * Add tests * Return 403 on the method if registrations are not open * Require agreement param to be true in the API when creating an account
2018-12-22Remove links to bridge.joinmastodon.org (non-functional) (#9608)Eugen Rochko
Add link to profile directory
2018-12-22Add moderation warnings (#9519)Eugen Rochko
* Add moderation warnings Replace individual routes for disabling, silencing, and suspending a user, as well as the report update route, with a unified account action controller that allows you to select an action (none, disable, silence, suspend) as well as whether it should generate an e-mail notification with optional custom text. That notification, with the optional custom text, is saved as a warning. Additionally, there are warning presets you can configure to save time when performing the above. * Use Account#local_username_and_domain
2018-03-19Fix e-mail changed notification (fixes #6778) (#6835)ThibG
In Devise::Mailer#email_changed, the new email might be in the email attr. See: https://github.com/plataformatec/devise/blob/master/app/views/devise/mailer/email_changed.html.erb
2018-02-21Account archive download (#6460)Eugen Rochko
* Fix #201: Account archive download * Export actor and private key in the archive * Optimize BackupService - Add conversation to cached associations of status, because somehow it was forgotten and is source of N+1 queries - Explicitly call GC between batches of records being fetched (Model class allocations are the worst offender) - Stream media files into the tar in 1MB chunks (Do not allocate media file (up to 8MB) as string into memory) - Use #bytesize instead of #size to calculate file size for JSON (Fix FileOverflow error) - Segment media into subfolders by status ID because apparently GIF-to-MP4 media are all named "media.mp4" for some reason * Keep uniquely generated filename in Paperclip::GifTranscoder * Ensure dumped files do not overwrite each other by maintaing directory partitions * Give tar archives a good name * Add scheduler to remove week-old backups * Fix code style issue
2018-01-20Improve HTML e-mails based on Litmus tests (#6301)Eugen Rochko
* Use PNG images in HTML e-mails * Make webpack use URLs with host so fonts load inside HTML e-mails Convert this back to a relative URL in the premailer CSS loader since local requests are quicker * Improve responsive design * Add missing PNG icon
2018-01-20Make text e-mails consistent with HTML ones in UserMailer (#6291)Eugen Rochko
* Make text e-mails consistent with HTML ones in UserMailer * Fix UserMailer specs
2018-01-18Replace tutorial modal with welcome e-mail (#6273)Eugen Rochko
* Remove onboarding modal * Welcome e-mail * Send welcome e-mail after confirmation * Remove obsolete translations
2018-01-16Change image URL in mailer to full path (#6264)Yamagishi Kazutoshi
2018-01-16HTML e-mails for UserMailer (#6256)Eugen Rochko
- premailer gem to turn CSS into inline styles automatically - rework UserMailer templates - reword UserMailer templates
2018-01-07Update Simplified Chinese translations (#6215)SerCom_KC
* i18n: (zh-CN) Add translations of #6125 * i18n: (zh-CN) Add translations of #6132 * i18n: (zh-CN) Add translations of #6099 * i18n: (zh-CN) Add translations of #6071 * i18n: (zh-CN) Improve translations
2018-01-05l10n Occitan language: mailer update (#6193)Quenty31
* Create email_changed.oc.html.erb * Create email_changed.oc.text.erb * Update email_changed.oc.html.erb * Update email_changed.oc.html.erb * Create reconfirmation_instructions.oc.html.erb * Create reconfirmation_instructions.oc.text.erb * Update confirmation_instructions.oc.html.erb * Update confirmation_instructions.oc.text.erb * Update confirmation_instructions.oc.html.erb * Update reconfirmation_instructions.oc.html.erb * Update reconfirmation_instructions.oc.text.erb * Update reconfirmation_instructions.oc.html.erb
2018-01-03i18n: Update Polish translation (#6168)Marcin Mikołajczak
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2018-01-03Add Japanese translations #5997, #6003, #6004, #6071, #6099, #6125 and #6132 ↵Yamagishi Kazutoshi
(#6167) * yarn manage:translations * Add Japanese translation for #5997 * Add Japanese translation for #6003 * Add Japanese translation for #6004 * Add Japanese translation for #6071 * Add Japanese translation for #6099 * Add Japanese translation for #6125 * Add Japanese translation for #6132
2018-01-02Add confirmation step for email changes (#6071)Patrick Figel
* Add confirmation step for email changes This adds a confirmation step for email changes of existing users. Like the initial account confirmation, a confirmation link is sent to the new address. Additionally, a notification is sent to the existing address when the change is initiated. This message includes instruction to reset the password immediately or to contact the instance admin if the change was not initiated by the account owner. Fixes #3871 * Add review fixes
2018-01-02Adding Serbian latin translations (#6146)Branko Kokanovic
Serbian latin (sr-Latn) is generated automatically from Serbian (sr) translation. Also changed some wording in original (Serbian) translation.
2017-12-31Adding Serbian translation (#6133)Branko Kokanovic
* Adding Serbian translation * i18n-tasks normalize
2017-11-14l10n: PT-BR translation updated (#5681)Anna e só
* Improved e-mail messages; delted repeated words * pt-BR.json translations updated * Revert "pt-BR.json translations updated" This reverts commit 108c460531196fed6e6d14f93e8d8d047c835ffd. * Updated pt-BR.json * pt-BR.yml updated
2017-11-08i10n OC: Memorial (#5615) + #5467 (#5623)Quenty31
* Changed ĩ => ï * Changed ĩ => ï * Add ability to disable login and mark accounts as memorial (#5615)
2017-10-30Updating Chinese (Simplified) translations (#5508)SerCom_KC
* i18n: (zh-CN) fix punctuations and spaces Spaces are fixed according to https://github.com/sparanoid/chinese-copywriting-guidelines * i18n: (zh-CN) fix punctuation * i18n: (zh-CN) Adapt official translation of Discourse Privacy Policy from GitHub, with minor fixes https://github.com/discourse/discourse/blob/master/config/locales/server.zh_CN.yml#L2677 * i18n: (zh-CN) Update missing translations * i18n: (zh-CN) Fixing errors * i18n: (zh-CN) Fix indent error * i18n: (zh-CN) Fix language tag * i18n: (zh-CN) Remove quotes * i18n: (zh-CN) Update translation (#5485) * i18n: (zh-CN) Remove whitespaces, x -> × * i18n: (zh-CN) Rewording on time distance * i18n: (zh-CN) Overall improvements * i18n: (zh-CN) i18n-tasks normalization * i18n: (zh-CN) Add missing translation
2017-10-17Swedish translation (#5406)Håkan Eriksson
* Swedish file added * Swedish file added * Swedish file updated * Swedish languagefile added * Add Swedish translation * Add Swedish translation * Started the Swedish translation * Added Swedish lang settings * Updating Swedish language * Updating Swedish language * Updating Swedish language * Updating Swedish language * Updating Swedish language * Updating Swedish language * Swedish language completed and added * Swedish language Simple_form added * Swedish language Divise added * Swedish language doorkeeper added * Swedish language - now all file complete
2017-10-02Fix stupid typo (#5184)Jeong Arm
2017-10-02Korean translation (#5185)Jeong Arm
* Add missing Korean translations * Add Korean email confirmation template * Fix Korean typo
2017-10-02Append confirmation link as plain text (#5146)Jeong Arm
* Append confirmation link as plain text Some mail application is malfunctioning with links. * Change description text
2017-09-19A few updates to the Spanish translation and some typos fixing (#4997)BruWalfas
* So Spanish. Much changes. Wow. * Some little fixes * Updated es.yml, and fixed some ortographical errors * Some little changes to simple_form.es.yml * Yeah, so much translations * Spanish e-mail messages * Remove unused message
2017-09-16Minor Chinese check & jsx addition (#4973)Mingye Wang
* zh-*: transition from "like" back to "fav" This commit reverts the translation for the yellow-star "fav" button back to "fav" in Chinese. Some ambuiguity between "like" and "fav" is deliberately used in zh-TW/HK by using the existing phrase "最爱" (favorite (adj.), lit. love-most) instead of "收藏" (favourite (v.), "collect") in some instances. Fixes #3511. * zh-*: apply suggestions for PR #4557 * zh-cn: de-monetize ya account In Chinese two separate characters, 账 and 帐, can be used to spell the word for account (账/帐户). However, the one with a 贝 on the left is evolved from the latter specifically for monetary purposes. Since people usually can't figure out which one to use, it might be a good idea to use the original not-so-money one. * zh-*: complete jsx translation
2017-09-11l10n: Full PT-BR translation (#4882)Anna e só
* devise.pt-BR.yml now fully translated * pt-BR.json now fully translated * pt-BR.yml partially translated; 46 lines left * pt-BR.yml now fully translated * simple_form.pt-BR.yml fully translated * doorkeeper.pt-BR.yml now fully translated * E-mail instructions on app/views/user_mailer added and fully translated * PT-BR translation for #4871 * Deleted an unwanted caracter on pt-BR.yml * Fixing typos on pt-BR.yml * Added translation for Pinned toots tab on pt-BR.json * Added missing translation for navigation_bar.pins
2017-09-09i10n minors changes for 1.6 (#4867)Quent-in
* wrong preposition + typo * wrong preposition + typo * Typo * Typo * minor changes * minor changes
2017-09-07i10n OC / FR update Pinned toots (#4842)Quent-in
* Added column.pins New strings * Added column.pins * Update confirmation_instructions.oc.html.erb * Update confirmation_instructions.oc.text.erb * Update password_change.oc.html.erb * Update password_change.oc.text.erb * Update reset_password_instructions.oc.html.erb * Update reset_password_instructions.oc.text.erb * Update confirmation_instructions.oc.html.erb * Update confirmation_instructions.oc.text.erb
2017-07-31i18n: update Persian translation (#4470)Masoud Abkenar
* i18n: update Persian translation * i18n: fix quotes
2017-07-08Various fixes in the French translation (#4107)Sylvhem
* Changement de « Changement de mot de passe » en « Sécurité » * Suppression de « (Two-factor auth) » Change la valeur de la chaîne « two_factor_authentication » de « Identification à deux facteurs (Two-factor auth) » à « Identification à deux facteurs ». La traduction anglaise entre parathentèse était redondante et gênait la lecture. Change the value of the "two_factor_authentication" from "Identification à deux facteurs (Two-factor auth)" to "Identification à deux facteurs". The English translation in brackets was superflous and was getting in the way of the reader. * Remplace « ' » par « ’ » Retire de la traduction les apostrophes droites « ' » (U+0027) au profit des apostrophes typographiques « ’ » (U+2019). En typographie française, les apostrophes typographiques sont utilisées à la place des apostrophes droites. La traduction était jusqu’ici incohérente et utilisait les deux. Remove from the translation all the vertical apostrophes (U+0027) in favor of the curly ones (U+2019). In French typography, typographic apostrophes are used instead of vertical ones. The translation was incoherent and used both. * Remplace « ... » par « … » Remplace les séries de trois points par le caractère dédié « … » (U+2026). Replace all the series of three dots by the dedicated character "…" (U+2026). * Mise à jour Crée config/locales/activerecord.fr.yml, ajoute de nouvelles chaînes et met à jour certains textes. Les compteurs de caractères pour le pseudonyme et la biographie devrait maintenant pouvoir fonctionner même quand l’interface est en français. Create config/locales/activerecord.fr.yml, add new strings et update some textes. The caracters counters for the username and the biography should now work even when the interface is in French. * Remplace « A » par « À » Remplace « A » par « À » aux endroits où le mot est mal orthographié. Replace "A" by "À" when the wrong word is used. * Ajout d’espaces insécables Ajoute des espaces insécables suivant les régles nécessaires en typographie française. Add non-breaking spaces following rules of French typography. * Remplace « certain » par « certain·e » Harmonise la traduction en remplaçant « certain » par sa forme épicène. Harmonize the translation by replacing "certain" (sure) by its epicene form. * Corrige un angliscisme Remplace « adresse e-mail » par « adresse électronique ». Replace "adresse e-mail" (e-mail address) by "adresse électronique" (electronic address).
2017-06-27i18n: Use instance name in email notifications instead of Mastodon (pl) (#3976)m4sk1n
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2017-06-27Use instance name in email notifications instead of "Mastodon" (#3763)Midgard
* Use instance name in "password changed" mail instead of "Mastodon". Fixes tootsuite#2620. * Use instance name in password reset mail instead of "Mastodon".
2017-05-31Misc tidying and clean ups (#3445)Matt Jankowski
* Remove trailing whitespace in i18n mailers * Use query methods instead of #present? on AR attributes * Delegate Status#account_domain method * Delegate Mention #account_username and #account_acct methods
2017-05-27i18n update for Occitan language (#3362)Quent-in
* Update simple_form.oc.yml * Added check spam folder * Update oc.json abonats => seguidors * Update oc.yml * Update oc.json Added translations + corrections * Update confirmation_instructions.oc.html.erb * Update confirmation_instructions.oc.text.erb * i18n mailer * Update reset_password_instructions.oc.html.erb
2017-05-22Persian translation update (#3206)Masoud Abkenar
* Persian translation update * Persian translation update: new files * Persian translation update * activerecord.fa.yml language code * Persian translation update * fix indent
2017-05-21Enhance for the Chinese translation (#3198)vidarlee
* Enhance for the Chinese translation * Add filtered_languages for Chinese Translation include CN/HK/TW for PR #3175
2017-05-20Update reset_password_instructions.ar.html.erb (#3163)ButterflyOfFire
Forgot to translate this string :p. Now Done !
2017-05-17Add catalan language (#3084)spla
* Add Catalan language * Add Catalan language * Update ca.json * Update ca.json * Update ca.json * Update ca.json * Update ca.json * Update ca.json * Update settings_helper.rb * Update mastodon.js * Update index.js * Update application.rb * Update ca.yml * removed extra spaces at line 225
2017-05-08i18n mailer files for Occitan language (#2924)Quent-in
* Create reset_password_instructions.oc.html.erb * Create reset_password_instructions.oc.text.erb * Create password_change.oc.html.erb * Create password_change.oc.text.erb * Create confirmation_instructions.oc.html.erb * Create confirmation_instructions.oc.text.erb
2017-05-08Updating and extending Dutch strings (#2930)jeroenpraat
* Update nl * Update nl * Update nl * Create confirmation_instructions.nl.html.erb * Create confirmation_instructions.nl.text.erb * Create password_change.nl.html.erb * Create password_change.nl.text.erb * Create reset_password_instructions.nl.html.erb * Create reset_password_instructions.nl.text.erb