Commit graph

23 commits

Author SHA1 Message Date
Duke Greene
945587b75d
fast follow refactor, handle downthread blocked commenters (#19910)
* fast follow controller and spec refactor, handle downthread blocked commenters

* update only one column in spec, avoid recursion when traversing comments
2023-08-15 10:49:56 -04:00
Duke Greene
e5c1a2d7ba
prevent replies to a blocking user on a third party's article (#19898) 2023-08-08 09:53:33 -04:00
Anna Buianova
7d053471f8
Rubocop fixes in spec/requests (#18946)
* Rubocop fixes in spec/requests

* Fixed spec/requests/api/v0/articles_spec.rb

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2023-01-12 19:10:16 +03:00
Mac Siri
9be5c8c6b0
Routine Rubocop fixes (#16838) 2022-03-09 09:32:50 -05:00
VISHAL DEEPAK
3964bd7983
When a user is blocked from commenting on an article, show correct error message (#15009)
* When a user is blocked from commenting on an article, show correct error message

* Created new error type ModerationUnauthorizedError and changed error text for it
2021-10-14 07:42:08 -06:00
Michael Kohl
6dfabd578f
Rename SiteConfig to Settings::General (#13573)
* Rename SiteConfig

* More renaming

* Update spec

* Update mandatory settings mapping

* More renaming

* e2e test fixes

* You have a rename, and you have a rename

* Spec fix

* More changes

* Temporarily disable specs

* After-merge update

* Undo rename for migration

* undo rename of DUS

* Fix DUS

* Fix merge problem

* Remove redundant DUS

* Fix specs

* Remove unused code

* Change wrong class name

* More cleanup

* Re-add missing values to constant

* Fix constant

* Fix spec

* Remove obsolete fields

* Add accidentally removed field

* Update spec

* Move methods from Settings::General to ForemInstance

* Remove unneeded model

* Change mentions of 'site config'
2021-05-21 14:45:37 +02:00
Michael Kohl
111b7316d9
Remove mascot footer image (#13642)
* Remove footer mascot image

* Move remaining mascot settings back to SiteConfig

* Add data update script

* Update usages

* Fix path

* Remove dead route

* Update tests

* Fix view and spec

* Fix e2e test

* Fix DUS
2021-05-11 13:55:18 +02:00
Michael Kohl
f2f5e911cf
Add Settings::Mascot (#13451)
* Add Settings::Mascot

* Add DUS

* Update usage

* Fix e2e test and controller

* Fix specs

* Fix remaining spec
2021-04-26 11:39:19 +07:00
Michael Kohl
2513de92fb
Add rate limit for new user comments (#12925)
* Add rate limit for new user comments

* Rename limit, add check to controller

* Add spec

* Fix specs
2021-03-16 08:39:31 +07:00
Molly Struve
a16fc46f84
[deploy] Revert "Async Handle Notifications for Comments When Saved (#9680)" (#9686)
This reverts commit 852223dd86.
2020-08-08 20:16:27 -05:00
Molly Struve
852223dd86
[deploy] Async Handle Notifications for Comments When Saved (#9680) 2020-08-08 17:59:17 -05:00
rhymes
bbd56875c7
Rubocop: address feedback of #9430 and use kwargs (#9538)
* Use fetch.to_i

* Rubocop: address feedback of #9430 and use kwargs
2020-07-29 11:13:36 +02:00
rhymes
0b4ad49cf8
Rubocop: Enable and fix Style/OptionHash (#9430)
* Enable and fix Style/OptionHash

* Add 10 seconds default timeout to DB statements
2020-07-25 10:41:21 +02:00
rhymes
f1ec04a0c9
Rubocop: move dot in multi-line calls to leading position (#9262) 2020-07-16 15:51:11 +02:00
Dmitry Maksyoma
17a9335680
Duplicate notifications, when replying to and mentioning the same user (#8156)
* Refactor Mentions::CreateAll

* Update app/services/mentions/create_all.rb

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Refactor for readability

* Try writing tests for duplicate notifications

* Skip Bullet warning, essentially for #current_user

* Fix duplicate notification, when mentioning comment author

* Improve spec readability

* Refactor specs and fix duplicate notificaation for moderator comments

* Refactor spec

* Remove obsolete code and refactor specs

* Remove obsolete spec

* Update spec/requests/comments_create_spec.rb

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Get rid of #json_response

* Remove Bullet skipping

* Change #where -> #exists?

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-06-17 08:47:31 -04:00
Molly Struve
ba0ebbafa8
[deploy] RateLimit Refactor: Consolidate Logic for Checking a Limit and Raising an Error (#7636) 2020-05-01 13:31:44 -05:00
rhymes
d87c3dbb18
[deploy] Improve comment posting error handling (#7519)
* Improve comment posting error handling

* Incorporate PR suggestions
2020-04-27 16:54:59 +02:00
Sun-Li Beatteay
385a831d8f comment_controller: add skip_auth to rescue error block (#5728) 2020-01-27 14:35:53 -05:00
Michael Kohl
92b5f113be Return 429 Too Many Requests instead of raising (#5504) 2020-01-14 11:53:33 -05:00
Andy Zhao
e6809d8e23 Fix logic error with creating comment block (#4566)
* Fix logic error with creating comment block

* Add additional test for more exercising
2019-10-23 18:32:37 -04:00
Ben Halpern
85e3be1f48
Create comments notification subscription upon creation (#3167)
* Create comments notification subscription upon creation

* Fix test
2019-06-14 20:11:58 -04:00
Maksim Litvinov
33db32e5f4 Fix rubocop lints (#794) 2018-10-03 13:00:09 -04:00
Mac Siri
301c6080e3 Initial commit 2018-02-28 16:11:08 -05:00