* add location to classified_listings
create rails migration and ran rake db:migrate
* add faker city to seed
* add location to index json
* add location as searchable attribute in algolia
* add form text field for adding location to new listing
* add location to dashboard json
* add location field for editing listings
* add location to listing_params in controller
* add location to single listing view
* add location to listing row in dashboard
* add location to dashboard test
* adjust listing dashboard row spacing
* reduce character limit
* reduce lines of conditional html elements
* compress listing card const
* fix form call for location in edit page
* update snapshot in dashboard
* add location length validation in listing model
* shorten limit and update location in edit page
* Add #purchase to Credit
* Assigns spent credits to the listing
* Add Credits::Ledger and use it
* Localize ledger datetimes
* Add organization to the ledger
* Add tests for ledger
* Remove unused class
* Fix scope error
* Compare UTC times
* Fix broken specs
* Wrap listing create in a transaction
* Wrap listings bump into a transaction
* Avoid microseconds issue with datetimes in tests
* Use .detect instead of .select.first
* Fix spec description
* Lint some quotation marks
* Add BackupData table
* Add identity and removal functionality
* Test additional functionality
* Remove dependent destroy for backup data
* Add auth_data_dump column
* Add challenge to reserved words
* Add more shoulda matchers
* Reorganize PageViewsController
* Add domain and path to PageView model
* Add before_create callback to populate domain and path
* Add list of referrers to AnalyticsService
* Add referrers to the UI
* Remove useless referrers card and tweak table line height
* Add referrer stats to article stats page
* Add not null and empty default to domain and path
* Refactor JS analytics client
* create_list is a step back here
* Revert "Add not null and empty default to domain and path"
This reverts commit bc02440076047a887c65d300bccd4661ecc8ffd0.
* Add index on domain concurrently
* Make the script more robust
* Add backend func. for muting users you follow
* Remove comment
* Add validations and update default value
* Send notifications to followers with all_articles
* Add MVP of notification subscriptions
* Add rate limiting for notification subscriptions
* Show modal for logged out users on subscribe click
* Add enter key functionality for checkbox
* Add relationships for notification subscriptions
* Add model test for notification subscription
* Deprecated article mutes in favor of notification subscriptions
* Deprecated comment mutes in favor of notification subscriptions
* Move comment muting tests and logic over
* Merge comment and article muting into subscriptions
* Remove redundant check
* Use database to check for rate limit instead of cache
* Test for subscriptions handling notifications properly
* Fix notification model spec for subscriptions
* Fix tests for subscriptions
* Remove rate limiting
* Properly handle logged out users getting subscription status
* Fix test for new pattern
* Update reserved words
* Add config column to notification subscriptions
* Add logic for top level config and move tests
* Test for top level subscribers getting notified
* Fix logic mistake oops
* Add index and refactor comment_user_ids
* Notifications unique indexes that take null values into account
* Specify import options for reaction notifications according to the indexes
* Fix specs: notifications have either user_id or organization_id
* Create notifications indexes concurrently
* Podcasts validations
* Added db constraints for podcast_episodes
* Validate podcast slug uniqueness with usernames and org slugs
* Validate podcast slug uniqueness only if it was changed
* Use proper auth chain before checking parameters
* Refactor AnalyticsController
* Add a bunch of test and rewrite reactions counts with a single query
* Add tests for follows totals
* Use round and add more refactoring
* Add tests to group by day to fallback during refactoring
* Use group by to calculate comments count by day
* Use group by to calculate follows count by day
* Use group by to calculate reactions stats by day
* Use group by to calculate page_views stats by day
* Move calculations per day back in the cached block
* Add a few comments and a little bit of refactoring
* Add indexes (concurrently) for analytics
* Make tests more time robust
* Use a date range cache related to the requesting user or org
* Freezing time in UTC should help when tests are ran on time zones over the day line
* Remove explicit returns
* Page title is escaped, guard against that
* Move Analytics service spec in the proper place
After #3057, that converts from Delayed::Job to ActiveJob, podcast episodes are fetched inline during seeding, which makes the seeding process painfully slow and most of the times unsuccessful.
This PR disables the fetching during seeding. Episodes can be fetched with `rails get_podcast_episodes` task if needed for local testing.
* 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
* add prop for message modal method
* clean up comments from open inbox method
* add inbox type to listing model author
* add sample methods for opening message modal in listings and listing modal
* only show for users with open inbox and hide for self
* use contact_via_connect instead of inbox_type
* fix edit listing to include contact via connect attribute
* wip send message method
* adjust message styling
* change id name
* update destination
* remove unused methods
* 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
* create listings show route
* add link to listings
* include slug in json
* migrate test environment
* unlink listing title
* fix formatting
* remove slug data from json
* remove auto linting
* fix spacing
* add to algolia index?
* actually add index?
* fix merge conflicts?
* update query
* Get a job created that can create a webhook subscription for a twitch user login
* Remove ngork url
* Refactor add store the access token in the cache
* Get a controller stood up to recieve the webhooks. Now they just need to be processed
* Get User columns added and got webhook controller bones working
* Update the webhook job to use the User
* Add a way for the User to input their Twitch User Name. Plus a linter fix
* Delay webhook registration when profile is updated
* Don't add _ in username
* Use String columns
* Quick fix and add some more requests specs
* Specs for the webhook job
* Get a show page Twitch Live Streams. Just a straight embed of the Twitch Everything Embed UI. Works surprisingly well responsively, and works on all screen sizes
* Fix Gemfile.lock from merge issues
* Add support for expired tokens and add spec
* Add secrets to webhook registration and clean up spec to remove token logic
* Verify webhook secret and spec it
* Add rake task to enqueue webhook registration for all Users. This can be used from Heroku Scheduler
* Update the lease seconds to be for 5 days
* Actually lets do 7 so we can refresh twice a week and try to make sure that we can always miss one
* Hijack the existing Twitch logo instead of making a duplicate one
* Remove comment and replace with log line
* Remove some white space
* Log to Airbrake when webhook errors occur
* Move to passing in an id instead of User object
* Extract logic from Job to Service object
* Capitilize in the view
* Move out of models and into services
* Remove letover stub
* Remove one usage of Faraday
* Use HTTParty for all the HTTP here
* Initial classified listings work
* More work on tags
* Additional work finalizing stripe and getting the listings page along
* Finalize-ish listings 🤞
* Add tracking and missing specs for DigestMailer
* Add tracking and missing specs for MembershipMailer
* Add tracking and missing specs for NotifyMailer
* Add tracking and missing specs for ScholarshipMailer
* Remove deprecated analytics role
* Make anchor tag a bit more readable
* Add OrganizationMembership table and model
* Add organization_membership associations
* Add unique indices for user_id and org_id
* Wrap update and create calls in transactions
* Remove specs of deprecated analytics_beta_tester
* add moderation email list columns
* automate tag moderator mailing list
* reorder logic for tag mod list
* add community mod list
* remove trusted privileges when reverting a user to a regular member
* automatically make tag mods community mods
* fix merge conflicts
* add community view
* make methods less complex based on code climate sugggestion
* add specs
* refactor tag moderator module
* fix spec
* Set users email to nil instead of blank
* Remove uniqueness validation duplication for users
* Fix organization following test in case the name contains quotes