Commit Graph

60 Commits

Author SHA1 Message Date
Maja Komel 368d4e8eae FIX: notify staff about whispers in watched categories (#6128) 2018-07-21 11:20:21 +02:00
Sam 89ad2b5900 DEV: Rails 5.2 upgrade and global gem upgrade
This updates tests to use latest rails 5 practice
and updates ALL dependencies that could be updated

Performance testing shows that performance has not regressed
if anything it is marginally faster now.
2018-06-07 14:21:33 +10:00
Guo Xiang Tan 7fc8a36529 DEV: Take 2 Queue jobs in tests by default.
On my machine this cuts the time taken to run our test suite
from ~11mins to ~9mins.
2018-05-31 16:23:23 +08:00
Guo Xiang Tan 56e9ff6853 Revert "DEV: Queue jobs in tests by default."
Too risky for now

This reverts commit be28154d3b.
2018-05-31 15:34:46 +08:00
Guo Xiang Tan be28154d3b DEV: Queue jobs in tests by default. 2018-05-31 14:45:47 +08:00
Guo Xiang Tan 755b511b5c PERF: Destroy collapsed notifications in 1 query instead of 3. 2018-05-25 12:01:36 +08:00
Maja Komel 3d99726981 FIX: set notification level when changing post owner (#5616)
FIX: do not notify last post editor if they mention themself
2018-04-16 11:48:06 +02:00
Gerhard Schlager f042a9529b FIX: users shouldn't get notifications about mentions from system users
(unless the mentioned users are participants in a PM with the system user)
2018-04-12 16:19:44 +02:00
Gerhard Schlager 62aacce8f4 FEATURE: Notify flaggers when flagged post is edited by author 2018-04-09 16:45:33 +02:00
Gerhard Schlager dc77cce8d9 FIX: Create notifications for mentions in PMs 2018-03-09 11:04:29 +01:00
Gerhard Schlager d47fa6653b do not notify staged users about posts withing mailinglist mirror category 2017-11-17 15:29:14 +01:00
Gerhard Schlager 0ccefb0365 make RuboCop happy 2017-11-10 17:57:28 +01:00
Gerhard Schlager 31e2385316 FEATURE: do not send notification emails to users who are included in the To and CC header of an incoming email 2017-11-10 17:44:20 +01:00
Guo Xiang Tan 4e5e7dc736 FIX: Fix ActiveRecord API that was removed in Rails 5.1. 2017-09-25 16:16:37 +08:00
Gerhard Schlager 87b4246c14 FIX: notify about whispered reply 2017-09-19 15:51:10 +02:00
Bianca Nenciu 6bc74ceb50 Split alias levels in mentionable and messageable levels. (#5065)
* Split alias levels in mentionable and messageable levels.

* Fixed some tests.

* Set messageable level to everyone by default.

* By defaults, groups are not mentionable or messageable.

* Made staff groups messageable by the system.
2017-08-28 12:32:08 -04:00
Guo Xiang Tan 5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Sam Saffron 045a2abcec FEATURE: remove the timecop gem
We should only have one way of mocking time, misuse of timecop
was causing build stability issues
2017-07-24 12:11:10 -04:00
Guo Xiang Tan c12edda766 Use `Timecop.freeze` instead of `Timecop.travel`. 2017-07-24 15:40:57 +09:00
Guo Xiang Tan 86dbd76191 Fix random spec failure due to ordering. 2017-07-24 15:25:07 +09:00
Leo McArdle ddc0134b48 add DiscourseEvent triggers necessary to update a user's permissions before they're notified 2017-07-21 11:03:54 -04:00
Guo Xiang Tan d82dbd565b FIX: Remove dependency on `rest-client`. 2017-06-16 09:42:41 +09:00
Sam Saffron 48d9c69117 remove confusing comment 2017-04-05 08:46:35 -04:00
Sam Saffron cd39049262 SECURITY: do not send push notifications to suspended users 2017-04-05 08:28:24 -04:00
Sam c531f4ded5 remove rails-observers
Rails yanked out observers many many years ago, instead the functionality
was yanked out to a gem that is very lightly maintained.

For example: if we want to upgrade to rails 5 there is no published gem

Internally the usage of observers had quite a few problem.

The series of refactors renamed a bunch of classes to give us more clarity
and removed some magic.
2016-12-22 16:46:53 +11:00
Sam aaf947356b correct regression where notifications scope is not pushing to push server 2016-10-14 22:52:39 +11:00
Sam f4f5524190 FEATURE: user API now contains scopes so permission is granular
previously we supported blanket read and write for user API, this
change amends it so we can define more limited scopes. A scope only
covers a few routes. You can not grant access to part of the site and
leave a large amount of the information hidden to API consumer.
2016-10-14 16:05:42 +11:00
Sam 89daa43754 FEATURE: remap emojis back for push notifications and desktop alerts 2016-10-11 13:03:48 +11:00
Sam 340874d345 FIX: post notifications in JSON so we properly support arrays and so on 2016-09-04 15:51:16 +10:00
Sam 4fe52c8cbe FEATURE: backend support for pushing notifications to clients 2016-08-26 12:47:10 +10:00
Robin Ward c279889191 FIX: Watching First Post in groups was working incorrectly 2016-07-21 15:05:10 -04:00
Robin Ward 09be741820 FIX: Don't alert on new posts in a topic unless it's a new record 2016-07-19 15:57:05 -04:00
Guo Xiang Tan d55da4fe1b Revert "Revert "Update rails.""
This reverts commit 4d27d7e1d3.
2016-07-18 11:00:23 +08:00
Robin Ward 4d27d7e1d3 Revert "Update rails."
This reverts commit 898ec43989.
2016-07-15 16:35:57 -04:00
Guo Xiang Tan 898ec43989 Update rails. 2016-07-15 13:18:30 +08:00
Robin Ward 2005565c9c Server side code for Watching First Post Only 2016-07-07 11:21:50 -04:00
Robin Ward 0396b14b70
FEATURE: New "First Onebox" badge 2016-04-12 15:31:14 -04:00
Sam f9e5c49350 FIX: blue notification instead of green for replies/mentions in PMs 2016-03-22 14:28:14 +11:00
Régis Hanol 2747e14b4c FEATURE: hide elided part of incoming emails behind a [details] tag 2016-03-09 18:51:54 +01:00
Neil Lalonde 091e7ef3ca FIX: when a post is edited by someone other than the original author and a mention is added, the mention notification is from the person who edited 2016-03-08 15:26:12 -05:00
Sam af577a5854 FEATURE: like notification frequency of never 2016-03-06 09:12:59 +11:00
Sam Saffron 8b1772ac0f FIX: if user undos like, and relikes notify
FEATURE: roll up likes for notify on all likes
2016-03-04 22:56:27 +11:00
Sam 5a6c34fb8a regression, unable to edit posts 2016-03-03 16:00:14 +11:00
Sam Saffron 5f4075a6cf FEATURE: users can select how frequently they are notified on likes
- first time
- first time and daily (default)
- always
2016-03-02 23:16:52 +11:00
Guo Xiang Tan e7cfbfeabb FIX: `Array#first` with block will return the first element if nothing matches. 2016-02-24 22:34:40 +08:00
Robert Riemann 9c39647cd2 fix: support for hyphens in group name
The group mention @ORG-team triggers notifications for the group @ORG. This fix changes the RegExp, so that the group name is correctly extracted.

see: https://meta.discourse.org/t/group-mentions-that-begin-with-the-same-characters-may-be-incorrect/39892/12?u=rriemann
2016-02-23 23:55:31 +01:00
Régis Hanol 8d1da9cedd FEATURE: keep original title when sending email notifications about a PM 2016-02-23 01:34:16 +01:00
Sam cba76db53b FIX: if people link own post, watchers not notified 2015-12-31 10:51: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
Sam d1a5d8ea62 FEATURE: show group mentions and topics in groups page 2015-12-01 16:52:43 +11:00