* Start with webhooks: table and model
* Start with webhooks api
* Start with webhooks api
* Webhook::Event class and events list
* Remove commented callbacks
* Start with sending events to webhook endpoints
* A couple of tests for Articles::Creator
* Send event to webhook endpoint on article destroy
* Dispatch event on article update
* Dispatch event when an article updated from admin
* Spec for the webhook job
* One more test for the dispatch event job
* Integration-like spec for event dispatching to webhook endpoints when creating an article
* Use Addressable::URI to parse endpoint url
* Add oj as a faster fast_jsonapi backend
* Renamed serializers
* Move article serialization out of a model
* Don't allow to create a webhook event with invalid type
* Add fields for ArticleSerializer
* Fix webhook event job specs
* Specify timeout when dispatching events
* Fix webhook job spec
* Change webhook events queue name
* Change serialized article fields for the dispatchable events
* Include user data when serializing an article for webhook event
* Moved decorating out of Webhook::DispatchEvent, fixed most specs
* Fix route in ArticleSerializer
* Move Article decoration to Webhook::PayloadAdapter
* Refactor image url helpers to avoid including helpers into serializer
* Fix specs
* Default url options for production
There was a bug where the frontend was not passing the organization id to the backend, and thus the fetching of the stats failed for organization articles.
This also adds a bit of error handling for `fetch` API
* Add /stats endpoint for articles, opened only to Pro users
* Add analytics to article stats page
* Add stats button to the article page and test stats page
* Allow user to have many orgs
* Allow users to handle multi orgs in settings
* Make rounded buttons inline
* Add multi org function to dashboards
* Fix merge conflicts
* Fix mistake in merge conflict fix oops
* Display the correct membership level
* Fix accessibility issues
* Display organizations for article editors
* Handle submitting org id with preact editors
* Make listings work with multiple organizations
* Allow listings to have multiple orgs on create
* Display the correct number of credits for each org
* Move script tag to Webpack
* Allow multi orgs for purchasing and viewing credits
* Use OrganizationMembership as authorization check
* Display multiple organizations for notifications
* Allow dashboard to be viewable under multi-orgs
* Remove unused method
* Add multi-org functionality for article editors
* Show pro dashboard buttons for member+ org levels
* Leave the correct organization
* Allow article API to change org id
* Add left-out authorization method oops
* Make nav buttons a bit more clear
* Fix merge conflict
* Fix adding org id for /api/articles and tests
* Fix tests for org policy
* Use proper logic for displaying org members
* Update org actions with new authorization
* Use correct org when creating a listing
* Remove additional payment charge oops
* Mark org notifications as read with authorization
* Remove deprecated post_as_organization attribute
* Use new org_admin syntax
* Remove deprecated org logic for article create and update
* Default all RSS posts to not belong to any org
* Render org_member page for guest users
* Update org policy spec to work with multi orgs
* Use org_membership for org traits and move identity code
* Use org_member trait
* Update to work with multi-orgs
* Validate article's org_id if param org_id is blank
* Make a let variable
* Remove unnecessary eager load for credits
* Fix HTML structure and org logic for non-org users
* Update credits spec for multi-org
* Add test for failed payment when purchased by org
* Lint listings_spec
* Test that the listing was created under the user
* Add tests for POST /listings multi-org
* Use double quotes for classes
* Fix /manage and a few other multi-org bugs
* Fix test for multi org
* Use correct method SQL exists? not Rails exist?
* Fix reads spec for multi-org
* Fix org_controller actions to work with multi org
* Test only multi org and not old usage and fix leave_org
* Fix org showing user profile img test for multi-org
* Fix org logic for users with no orgs
* Remove switch org functionality
* Update tests and add hidden param for org id
* Redirect to the specific organization
* Test other org button actions
* Use settings_notice instead of legacy notice and refactor
* Fix weird extra end issue prob from merge conflicts
* Test for with new flash key
* Fix user_views_org tests for multi-org
* Test for new flash message
* Update snapshot with new a11y html
* Move styling to stylesheet
* Add site admins functionality
* Move org_member? method in user model and refactor
* Use unspent_credits_count for organizations
* Add tests for /listings/new and minor bug fixes
* Use .present? in case of empty array
* Fix a lingering deprecated method
* Use greater than 1 for random numbers
* Add tests for counting spent and unspent credits
* Preload organization, not user
* Preload users only when needed
* Pre-load podcasts for podcast episodes in API
* Avoid eager loading error by loading rating votes separately
* Preload associations for moderation
* Preload user comments in trees
* Preload organization for non org dashboard and cleanup queries
* Optimize ArticleSuggester to only load N articles at need
* Remove eager loading and pass variables to partials for easier debug
* Reorganize tags validation code and ignore actsastaggableon eager loading issues
* Remove unused eager loading and bring up comments relation
* Preload podcasts when loading podcast episodes
* Fix views specs
* Make sure ArticleSuggester never returns duplicates
* Remove commented code
* Re-trigger build
* Move suggested articles back to view to respect fragment caching
* Add system test to create article from the editor
* Move article creation from API to app controller
* Fix system test to edit posts
* Move article update from API to app controller
* Rewrite create article API using API key
* Add main_image and canonical_url to allowed creation params
* Rewrite update article API using API key
* Fix tests and have Comments API inherit from API
* This commit adds the "archived" attribute to the Article model, which will
enable users to automatically filter archived articles/drafts from appearing
on their dashboard. It also adds an ellipsis menu with a link to archive the
article. I've also moved the Mute Notifications button into the ellipsis menu
as well.
* Add ellipsis menu and make it work
* Fix logic error
* Hide ellipsis menus when you click elsewhere on the body
* Extract function to remove duplication
* Ensure that menu is hidden when the ellipsis button is clicked on an open menu
* Ensure that archiving post button works and that 'archived' param is accepted by the controller
* Enable link to toggle showing/hiding archived articles
* Make 'mute' and 'archive' buttons in ellipsis dropdown list work
* Refactor to make Code Climate happy
* Minor JS refactors
* Initial work on v2
* Initial changes merger
* Work to finalize v1/v2 editor adjustments
* Clean up styling
* Fiddle with form margins
* Fix some tests
* Change video
* skip a couple tests
* Modify tests to work with new code
* add tag param and filter
* add tag filter request specs
* order user above tag to maintain existingdefault
* refactor #new for code climate
* add rss feed spec
* move feed tags under explicit route
* Set up basic /manage route
* Add basic article manage page
* Add tips and finalize permissions for /manage
* Add final test and add manage button to article show
* Update failing specs
* Use published scope for articles
* Fix variable name
* The sequencing in the union query matters
* Fix spec
* Restore a published: true condition
* This test is actually misleading due to the union
* Revert this change, not sure why it's not a relation
* Fix useless diff
* Simplify ArticlesController#feed
There's unneeded complexity in the logic of the feed method, this way what separates each path should be clearer
* Update app/controllers/articles_controller.rb
Co-Authored-By: rhymes <rhymesete@gmail.com>
* Add spec for org reaction notification
* Add organization_id to notifications
* Add validations for user and org IDs
* Move comment json_data out of loop
* Use actual column names instead
* Add organization filters
* Remove extra text-align
* Add organization filtering
* Refactor to reduce complexity
* Add receiver argument to handle orgs
* Add has_many notifications for orgs
* Add follow notifications for orgs
* Add comment notifications for orgs
* Rename some tests for specificity
* Add mark org notifications as read functionality
* Add radix to parseInt
* Define json_data outside of loop
* Notify org followers of a new post as well
* Move test to proper location
* Add test for aggregated method
* Make send org reaction notification more readable
* Test the rest of the notification model
* Refactor tag adjustment spec
* Fix extra html
* add myself to the core contributors
* add comment template
* merge upstream
* make sure the template re-appears for top level comments after submission
* make interface admin only
* Adjust comment template form
* Fix merge conflicts
* Remove unnecessary comment template from json
* Remove notifications synchronously on unpublish and destroy
* Asynchronously remove reaction notifications for article
* Remove all associated notifications when destroyed
* Fix edge case for reaction notifications
* Load new comment_box file instead of old one
* Delete legacy views
* Remove unused private declaration
* Use casecmp.zero? instead of downcase for speed, and use @user
* Add friendly error message for notifications
* Use delete all and not destroy b/c no callbacks
* Remove stream and add new notification views
* Actually remove Stream
* Move followers query to async method
* Remove unused tests and fix query
* Try using without delay instead
* Add without delay and escape HTML
* Make all tests pending for now
* Add new columns to notifications table
* Remove stream from notifications and add new methods
* Turn off moderation comment notifications
* Add notifiable_type index to migration
* Stop creation of Stream-based notification model instances
* Add notification model create hooks
* Add badge achievement notification creation hook
* Fix some specs
* Add missing @ symbol
* Fix for tests and rename a few things
* forgot to uncomment code sigh
* Use timezone aware datetime methods
* Use timezone aware date parse for GitHub issue tag
* Introduce a bit of chaos programming using Zonebie
Zonebie uses a random timezone to run tests, it's a really good way to see if the code is timezone dependent or not.
* Convert GitHub issue date as UTC