]> cat aescling's git repositories - mastodon.git/commitdiff
Merge branch 'master' into glitch-soc/merge-upstream
authorThibaut Girka <thib@sitedethib.com>
Tue, 6 Nov 2018 14:22:44 +0000 (15:22 +0100)
committerThibaut Girka <thib@sitedethib.com>
Tue, 6 Nov 2018 14:22:44 +0000 (15:22 +0100)
1  2 
Gemfile.lock
app/controllers/tags_controller.rb
app/javascript/mastodon/locales/defaultMessages.json
app/javascript/mastodon/locales/en.json
app/javascript/mastodon/locales/ja.json
app/javascript/mastodon/locales/pl.json
app/javascript/styles/mastodon/components.scss
app/models/status.rb
package.json
yarn.lock

diff --cc Gemfile.lock
Simple merge
Simple merge
index f67a05b3c14e3a90ff7606e3bfd7aa55d4cdee4c,11a75f876b51856ae1019410f7c27f7f4468a7e9..e73f11503e6da8f8f6553d08f220e55fdd49497a
@@@ -85,9 -82,18 +85,20 @@@ class Status < ApplicationRecor
    scope :including_silenced_accounts, -> { left_outer_joins(:account).where(accounts: { silenced: true }) }
    scope :not_excluded_by_account, ->(account) { where.not(account_id: account.excluded_from_timeline_account_ids) }
    scope :not_domain_blocked_by_account, ->(account) { account.excluded_from_timeline_domains.blank? ? left_outer_joins(:account) : left_outer_joins(:account).where('accounts.domain IS NULL OR accounts.domain NOT IN (?)', account.excluded_from_timeline_domains) }
+   scope :tagged_with_all, ->(tags) {
+     Array(tags).map(&:id).map(&:to_i).reduce(self) do |result, id|
+       result.joins("INNER JOIN statuses_tags t#{id} ON t#{id}.status_id = statuses.id AND t#{id}.tag_id = #{id}")
+     end
+   }
+   scope :tagged_with_none, ->(tags) {
+     Array(tags).map(&:id).map(&:to_i).reduce(self) do |result, id|
+       result.joins("LEFT OUTER JOIN statuses_tags t#{id} ON t#{id}.status_id = statuses.id AND t#{id}.tag_id = #{id}")
+             .where("t#{id}.tag_id IS NULL")
+     end
+   }
  
 +  scope :not_local_only, -> { where(local_only: [false, nil]) }
 +
    cache_associated :account,
                     :application,
                     :media_attachments,
diff --cc package.json
Simple merge
diff --cc yarn.lock
Simple merge
This page took 0.096326 seconds and 3 git commands to generate.