Commit Graph

119 Commits (d9a5c1acfaea82570f2990ad2fc234eba6f57c60)

Author SHA1 Message Date
Sorin Davidoi 0c7c188c45 Web Push Notifications ()
* feat: Register push subscription

* feat: Notify when mentioned

* feat: Boost, favourite, reply, follow, follow request

* feat: Notification interaction

* feat: Handle change of public key

* feat: Unsubscribe if things go wrong

* feat: Do not send normal notifications if push is enabled

* feat: Focus client if open

* refactor: Move push logic to WebPushSubscription

* feat: Better title and body

* feat: Localize messages

* chore: Fix lint errors

* feat: Settings

* refactor: Lazy load

* fix: Check if push settings exist

* feat: Device-based preferences

* refactor: Simplify logic

* refactor: Pull request feedback

* refactor: Pull request feedback

* refactor: Create /api/web/push_subscriptions endpoint

* feat: Spec PushSubscriptionController

* refactor: WebPushSubscription => Web::PushSubscription

* feat: Spec Web::PushSubscription

* feat: Display first media attachment

* feat: Support direction

* fix: Stuff broken while rebasing

* refactor: Integration with session activations

* refactor: Cleanup

* refactor: Simplify implementation

* feat: Set VAPID keys via environment

* chore: Comments

* fix: Crash when no alerts

* fix: Set VAPID keys in testing environment

* fix: Follow link

* feat: Notification actions

* fix: Delete previous subscription

* chore: Temporary logs

* refactor: Move migration to a later date

* fix: Fetch the correct session activation and misc bugs

* refactor: Move migration to a later date

* fix: Remove follow request (no notifications)

* feat: Send administrator contact to push service

* feat: Set time-to-live

* fix: Do not show sensitive images

* fix: Reducer crash in error handling

* feat: Add badge

* chore: Fix lint error

* fix: Checkbox label overlap

* fix: Check for payload support

* fix: Rename action "type" (crash in latest Chrome)

* feat: Action to expand notification

* fix: Lint errors

* fix: Unescape notification body

* fix: Do not allow boosting if the status is hidden

* feat: Add VAPID keys to the production sample environment

* fix: Strip HTML tags from status

* refactor: Better error messages

* refactor: Handle browser not implementing the VAPID protocol (Samsung Internet)

* fix: Error when target_status is nil

* fix: Handle lack of image

* fix: Delete reference to invalid subscriptions

* feat: Better error handling

* fix: Unescape HTML characters after tags are striped

* refactor: Simpify code

* fix: Modify to work with 

* Sort strings alphabetically

* i18n: Updated Polish translation

it annoys me that it's not fully localized :P

* refactor: Use current_session in PushSubscriptionController

* fix: Rebase mistake

* fix: Set cacheName to mastodon

* refactor: Pull request feedback

* refactor: Remove logging statements

* chore(yarn): Fix conflicts with master

* chore(yarn): Copy latest from master

* chore(yarn): Readd offline-plugin

* refactor: Use save! and update!

* refactor: Send notifications async

* fix: Allow retry when push fails

* fix: Save track for failed pushes

* fix: Minify sw.js

* fix: Remove account_id from fabricator
Akihiko Odaki (@fn_aki@pawoo.net) 2083000027 Set default From address in config ()
The old implementation sets default From address in mailers. It sets
the address from SMTP_FROM_ADDRESS, or notifications@localhost. The
behavior is occasionally undesired results.

In production environment, notifications@localhost is likely to be
incorrect.
In testing environment, the email address should not be varied by a
environment variable.

After appling this change,

In production environment, it will throw an exception when launching
Mastodon.
In testing environment, the address will be fixed with
notifications@localhost.
nullkal b8ea28d6d0 Support multiple trusted proxy ip addresses ()
* Support multiple trusted proxy ip addresses

* correct coding style
Matt Jankowski 2212dc4aaa Update Rails to version 5.1.1 ()
* Update rails to version 5.1.1

* Run `rails app:update`

* Remove the override of polymorphic activity relationship

* Silence warning about otp_secret attribute being unknown to rails

* We will only introduce form_with where we want to use remote data
Clworld df92f010ad Set config.cache_store in environments file. ()
* Set config.cache_store in application.rb

* Set config.cache_store in environments.

