]> cat aescling's git repositories - mastodon.git/commitdiff
Merge branch 'master' into glitch-soc/merge-upstream
authorThibaut Girka <thib@sitedethib.com>
Wed, 13 May 2020 20:11:49 +0000 (22:11 +0200)
committerThibaut Girka <thib@sitedethib.com>
Wed, 13 May 2020 20:11:49 +0000 (22:11 +0200)
12 files changed:
1  2 
Gemfile
Gemfile.lock
app/javascript/mastodon/features/compose/components/poll_form.js
app/services/batched_remove_status_service.rb
app/services/fan_out_on_write_service.rb
app/services/remove_status_service.rb
app/views/directories/index.html.haml
app/views/statuses/_simple_status.html.haml
config/locales/en.yml
db/schema.rb
package.json
yarn.lock

diff --cc Gemfile
Simple merge
diff --cc Gemfile.lock
Simple merge
index 72f716dc5119a83f1201724a782972009e287c9e,276eac0c18c93224192596a2cf3e99abd81c3d6b..dd9c1264da6b123454b634d7efed2e6d67d08046
@@@ -93,17 -92,13 +97,21 @@@ class FanOutOnWriteService < BaseServic
      Rails.logger.debug "Delivering status #{status.id} to media timeline"
  
      Redis.current.publish('timeline:public:media', @payload)
-     Redis.current.publish('timeline:public:local:media', @payload) if status.local?
+     if status.local?
+       Redis.current.publish('timeline:public:local:media', @payload)
+     else
+       Redis.current.publish('timeline:public:remote:media', @payload)
+     end
    end
  
 +  def deliver_to_direct_timelines(status)
 +    Rails.logger.debug "Delivering status #{status.id} to direct timelines"
 +
 +    FeedInsertWorker.push_bulk(status.mentions.includes(:account).map(&:account).select { |mentioned_account| mentioned_account.local? }) do |account|
 +      [status.id, account.id, :direct]
 +    end
 +  end
 +
    def deliver_to_own_conversation(status)
      AccountConversation.add_status(status.account, status)
    end
index 1ddce675cd182a790a7d7ee9b9122fe9db669ac0,4f0edc3cfbaaa2ff346eca7942179380cc52ddc1..a5aafee21ecfcd0d01fe75c33f855474668cc01a
@@@ -149,15 -151,13 +153,19 @@@ class RemoveStatusService < BaseServic
      return unless @status.public_visibility?
  
      redis.publish('timeline:public:media', @payload)
-     redis.publish('timeline:public:local:media', @payload) if @status.local?
+     if @status.local?
+       redis.publish('timeline:public:local:media', @payload)
+     else
+       redis.publish('timeline:public:remote:media', @payload)
+     end
    end
  
 +  def remove_from_direct
 +    @mentions.each do |mention|
 +      FeedManager.instance.unpush_from_direct(mention.account, @status) if mention.account.local?
 +    end
 +  end
 +
    def remove_media
      return if @options[:redraft] || (!@options[:immediate] && @status.reported?)
  
Simple merge
Simple merge
diff --cc db/schema.rb
Simple merge
diff --cc package.json
index 2d454f825dea8945accb9ec68574b74f56e9647a,44f810b986167c89e92365c849f441f60b516280..5357f46571c3a07f9f554791efc24cd558ff1c4a
      "@babel/preset-env": "^7.9.6",
      "@babel/preset-react": "^7.9.4",
      "@babel/runtime": "^7.8.4",
-     "@clusterws/cws": "^0.17.3",
+     "@clusterws/cws": "^2.0.0",
      "@gamestdio/websocket": "^0.3.2",
-     "@rails/ujs": "^6.0.2",
+     "@rails/ujs": "^6.0.3",
      "array-includes": "^3.1.1",
      "arrow-key-navigation": "^1.1.0",
 +    "atrament": "0.2.4",
      "autoprefixer": "^9.7.6",
      "axios": "^0.19.2",
      "babel-loader": "^8.1.0",
diff --cc yarn.lock
Simple merge