From: Claire Date: Mon, 17 Jan 2022 09:45:25 +0000 (+0100) Subject: Merge branch 'main' into glitch-soc/merge-upstream X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=b3bf32a21e4dfc43737f50f15d3f258c16d0cf83;p=mastodon.git Merge branch 'main' into glitch-soc/merge-upstream Conflicts: - `app/views/admin/reports/show.html.haml`: Conflicts due to glitch-soc's theming system. --- b3bf32a21e4dfc43737f50f15d3f258c16d0cf83 diff --cc app/services/remove_status_service.rb index 9259c69d9,3535b503b..2fe3bab5c --- a/app/services/remove_status_service.rb +++ b/app/services/remove_status_service.rb @@@ -136,14 -135,8 +137,14 @@@ class RemoveStatusService < BaseServic redis.publish(@status.local? ? 'timeline:public:local:media' : 'timeline:public:remote:media', @payload) end + def remove_from_direct + @status.active_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?) + return if @options[:redraft] || !permanently? @status.media_attachments.destroy_all end diff --cc db/schema.rb index d357512b3,ed615a1ee..7b5a301ff --- a/db/schema.rb +++ b/db/schema.rb @@@ -848,11 -852,10 +852,12 @@@ ActiveRecord::Schema.define(version: 20 t.bigint "account_id", null: false t.bigint "application_id" t.bigint "in_reply_to_account_id" + t.boolean "local_only" t.bigint "poll_id" + t.string "content_type" t.datetime "deleted_at" t.index ["account_id", "id", "visibility", "updated_at"], name: "index_statuses_20190820", order: { id: :desc }, where: "(deleted_at IS NULL)" + t.index ["deleted_at"], name: "index_statuses_on_deleted_at", where: "(deleted_at IS NOT NULL)" t.index ["id", "account_id"], name: "index_statuses_local_20190824", order: { id: :desc }, where: "((local OR (uri IS NULL)) AND (deleted_at IS NULL) AND (visibility = 0) AND (reblog_of_id IS NULL) AND ((NOT reply) OR (in_reply_to_account_id = account_id)))" t.index ["id", "account_id"], name: "index_statuses_public_20200119", order: { id: :desc }, where: "((deleted_at IS NULL) AND (visibility = 0) AND (reblog_of_id IS NULL) AND ((NOT reply) OR (in_reply_to_account_id = account_id)))" t.index ["in_reply_to_account_id"], name: "index_statuses_on_in_reply_to_account_id"