* fix code format.
Eugen Rochko 2cc0d56652 Add back stdout logging to development environment after rails_12factor was removed ()
alpaca-tc ef226a6f22 Remove rails_12factor ()
Eugen Rochko b8e166894b Fix Scheduler::SubscriptionsScheduler ()
* Fix Scheduler::SubscriptionsScheduler, add worker test for it

* Change production log level of Sidekiq to "warn" instead of "info"
Eugen Rochko 81584779cb More robust PuSH subscription refreshes ()
* Fix  - Use sidekiq scheduler to refresh PuSH subscriptions instead of cron

Fix an issue where / in domain would raise exception in TagManager#normalize_domain

PuSH subscriptions refresh done in a round-robin way to avoid hammering a single
server's hub in sequence. Correct handling of failures/retries through Sidekiq (see
also ). Optimize Account#with_followers scope. Also, since subscriptions
are now delegated to Sidekiq jobs, an uncaught exception will not stop the entire
refreshing operation halfway through

Fix  - Correct user agent header on outgoing http requests

* Add test for SubscribeService

* Extract #expiring_accounts into method

* Make mastodon:push:refresh no-op

* Queues are now defined in sidekiq.yml

* Queues are now in sidekiq.yml
Eugen Rochko c997091166 Clean up redis configuration. Allow using REDIS_URL to set advanced ()
connection options instead of setting REDIS_HOST etc individually

Close 
Eugen Rochko f5bf5ebb82 Replace sprockets/browserify with Webpack ()
* Replace browserify with webpack

* Add react-intl-translations-manager

* Do not minify in development, add offline-plugin for ServiceWorker background cache updates

* Adjust tests and dependencies

* Fix production deployments

* Fix tests

* More optimizations

* Improve travis cache for npm stuff

* Re-run travis

* Add back support for custom.scss as before

* Remove offline-plugin and babili

* Fix issue with Immutable.List().unshift(...values) not working as expected

* Make travis load schema instead of running all migrations in sequence

* Fix missing React import in WarningContainer. Optimize rendering performance by using ImmutablePureComponent instead of
React.PureComponent. ImmutablePureComponent uses Immutable.is() to compare props. Replace dynamic callback bindings in
<UI />

* Add react definitions to places that use JSX

* Add Procfile.dev for running rails, webpack and streaming API at the same time
Akihiko Odaki 26bc591572 Allow to set CA file for SMTP ()
Matt Jankowski a0dd90a397 Return force_ssl to the controller ()
Matt Jankowski 57cd6546c3 Make HSTS enable optional with force_ssl ()
Matt Jankowski ee82d8a876 Move force_ssl check to production config ()
The force_ssl method from controllers does not add all of the options that the
sitewide configuration in a config block does. For example, HSTS enforcement is
not added by the controller method, but is added by this style.
Miguel Jacq b79ba3db8a Send nil for SMTP_LOGIN or SMTP_PASSWORD if it was left blank in the envfile, otherwise Ruby still attempts auth even if SMTP_AUTH_METHOD is none ()
Miguel Jacq e9eaf9e33c Allow using an SMTP server without authentication ()
* Allow using an SMTP server without authentication (e.g Postfix relay on the same host) by setting SMTP_LOGIN and SMTP_AUTH_METHOD to 'none'

* Add note in .env.production.sample about SMTP settings for servers where no auth is required

* Assume that SMTP_LOGIN and SMTP_PASSWORD will be blank if we set SMTP_AUTH_METHOD to none
Les Orchard 7609593e48 Add REDIS_DB env variable to configure Redis database ()
Effy Elden c019b0acfd Modify ActionMailer configuration to default to ENV['LOCAL_DOMAIN'] if ENV['SMTP_DOMAIN'] is not set. The previous fallback, config.x.local_domain, is undefined when the code is called. ()
James Moore d9dc0fe84e smtp delivery type fix ()
* delivery fix

# Conflicts:
#	config/environments/production.rb

* added stub in .env file

* reordered and added a comment
Eugen 40bdf43297 Change default log level in production from :debug to :info for less I/O ()
Eugen 5cdd2c2414 Fix - set a wrong default on :openssl_verify_mode ()
Alexander Mankuta 0dbbc16c69 More SMTP customization ()
* Allow SMTP auth method customization

* Add SMTP openssl_verify_mode option support

Allows one use self-signed certs with their SMTP server.

* Add SMTP enable_starttls_auto option support
Ash Furrow c3e7bac1cc Allows setting log level in env variable ()
* Allows setting log level in env variable.

