* TagsController inherits from ApiController
* Let ApiController inherit from ActionController::Base to have its own lifecycle
* Remove unused method
* Use only one respond_to :json for the entire API
* ApiController inherits from ActionController::Base
* Use Pundit only where needed
* Consolidate `.decorate` calls
* Move Activerecord finders out of main stories feed partial
* Add back in decorates to sticky_articles partial
* Combine top and new articles returned from StoriesController
* Extract feed construction logic to a service
* Some PR tweaks (naming)
* Quick test fix
Allowing ids to be mutated by admins from the /internal/config pages is dangerous.
This could cause issues if an admin tries to update the SiteConfig.staff_user_id to an id that is another user's id, or to an id that isn't valid.
* Add check for article param being a Hash & spec
* Remove unnecessary blank line
* Move logic to private method and before_action call
* Change check_if to validate
* Use is_a? to type check
* Fix type check for specs
* Add specs
* Check the object, not the ID
* Use permitted params and delete cache only after create
* Inherit from ApiController, bail if the reaction user does not exist, fix naming
* Remove superflous test
* Fix logging for dev and test environments
We had some unused code for Timber in our config files for development and test.
However, this was completely clobbering Rails' default behavior of logging out to log/development.log and log/test.log. We should allow for logging in these environments in particular, and since we're not using Timber there, we can just revert to using the Rails default debugging log levels.
* Add Timber logger to specs that explicitly require it
* Restore default Rails.logger in specs using Timber logger
* Explicitly use Rails.logger in OmniauthCallbacksController
We seem to have different logger classes leaking into this controller in tests.
I'm not entirely sure why this is/haven't been able to investigate yet, but I do think we should be using the Rails.logger explicitly until we can figure that out.
* Improve dropdown UX for internal/badges
Add a "blank" option to the dropdown to list of badges on internal/badges route.
Also add some checks to handle if an admin accidentally tries to award a "blank" badge.
* Ensure error is surfaced as flash message
* 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
* 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
* change ReadingListItemsController#update to return NotAuthorized if user_id does not match
* fix spec description
Co-authored-by: rhymes <rhymesete@gmail.com>
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.