Commit Graph

82 Commits

Author SHA1 Message Date
Guo Xiang Tan 5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Guo Xiang Tan b59dfb86f4 UX: Include group name in email when group is invited to a PM.
https://meta.discourse.org/t/xyz-invited-you-to-a-message-but-really-invited-a-group-im-in/65996
2017-07-26 15:51:44 +09:00
Arpit Jalan 16d356ab4e FEATURE: resending invite should include original custom message
https://meta.discourse.org/t/will-resent-invite-include-original-custom-message/64699
2017-06-30 18:13:33 +05:30
Guo Xiang Tan cae09ee4c8 Fix failing specs. 2017-06-16 09:39:54 +09:00
Guo Xiang Tan 92036616db Make test less vulnerable to changes. 2017-05-17 19:30:13 +08:00
Guo Xiang Tan 3df46833b3 Fix the build. 2017-05-17 16:14:06 +08:00
Guo Xiang Tan 71a266b673 Remove daily mailing mode option as it doesn't scale.
https://meta.discourse.org/t/daily-updates-option-for-mailing-list-mode/45029/14?u=tgxworld
2017-05-05 12:21:50 +08:00
Neil Lalonde 389a0e1a1c FIX: emails should use default theme colors 2017-05-03 14:35:13 -04:00
Robin Ward bf9c4a7828 FEATURE: secure_email site setting to prevent data going out in email 2017-04-26 13:05:56 -04:00
Neil Lalonde 402ddb810c FIX: email customizations now apply to both html and text parts 2017-03-10 14:08:03 -05:00
Arpit Jalan dc2171960b FIX: allow existing users to be invited to topic/message when must_approve_users is enabled 2017-02-03 13:01:23 +05:30
Neil Lalonde e8307ac24c FIX: mailing list mode digest emails included whispers 2017-01-13 13:46:33 -05:00
Neil Lalonde 74956694e5 If summary email finds no topics, show topics more than 1 day old from new users 2016-12-19 14:54:08 -05:00
Neil Lalonde 985daf5c72 FIX: summary should not include certain post types 2016-12-01 12:01:32 -05:00
Neil Lalonde 79dc0518c9 FIX: popular posts in digest need to use same restrictions as topics 2016-11-23 11:24:18 -05:00
Neil Lalonde 86deec3528 FIX: exclude popular posts from deleted topics 2016-11-22 13:23:21 -05:00
Sam 115c454002 FIX: if prioritizing names in ux choose name over username in email 2016-11-14 11:09:24 +11:00
Régis Hanol 829143bf88 FIX: 'List-Unsubscribe' header wasn't added to emails sent when mailing_list_mode was enabled 2016-08-01 20:19:00 +02:00
Régis Hanol 7848a84e0e FIX: ensure summary emails have the 'List-Unsubscribe' header set 2016-07-15 11:39:29 +02:00
Robin Ward 5f91919663 Email support for watching first post 2016-07-07 12:23:19 -04:00
Arpit Jalan 40e9e1be66 FEATURE: user-friendly custom message 2016-06-08 18:23:22 +05:30
Arpit Jalan 4253141700 FEATURE: custom email message for topic invites 2016-06-07 23:43:15 +05:30
Arpit Jalan 7b205ebba4 FEATURE: customize invite email message 2016-06-06 20:15:30 +05:30
James Kiesel feffe23cc5 FEATURE: More granular mailing list mode (#4068)
* Rearrange frontend to account for mailing list mode

* Allow update of user preference for mailing list frequency

* Add mailing list frequency estimate

* Simplify frequency estimate; disable activity summary for mailing list mode

* Remove combined updates

* Add specs for enqueue mailing list mode job

* Write mailing list method for mailer

* Fix linting error

* Account for stale topics

* Add translations for default mailing list setting

* One query for mailing list topics

* Fix failing spec

* WIP

* Flesh out html template

* First pass at text-based mailing list summary

* Add user avatar

* Properly format posts for mailing list

* Move make_all_links_absolute into Email::Styles

* Apply first_seen_at to user

* Send mailing list email summary hourly based on first_seen_at

* Branch and test cleanup

* Use existing mailing list mode estimate

* Fix failing specs
2016-05-21 15:17:54 +02:00
Sam c095304d6d FEATURE: limit daily emails per user to 100 per day via site setting
- controlled via max_emails_per_day_per_user, 0 to disable
- when limit is reached user is warned
2016-03-23 15:08:48 +11:00
Robin Ward 5771d2aee2 SECURITY: Support for confirm old as well as new email accounts 2016-03-08 14:52:22 -05:00
scossar 5b5076c61d test for empty string 2016-03-04 20:20:58 -08:00
scossar 2d8b10d139 validate user locale 2016-03-04 13:21:30 -08:00
scossar a20a52b25f add user locale 2016-03-03 17:21:50 -08:00
Sam Saffron 820a435af8 FEATURE: add "email in-reply-to user option"
We no longer include previous replies as "context", instead
we include and excerpt of the post being replied to at the bottom
of notifications, this information was previously missing.

Users may opt in to emailing previous replies if they wish
or opt out of "in-reply-to" which makes sense in some email clients that
are smarter about displaying a tree of replies.
2016-02-26 00:05:59 +11:00
Sam ab06f86fbe FEATURE: allow users to control how many previous replies they get
- always means we always send previous replies with every email
- never means we do not
- "unless previously sent" ... is the default, in which we only email you each reply once

The default_email_previous_replies site setting can control this toggle
2016-02-19 13:57:07 +11:00
Régis Hanol c740b42328 FIX: whitelist post_types used in context in email notifications 2016-02-12 12:10:30 +01:00
Arpit Jalan 82a75c00c0 UX: change 'Visit Topic' to 'Visit Message' for message notification email 2016-02-09 13:39:10 +05:30
Régis Hanol 7d992cb4c5 FIX: sending emails to mailing list subscribers wasn't working 2016-02-03 19:27:58 +01:00
Régis Hanol 378b7f964c Revert "FEATURE (WIP): add max-width and center email notifications" 2016-01-29 11:13:59 +01:00
scossar 017820e445 check for template 2016-01-27 18:39:20 -08:00
Sam 1bb485fca5 FIX: when a user got multiple replies to a topic, emails were missing 2016-01-27 12:20:08 +11:00
Sam a2b72cc767 correct specs 2016-01-12 13:56:58 +11:00
Andy Waite 3e50313fdc Prepare for separation of RSpec helper files
Since rspec-rails 3, the default installation creates two helper files:
* `spec_helper.rb`
* `rails_helper.rb`

`spec_helper.rb` is intended as a way of running specs that do not
require Rails, whereas `rails_helper.rb` loads Rails (as Discourse's
current `spec_helper.rb` does).

For more information:

https://www.relishapp.com/rspec/rspec-rails/docs/upgrade#default-helper-files

In this commit, I've simply replaced all instances of `spec_helper` with
`rails_helper`, and renamed the original `spec_helper.rb`.

This brings the Discourse project closer to the standard usage of RSpec
in a Rails app.

At present, every spec relies on loading Rails, but there are likely
many that don't need to. In a future pull request, I hope to introduce a
separate, minimal `spec_helper.rb` which can be used in tests which
don't rely on Rails.
2015-12-01 20:39:42 +00:00
Arpit Jalan 5180d3e355 FEATURE: include email_prefix in digest email subject instead of site title 2015-06-03 22:22:29 +05:30
Arpit Jalan b33654ac31 Remove site setting stubbing (Round 1) 2015-06-03 15:44:00 +05:30
Arpit Jalan d9ec6888e1 FIX: allow site_name to be present in rejection email subject 2015-05-04 11:22:54 +05:30
Arthur Neves 439d0d2e37
Check Rails.version instead of ENV
Like that we can have code that works on multiple Rails versions, and we
dont need to mix a new method on Kernel.
Also, this makes easier to have multiple versions.
For instance, before master was 4.2, which is not the case anymore, so
on the code we should check versions and not Environment variables
2015-04-28 22:27:47 -04:00
Arpit Jalan 8c2d7dcaac FEATURE: invite existing user to a topic 2015-04-03 15:00:04 +05:30
Arpit Jalan 6e5540c107 FIX: do not show name in email if name on posts are disabled 2015-02-18 01:39:41 +05:30
Arpit Jalan 7771d2fb31 remove enable_email_names setting 2015-01-13 13:35:40 +05:30
Luciano Sousa b3d769ff4f Update rspec syntax to v3
update rspec syntax to v3

change syntax to rspec v3

oops. fix typo

mailers classes with rspec3 syntax

helpers with rspec3 syntax

jobs with rspec3 syntax

serializers with rspec3 syntax

views with rspec3 syntax

support to rspec3 syntax

category spec with rspec3 syntax
2015-01-05 11:59:30 -03:00
Arpit Jalan f84bdfdde3 FIX: if full user name is not provided, username should be present in email From header 2014-12-03 13:12:05 +05:30
Godfrey Chan bddaf8193a HAX: check the `message` object, not the `MessageDelivery` object
See 669bf73 for background. It's probably better to rewrite these test without
using the internal `NullMail` class anyway.
2014-11-10 01:05:47 -08:00
Godfrey Chan 568ed3beaa HAX: force the lazy `MessageDelivery` object to create the mailer
Starting from Rails 4.2, calling MyMailer.some_method no longer result in an
immediate call to MyMailer#some_method. Instead, a "lazy proxy" is returned
(this is changed to support #deliver_later). As a quick hack to fix the test,
calling #message (or anything, really) would force the Mailer object to be
created and the method invoked.
2014-11-10 01:05:46 -08:00