* Made changes based on feedback in .
Eugen Rochko 6b81d10030 Add digest e-mails
Eugen Rochko 9d4cad6307 Improve glow
Eugen Rochko 19b9e1e2c3 Preheat status cache
Eugen Rochko 1da0ce5c7c Looks like log level :debug is required for activerecord times to be tracked
Eugen Rochko 65402d9c09 Fix activerecord logging in production
Eugen Rochko cc5c1e5feb Removed accidental n+1 query from notifications, updated some deps,
improved how "show more" link looks
Eugen Rochko 67befe5463 Allow to specify trusted proxies through env
Eugen Rochko e028406db4 Fix code style
Effy Elden 5fef55c11a Set remote dev environments to use letter_opener_web, add default .env.vagrant variables
Eugen Rochko f051c2e813 Fix statsd null backend not being initialized properly
Eugen Rochko 306eb6e9c9 Add optional StatsD performance tracking
Effy Elden ab4f5f5da5 Add Heroku deployment support
Eugen Rochko cc70f28f19 Adding rack timeout of 30sec, PuSH jobs moved to push queue so they
can be processed separately
Eugen Rochko 6c82dfcf5f Fix CDN_HOST variable requirement
Eugen Rochko 4f1d863615 Only distribute statuses to followers who signed in in the last 2 weeks, add rake task for clearing feeds of inactive users
Eugen Rochko 7944ed6fe5 Adding option to specify asset server, filter followers query by local accounts
during Fan Out On Write to load less stuff into memory
Eugen Rochko dbe00a4156 Improved configuration from ENV, cleaned up timeline filter methods
to be more readable, add extra logging to process feed service
Eugen Rochko 829d189f44 Add tests for recently added API end points
Eugen Rochko 53fb7b1aa8 Replace in-memory cache store with redis store, should decrease memory
footprint of each running process by 128mb
Eugen Rochko a9e40a3d80 Adding OAuth access scopes, fixing OAuth authorization UI, adding rate limiting
to the API
Eugen Rochko dd02fc0ec4 More debugging
Eugen Rochko 6611e3a2ef More debugging
Eugen Rochko 4baca34a45 Do not compress JS (perhaps it removes source maps, needed for debugging)
Eugen Rochko fe77921e47 Catching more exceptions that slipped through, removing AR logging from
production as it's very verbose and not very useful
Eugen Rochko 85d89b472d Optimized n+1 queries in accounts Atom and HTML views
Added stack trace for SQL queries in development
Removed badly thought out accounts/lookup API
Eugen Rochko 509c18eb13 Fix local follows, 404 in logs
Eugen Rochko 0f4bc56719 Improving production logs, removing n+1 on media attachments in atom,
adding attachments display to static views
Eugen Rochko ae1fac0062 Add API to upload media attachments
Eugen Rochko 413e700fe0 Enhancing test suite but I think the problem might have been caching setting
Eugen Rochko 92afd29650 The frontend will now be an OAuth app, auto-authorized. The frontend will use an access token for API requests
Adding better errors for the API controllers, posting a simple status works from the frontend now
Eugen Rochko 49520d6e62 Adding React.js, Redux, revamping dashboard
Eugen Rochko 68c93f8b85 Final fix for ActionCable origin issues
Eugen Rochko 8985f8e66c Fixing more configuration issues with ActionCable
Eugen Rochko 8459acd123 Fix for force SSL issue with websockets
Eugen Rochko 6deb9f966e Live timelines using ActionCable
Eugen Rochko 10ba09f546 Upgrade to Rails 5.0.0.1
Eugen Rochko 6c480c8429 Oops, typo
Eugen Rochko 85b00d19b8 Moving Salmon notifications to background processing, fixing mini-profiler
behaviour with Turbolinks enabled, optimizing Rabl for production
Eugen Rochko 253ab26520 Adding more tests for helpers
Eugen Rochko e2b846f630 Adding letter opener for development and Rack::Attack for future rate limiting implementations
Eugen Rochko 48d66a2055 Fixing the docker container setup (with assets compilation &co)
Eugen Rochko 2c374cd97c Adding e-mail configuration
Eugen Rochko 1dad72bf13 Fixes and general progress
Eugen Rochko 709c6685a9 Made some progress
Eugen Rochko 9c4856bdb1 Initial commit