]> cat aescling's git repositories - mastodon.git/commitdiff
Merge branch 'main' into glitch-soc/merge-upstream
authorClaire <claire.github-309c@sitedethib.com>
Mon, 27 Dec 2021 14:16:18 +0000 (15:16 +0100)
committerClaire <claire.github-309c@sitedethib.com>
Mon, 27 Dec 2021 14:16:18 +0000 (15:16 +0100)
Conflicts:
- `README.md`:
  We have completely different contents. Kept our version.
- `package.json`:
  Not a real conflict, just an upstream dependency udpated
  textually too close to a glitch-soc-only dependency.
  Updated dependencies like upstream.
- `streaming/index.js`:
  Conflict due to code style changes on parts that were
  modified in glitch-soc to handle local-only toots.
  Changed style according to upstream.

1  2 
Gemfile
Gemfile.lock
app/models/user.rb
package.json
streaming/index.js
yarn.lock

diff --cc Gemfile
index 10417b2df23e4c2345de6df694f0f0d52c2bc50d,0e5da297635faa157bb3f81057757d5465705d4c..5f97e6e81269663cd572589995bb66a0b9f7d833
+++ b/Gemfile
@@@ -99,10 -99,8 +99,10 @@@ gem 'json-ld
  gem 'json-ld-preloaded', '~> 3.1'
  gem 'rdf-normalize', '~> 0.4'
  
 +gem 'redcarpet', '~> 3.5'
 +
  group :development, :test do
-   gem 'fabrication', '~> 2.22'
+   gem 'fabrication', '~> 2.23'
    gem 'fuubar', '~> 2.5'
    gem 'i18n-tasks', '~> 0.9', require: false
    gem 'pry-byebug', '~> 3.9'
diff --cc Gemfile.lock
Simple merge
Simple merge
diff --cc package.json
Simple merge
index 190f96b51b87a118c4740694f1296d445d989135,74cbf4c2c4542900f2fbcefc0267ec6fd2ba078c..ff873cd044e1e05692e6ffb06623c3af5656d3d4
@@@ -364,9 -340,8 +340,9 @@@ const startWorker = async (workerId) =
    const channelNameFromPath = req => {
      const { path, query } = req;
      const onlyMedia = isTruthy(query.only_media);
 +    const allowLocalOnly = isTruthy(query.allow_local_only);
  
-     switch(path) {
+     switch (path) {
      case '/api/v1/streaming/user':
        return 'user';
      case '/api/v1/streaming/user/notification':
     * @param {function(string, string): void} output
     * @param {function(string[], function(string): void): void} attachCloseHandler
     * @param {boolean=} needsFiltering
 +   * @param {boolean=} allowLocalOnly
     * @return {function(string): void}
     */
 -  const streamFrom = (ids, req, output, attachCloseHandler, needsFiltering = false) => {
 +  const streamFrom = (ids, req, output, attachCloseHandler, needsFiltering = false, allowLocalOnly = false) => {
-     const accountId  = req.accountId || req.remoteAddress;
+     const accountId = req.accountId || req.remoteAddress;
  
      log.verbose(req.requestId, `Starting stream from ${ids.join(', ')} for ${accountId}`);
  
    app.get('/api/v1/streaming/*', (req, res) => {
      channelNameToIds(req, channelNameFromPath(req), req.query).then(({ channelIds, options }) => {
        const onSend = streamToHttp(req, res);
-       const onEnd  = streamHttpEnd(req, subscriptionHeartbeat(channelIds));
+       const onEnd = streamHttpEnd(req, subscriptionHeartbeat(channelIds));
  
 -      streamFrom(channelIds, req, onSend, onEnd, options.needsFiltering);
 +      streamFrom(channelIds, req, onSend, onEnd, options.needsFiltering, options.allowLocalOnly);
      }).catch(err => {
        log.verbose(req.requestId, 'Subscription error:', err.toString());
        httpNotFound(res);
          return;
        }
  
-       const onSend        = streamToWs(request, socket, streamNameFromChannelName(channelName, params));
+       const onSend = streamToWs(request, socket, streamNameFromChannelName(channelName, params));
        const stopHeartbeat = subscriptionHeartbeat(channelIds);
-       const listener      = streamFrom(channelIds, request, onSend, undefined, options.needsFiltering, options.allowLocalOnly);
 -      const listener = streamFrom(channelIds, request, onSend, undefined, options.needsFiltering);
++      const listener = streamFrom(channelIds, request, onSend, undefined, options.needsFiltering, options.allowLocalOnly);
  
        subscriptions[channelIds.join(';')] = {
          listener,
diff --cc yarn.lock
Simple merge