Commit graph

2495 commits

Author SHA1 Message Date
rhymes
397ef313de Improve video controllers caching and retrieving (#5709) [deploy]
* Add tests and improve pagination and caching

* Add two more specs

* Add .with_video scope

* Get rid of N+1

* Only select needed columns

* Improve efficiency of the video page as well

* Add missing set_cache_control_headers to API videos#index
2020-01-27 15:51:12 -05:00
Alex
591ac771cc Move Webhook::DispatchEventJob to Sidekiq (#5722) [deploy] 2020-01-27 14:36:27 -05:00
Sun-Li Beatteay
385a831d8f comment_controller: add skip_auth to rescue error block (#5728) 2020-01-27 14:35:53 -05:00
Alex
743ac13cec
Remove RssReaderFetchUserJob and spec (#5720) [deploy] 2020-01-27 10:40:01 -08:00
Sebastien
a25446b1d4 Add organizations to user profile (#5583) [deploy]
* Add organizations to user profile

* Add user organization info updated at column and cache key

* Remove default value for users organization_info_updated_at column

* Update organization_memberships factory

* Remove schema organization_info_updated_at default value

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-01-27 13:31:27 -05:00
rhymes
e582e2a245 Don't use the service worker for the feed (#5734) 2020-01-27 12:56:39 -05:00
Sun-Li Beatteay
a86ccff096 fix firefox tags 'View Rules' bug (#5732) [deploy] 2020-01-27 12:53:11 -05:00
Michał Krzysztof Feiler
8dc4c952d7 [deploy] Add "functional.cafe" to Mastodon list (#5737) 2020-01-27 11:56:01 -05:00
Alain Mauri
ca4c3963b7 Remove Follows::CreateChatChannelJob (#5718) [deploy] 2020-01-27 09:41:18 -05:00
Asha Balasubramaniam
11adeb3215 Migrate PodcastEpisodes::UpdateMediaUrlJob to PodcastEpisodes::UpdateMediaUrlWorker for Sidekiq (#5729) 2020-01-27 09:40:34 -05:00
serena
f2d96bacf2 Remove Notifications::NotifiableActionJob (#5730) [deploy] 2020-01-27 08:54:40 -05:00
Maykon Menezes
7ad7320add Worker/user self delete (#5698)
* Moving user self delete job to sidekiq

* Refactor/user self delete worker
2020-01-27 08:45:58 -05:00
Molly Struve
ebf43209a5
Handle Missing Root Comment in Deleted Comment View (#5716) 2020-01-27 08:44:00 -05:00
Ben Halpern
d81f407394
Remove non-indexable logged-out links (#5713) [deploy]
* Remove non-indexable logged-out links and add nofollow elsewhere

* Remove nofollow part of PR
2020-01-27 07:54:49 -05:00
Ben Halpern
071ec03a3c
Fix article description issues (#5679) [deploy]
* Fix article description issues

* Move tag info to decorator

* Fix description edge cases

* Fix description creation logic

* Fix test and adjust naming

* Modify line in processed_description
2020-01-26 14:43:11 -05:00
Alex
62f3e31698
Move RssReaderFetchUserJob to Sidekiq (#5685) [deploy]
* Create RssReaderFetchUserWorker

* Create RssReaderFetchUserWorker spec

* Update reference to RssReaderFetchUserWorker

* Update spec for clarity

- Update fake user_id to 9999
- Update return for user.feed_url

* Add feed_url check before calling worker

* Update random user_id for queue test

* Update fake user_id argument in spec
2020-01-24 14:14:20 -08:00
Alex
c3529d4b10
Remove ExportContentJob and spec (#5711) 2020-01-24 14:13:48 -08:00
Dainius Stankevicius
bf40d27054 Remove Notifications#NewComment job (#5567) [deploy] 2020-01-24 16:03:20 -05:00
Jacob Herrington
3e99fb527f Add StimulusJS and Refactor Internal article_script (#5539) deploy]
* Add StimulusJS 1.1.1

Because:
- Internal will likely need more interactivity going forward
- Vanilla JS and jQuery are great, but aren't quite as organized as we
might like
- Stimulus fits our model of what internal should be (imo)
- Adopting Preact or something with templating would require rewriting a
bunch of erb (that is currently working just fine)

Stimulus is a JavaScript framework that directly compliments turbolinks
and the approach vanilla Rails takes to JavaScript. I've set it up to
specifically be used in the internal views where we are currently using
jQuery and vanilla JS. I think we should chip away at the vanilla JS
currently in place with this, which appears to be both scalable and
pragmatic exactly the sort of tool we want for building our internal
tools.

* Replace crufty article JS with Stimulus

I'm swapping out some of the stuff going on in article_script.erb with
some StimulusJS, it seems like a good test case for Stimulus.

This lets us organize the code a little more intentionally and hopefully
fixes a small performance complaint that Michael had.

* Rename uncommunicative methods

* Add unit tests for Stimulus classes

* Move Stimulus code to javascript/internal
2020-01-24 16:00:24 -05:00
Josh Puetz
7444b315a4 Fix capitalization in settings placeholders (#5707) 2020-01-24 14:08:32 -05:00
Alain Mauri
8dc56dcf32 Remove mentions email notification job (#5708)
* Removed mentions email notification job
  * Removed related specs
2020-01-24 14:06:51 -05:00
rhymes
6ec91b0861 API tags: improve caching and purging (#5673) [deploy]
* Add pagination to /tags and proper caching to /tags and /tags/onboarding

* Correctly purge tags

* Fix broken specs

* Make Travis happy
2020-01-24 13:55:22 -05:00
Alex
4a7ecb2574
Move ExportContentJob to Sidekiq (#5688) [deploy]
* Create ExportContentWorker

* Create ExportContentWorker spec

* Update references to ExportContentWorker

* Fix UserSettings spec for sending email
2020-01-24 10:12:58 -08:00
Lucas Hiago
58439d3652 Change BustHomepageCacheJob to BustHomepageCacheWorker and move to sidekiq (#5581) 2020-01-24 12:59:34 -05:00
Maja Komel
3412af977f Don't raise StandardError for invalid liquid tags when updating comment (#5694)
* Don't raise StandardError for invalid liquid tags when updating comment

* remove text-align styling for alert error
2020-01-24 11:26:55 -05:00
Ben Halpern
8ed94c8fb1
Add conditional to prevent superfluous rerenders in chat compose (#5705) [deploy] 2020-01-24 11:23:48 -05:00
Spencer
49474d516e Allow comments from deleted articles to be viewed (#5199) [deploy] 2020-01-24 11:06:52 -05:00
Lucas Hiago
5aaa80d3a0 Remove Reactions::CreateJob and related spec (#5684) 2020-01-24 09:05:43 -05:00
rhymes
6c24357f16 Use edge caching for API Article show endpoint (#5669) [deploy] 2020-01-23 20:12:58 -05:00
Sarthak Sharma
75608e3e55 Feature🚀: Ability to mention anyone in open chats and notify them (#5460) [deploy]
* Feature 🚀 : Ability to delete messages in chat channels

- Sending message ID to frontend
- Deleting Message
- Use pusher to delete message realtime

* Minor Bug 🐞: Show message action only for current user

- User can delete or edit their own messages

* Test cases added

* Bug 🐞: Update message id for receiver

Message id was not sent to receiver by pusher

* Refactoring🛠: Message controller refactoring

* Test Cases📝 : Specs for Delete message added

* Feature 🚀 : Ability to edit messages

* Test Cases📝 : Specs for Edit message added

* Feature 🚀 : Ability to mention member in Group [Frontend]

* Test Cases📝 : Test Cases added

* Feature 🚀 : Ability to mention member in Group [Backend]

* Bug Fix 🐞: Making messages realtime for open channels

* Feature 🚀 and Bug Fix 🐞: Ability to get notification if mentioned in open messages and increasing message number count

* Feature 🚀 : Ability to remove message count on channel open

* Bug Fix 🐞: Making Notification more reliable by checking if the new message is notified to user or not

* Feature 🚀 : Ability to metion @all and notify them

* Bug Fix 🐞: Minor fixes

* Fews tweaks in code

* Bug Fix 🐞: Feature was not present for Invite only Section

* Bug Fix 🐞: In open channels one can't mention all

* Bug Fix 🐞: Markdown conversion for all only in case of invite only

* Specs added

* Delete schema.rb

* Schema file updated

* Code refactoring

* Further Code refactoring backend

* Further Code refactoring backend

* Bug Fix 🐞: Mention List error problem in switching tabs

* Test Snapshots added

* Feature 🚀 : Ability to mention member in Group [Frontend]

* Test Cases📝 : Test Cases added

* Feature 🚀 : Ability to mention member in Group [Backend]

* Bug Fix 🐞: Making messages realtime for open channels

* Feature 🚀 and Bug Fix 🐞: Ability to get notification if mentioned in open messages and increasing message number count

* Feature 🚀 : Ability to remove message count on channel open

* Bug Fix 🐞: Making Notification more reliable by checking if the new message is notified to user or not

* Feature 🚀 : Ability to metion @all and notify them

* Bug Fix 🐞: Minor fixes

* Fews tweaks in code

* Bug Fix 🐞: Feature was not present for Invite only Section

* Bug Fix 🐞: In open channels one can't mention all

* Bug Fix 🐞: Markdown conversion for all only in case of invite only

* Specs added

* Code refactoring

* Further Code refactoring backend

* Further Code refactoring backend

* Bug Fix 🐞: Mention List error problem in switching tabs

* Test Snapshots added

* Feature 🚀: Ability to navigate through user list with keyboard only

* Bug Fix 🐞: Changing color of group avatars in dark themes

* Bug Fix 🐞: Setup pusher channel for open channels also
2020-01-23 18:06:35 -05:00
Asha Balasubramaniam
656e404097 Remove delayed job that creates podcast episode (#5678) 2020-01-23 17:32:18 -05:00
Vaidehi Joshi
9fb8875085 Use the correct cover image in article form preview (#5660) [deploy]
Fixes #5630, wherein the cover image from the article data was appearing in the preview.
2020-01-23 17:06:06 -05:00
Mac Siri
5f020860af Allow for proper deselect of email_newsletter (#5675) 2020-01-23 16:59:17 -05:00
Alex
0a59e3ea59
Delete Search::RemoveFromIndexJob job and spec (#5676) [deploy] 2020-01-23 13:14:46 -08:00
Asha Balasubramaniam
bc137ff762 Migrate PodcastEpisodes::CreateJob to PodcastEpisodes::CreateWorker for Sidekiq (#5633)
The tests around `Podcasts::Feed` helped catch a bug around the
migration of the podcast episode creation delayed job where the sidekiq
version was passing a string version of item hash to
`Podcasts::CreateEpisode` which was in fact expecting the hash to
contain symbols.
2020-01-23 15:37:43 -05:00
Alex
f6c2f46fbb
Move Search::RemoveFromIndexJob to Sidekiq (#5637) [deploy]
* Create RemoveFromIndexWorker

* Create spec for RemoveFromIndexWorker

* Update RemoveFromIndexJob to RemoveFromIndexWorker

- Update references from the job to the new worker
- Update specs to use the new worker
- Fix spec in comment_spec that causes linter/RuboCop violation

* Remove unnecessary argument nil check

* Update spec for missing data
2020-01-23 11:27:28 -08:00
Sun-Li Beatteay
5bebf628df Update ReadingListItemsController#update to return NotAuthorized (#5658)
* change ReadingListItemsController#update to return NotAuthorized if user_id does not match

* fix spec description

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-01-23 13:22:48 -05:00
Anna Buianova
01456fe029 [deploy] Finalize deleting user associations (#5624)
* Prepare factories and associations for Users::DeleteActivity specs

* Altered user associations, delete the needed associations in Users::DeleteActivity

* Moved and refined user deletion spec

* Removed useless commented user associations

* Refactored BackupData factory

* Refactored ProfilePin factory

* Refactored Reaction factory

* Fixed specs: Keep default _type in factories or specify it in tests

* Ok, notes shouldn't be deleted on user deletion

* Fixed creating reactable for specs

* Specify commentable/commentable_type explicitly when creating data for tests

* Fixed typo in the comments spec

* Removed unnneeded space

* Added aggregate_failures for testing user associations deletion

* Keep feedback_messages while deleting user activities
2020-01-23 11:29:47 -05:00
rhymes
87167de8c5 Use correct cache keys on the articles API index endpoint (#5606) [deploy]
Surrogate keys are about setting expectations on cache purging.

Presently we use a combination of all parameters to set changing surrogate keys depending on the result of the `ArticleApiIndexService`. This approach has two limitations:

- if two set of params lead to the same exact set of articles, we still create two different caches

- deleted articles will remain for 24 hours in the cache because the cache key doesn't take the record keys into account

By simply using record keys we make sure that different params leading to the same result set will share the same cache and that deleted keys won't appear anymore in the cache.
2020-01-23 08:40:19 -05:00
Ben Halpern
52ada1450c
Add guard clause for presence of processed_html (#5638) [deploy] 2020-01-22 15:32:50 -05:00
Michael Kohl
d82bbb874e Add rate limits to admin interface (#5642) 2020-01-22 15:29:27 -05:00
Alex
c3fb23379f Remove IndexJob and spec (#5654) 2020-01-22 15:18:29 -05:00
Alex
75be0d3d23 Remove SlackBotPingJob and spec (#5655) 2020-01-22 15:17:52 -05:00
Nadiya Karachevska
e49b0e81e5 Return 404 NotFound error if ClassifiedListing is not found during delete (#5646) 2020-01-22 13:07:44 -05:00
serena
1297f1cb3e Replace Notifications::NotifiableActionJob with Notifications::NotifiableActionWorker for Sidekiq (#5588) [deploy] 2020-01-22 09:40:55 -05:00
Alex
4e5dc015b3 Move Search::IndexJob to Sidekiq (#5620) [deploy] 2020-01-22 08:24:53 -05:00
Alex
8cc791150c Move SlackBotPingJob to Sidekiq (#5615) 2020-01-22 08:24:33 -05:00
rhymes
09cf6719eb Use honeybadger.js from npm (#5643)
rails-assets.org is often down, and apparently has been down intermittently since yesterday.

In addition to this the only thing the gem does is literally to add `honeybadger.js` to the assets path:

```ruby
gem_path.join('app/assets').each_child.to_a
```

Hence we can ditch the gem and use the library directly.
2020-01-22 08:22:51 -05:00
Michael Kohl
5b35370db8 Introduce BanishedUser table (#5589) [deploy] 2020-01-21 17:15:58 -05:00
Ændrew Rininsland
5bd51f9cf5 Adds 4estate.media to Mastodon instance whitelist (#5625) 2020-01-21 08:59:52 -05:00