Commit Graph

91 Commits (v3.4.4)

Author SHA1 Message Date
unarist 91c789ec63 Don't stream toots from users who have blocked the recipient user (#3300)
* Don't stream toots from users who have blocked the recipient user

This filter was already applied on the `/api/v1/timelines/public` API, but
not yet for the Streaming API.

* Boosted status' account_id doesn't need for filtering in streaming/index.js

This filtering is only for public/hashtag timelines, but boosts already filtered on FanOutOnWriteService because those timelines don't show boosts.
7 years ago
Clworld 45837c533e Re-add stream end log for WebSocket (#3397) 7 years ago
Eugen Rochko 425d02287a Improve streaming API cluster logging (#3370)
* Improve streaming API cluster logging

* Less verbose error middleware logging (stack trace useless there)

* Fix error logging

* Prevent potential issue

* Add missing "done()" in catch of Promise.all, websocket heartbeat re-implemented like in example

* I actually forgot a done(), the absolute madman
7 years ago
Clworld 2e429c0c25 Reject revoked access_token on Streaming API. (#3367) 7 years ago
Eugen Rochko 0734e1fe33 Language filtering in streaming API (#3339) 7 years ago
Matt Jankowski 8e84177305 Use local default for postgres host in node streaming service (#3240)
This location varies across postgres installations, and it seems like the pg
package knows how to guess correctly on each system.
7 years ago
happycoloredbanana 7fba4cb3d1 Allow access token in URI (#3208) 7 years ago
Eugen Rochko 20c0054460 Adjust REDIS_URL usage in node_redis (#3183)
Resolves #2780
7 years ago
Yamagishi Kazutoshi 2e112e2406 Improve eslint rules (#3147)
* Add semi to ESLint rules

* Add padded-blocks to ESLint rules

* Add comma-dangle to ESLint rules

* add config/webpack and storyboard

* add streaming/

* yarn test:lint -- --fix
7 years ago
Eugen Rochko 620d0d8029 Account domain blocks (#2381)
* Add <ostatus:conversation /> tag to Atom input/output

Only uses ref attribute (not href) because href would be
the alternate link that's always included also.

Creates new conversation for every non-reply status. Carries
over conversation for every reply. Keeps remote URIs verbatim,
generates local URIs on the fly like the rest of them.

* Conversation muting - prevents notifications that reference a conversation
(including replies, favourites, reblogs) from being created. API endpoints
/api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute

Currently no way to tell when a status/conversation is muted, so the web UI
only has a "disable notifications" button, doesn't work as a toggle

* Display "Dismiss notifications" on all statuses in notifications column, not just own

* Add "muted" as a boolean attribute on statuses JSON

For now always false on contained reblogs, since it's only relevant for
statuses returned from the notifications endpoint, which are not nested

Remove "Disable notifications" from detailed status view, since it's
only relevant in the notifications column

* Up max class length

* Remove pending test for conversation mute

* Add tests, clean up

* Rename to "mute conversation" and "unmute conversation"

* Raise validation error when trying to mute/unmute status without conversation

* Adding account domain blocks that filter notifications and public timelines

* Add tests for domain blocks in notifications, public timelines
Filter reblogs of blocked domains from home

* Add API for listing and creating account domain blocks

* API for creating/deleting domain blocks, tests for Status#ancestors
and Status#descendants, filter domain blocks from them

* Filter domains in streaming API

* Update account_domain_block_spec.rb
7 years ago
Hayato IZUMI 5b3c7572ca Use REDIS_DB in streaming (#3094) 7 years ago
Yamagishi Kazutoshi 72c8562cc9 Use babel-preset-env on Streaming Server (#2998)
* Use babel-preset-env on Streaming Server

Change the streaming server to use babel-preset-env as well as asset compilation.
This shortens the load time at first boot.

* remove babel-plugin-lodash
7 years ago
Ayumu AIZAWA b913746752 [bug] wrong config setting for dababase. (#2984) 7 years ago
beatrix 5c1f70b5c5 namespace redis usage (#2869)
* add redis-namespace gem

* namespace redis usage

* refactor redis namespace code to be less intrusive

previously : would be prepended to keys when the
REDIS_NAMESPACE env var was not set

now if it is not set the namespacing functions are
not used at all, which should prevent disruptions
when instances update.

* fix redis namespace variable style in streaming js

* remove trailing space

* final redis namespace style fix
7 years ago
Eshin Kunishima 67b7d3d3b6 Replace ws with uws (#2807)
* Replace ws with uws

* fix indent

* Adjust indentation

* remove trailing space
7 years ago
abcang 629a4d0fca fix DB_URL (#2778) 7 years ago
Eugen Rochko c997091166 Clean up redis configuration. Allow using REDIS_URL to set advanced (#2732)
connection options instead of setting REDIS_HOST etc individually

Close #1986
7 years ago
Akihiko Odaki a6788662b0 Revert "Use PostgreSQL inheritance for blocks and mutes (#2520)" (#2634)
This reverts commit 5135d609b7.
7 years ago
Akihiko Odaki 5135d609b7 Use PostgreSQL inheritance for blocks and mutes (#2520) 7 years ago
YOU d0665726ca Update index.js (#2612) 7 years ago
masarakki d0ec4fb828 refactor-cores (#2308) 7 years ago
Akihiko Odaki 16cd648181 Allow to listen Unix socket (#2085)
* Allow puma to listen Unix socket

* streaming: Show the whole listening address instead of the port

Port is not always appropriate (e.g. Unix socket)

* streaming: Close server before exiting

This change especially allows to remove Unix socket before exiting.
7 years ago
178inaba dd517b9a55 Fix a bug where the hashtag could not be specified with the streaming API (#2258) 7 years ago
kuro5hin 0790aa9165 Fix streaming server worker count (#2082)
* Make sure we start at least one streaming worker, even if there's only one CPU and we're in production mode.

* Oops, let's make sure we're counting cpus right too.
7 years ago
geta6 64e1d51025 Improve streaming server with cluster (#1970) 7 years ago
Gavin Mogan 3672a799d4 Dev Tooling fixes (eslint/editorconfig) (#1398)
* Add eslint to dev dependancies so it gets installed for the repo

yarn add --dev eslint babel-eslint eslint-plugin-reac

project specific version of eslint, you can globally install eslint-cli
if you want the global runtime, or add .bin to your path

* fix eslint errors about inconsitent returns

* eslint ignore the same as git ignore. allows for eslint .

* Add editorconfig file so everyones editor will be setup to follow the same standards
7 years ago
Eugen Rochko 3618cc04ff Add heartbeat to websockets streaming API connections 7 years ago
Eugen Rochko c64a1c25c4 Fix #231 - Muting 7 years ago
Eugen Rochko 02e91a96dd Make streaming API use one pattern-matching redis pubsub connection
Refresh timelines when streaming API reconnects in the UI
7 years ago
Eugen Rochko c8252759df Add streaming API channels for local-only statuses 7 years ago
Eugen Rochko 4d2be9f432 Add unique request IDs to streaming API to improve logs 7 years ago
Eugen Rochko fb6aa7ad5c Add tracking of delay to streaming API 7 years ago
Eugen Rochko ccb8ac8573 Make the streaming API also handle websockets (because trying to get the browser EventSource interface to
work flawlessly was a nightmare). WARNING: This commit makes the web UI connect to the streaming API instead
of ActionCable like before. This means that if you are upgrading, you should set that up beforehand.
7 years ago
Eugen Rochko 8c0bc1309f Add CORS to the streaming API 7 years ago
Eugen Rochko df507f5e6e Fix streaming API queries 7 years ago
Eugen Rochko aa2fa227e9 Adding documentation for streaming API. Fixing filtering bug 7 years ago
Eugen Rochko 61ce15d94b Make node read the right .env file 7 years ago
Eugen Rochko d1a01dbbdd Add redis configuration to streaming API 7 years ago
Eugen Rochko b6c922f169 Fix potential resource leaks in streaming server 7 years ago
Eugen Rochko 1ee4a17f37 Add logging and filtering to the node.js streaming API 7 years ago
Eugen Rochko 0cfd3188b4 Add streaming API in Node.js 7 years ago