about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorEugen <eugen@zeonfederated.com>2017-04-05 10:29:52 +0200
committerGitHub <noreply@github.com>2017-04-05 10:29:52 +0200
commit8b8839978a222ed53a3dc33eb99f87edc8794000 (patch)
treee140ef9317152e6e40e9cb7061413736605158fe /app
parent29efeecb9ebd4eac0ec65040b2f688d7a5c77283 (diff)
parent78cf0fe1c7981bd3770b80772eb7295bc2a0b753 (diff)
Merge branch 'master' into master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/components/locales/fi.jsx12
-rw-r--r--app/models/status.rb4
-rw-r--r--app/workers/application_worker.rb5
-rw-r--r--app/workers/distribution_worker.rb4
4 files changed, 15 insertions, 10 deletions
diff --git a/app/assets/javascripts/components/locales/fi.jsx b/app/assets/javascripts/components/locales/fi.jsx
index 7b151d6f8..b3ae4bc56 100644
--- a/app/assets/javascripts/components/locales/fi.jsx
+++ b/app/assets/javascripts/components/locales/fi.jsx
@@ -5,9 +5,9 @@ const fi = {
   "status.mention": "Mainitse @{name}",
   "status.delete": "Poista",
   "status.reply": "Vastaa",
-  "status.reblog": "Boostaa",
+  "status.reblog": "Buustaa",
   "status.favourite": "Tykkää",
-  "status.reblogged_by": "{name} boostattu",
+  "status.reblogged_by": "{name} buustasi",
   "status.sensitive_warning": "Arkaluontoista sisältöä",
   "status.sensitive_toggle": "Klikkaa nähdäksesi",
   "video_player.toggle_sound": "Äänet päälle/pois",
@@ -28,7 +28,7 @@ const fi = {
   "getting_started.open_source_notice": "Mastodon Mastodon on avoimen lähdekoodin ohjelma. Voit avustaa tai raportoida ongelmia GitHub palvelussa {github}. {apps}.",
   "column.home": "Koti",
   "column.community": "Paikallinen aikajana",
-  "column.public": "Yhdistetty aikajana",
+  "column.public": "Yleinen aikajana",
   "column.notifications": "Ilmoitukset",
   "tabs_bar.compose": "Luo",
   "tabs_bar.home": "Koti",
@@ -41,7 +41,7 @@ const fi = {
   "compose_form.spoiler": "Piiloita teksti varoituksen taakse",
   "compose_form.private": "Merkitse yksityiseksi",
   "compose_form.privacy_disclaimer": "Sinun yksityinen status toimitetaan mainitsemallesi käyttäjille domaineissa {domains}. Luotatko {domainsCount, plural, one {tähän palvelimeen} other {näihin palvelimiin}}? Postauksen yksityisyys toimii van Mastodon palvelimilla. Jos {domains} {domainsCount, plural, one {ei ole Mastodon palvelin} other {eivät ole Mastodon palvelin}}, viestiin ei tule Yksityinen-merkintää, ja sitä voidaan boostata tai muuten tehdä näkyväksi muille vastaanottajille.",
-  "compose_form.unlisted": "Älä näytä julkisilla aikajanoilla",
+  "compose_form.unlisted": "Älä näytä yleisillä aikajanoilla",
   "navigation_bar.edit_profile": "Muokkaa profiilia",
   "navigation_bar.preferences": "Ominaisuudet",
   "navigation_bar.community_timeline": "Paikallinen aikajana",
@@ -55,14 +55,14 @@ const fi = {
   "upload_form.undo": "Peru",
   "notification.follow": "{name} seurasi sinua",
   "notification.favourite": "{name} tykkäsi statuksestasi",
-  "notification.reblog": "{name} boostasi statustasi",
+  "notification.reblog": "{name} buustasi statustasi",
   "notification.mention": "{name} mainitsi sinut",
   "notifications.column_settings.alert": "Työpöytä ilmoitukset",
   "notifications.column_settings.show": "Näytä sarakkeessa",
   "notifications.column_settings.follow": "Uusia seuraajia:",
   "notifications.column_settings.favourite": "Tykkäyksiä:",
   "notifications.column_settings.mention": "Mainintoja:",
-  "notifications.column_settings.reblog": "Boosteja:",
+  "notifications.column_settings.reblog": "Buusteja:",
 };
 
 export default fi;
diff --git a/app/models/status.rb b/app/models/status.rb
index daf128572..6948ad77c 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -161,9 +161,9 @@ class Status < ApplicationRecord
       return where.not(visibility: [:private, :direct]) if account.nil?
 
       if target_account.blocking?(account) # get rid of blocked peeps
-        where('1 = 0')
+        none
       elsif account.id == target_account.id # author can see own stuff
-        where('1 = 1')
+        all
       elsif account.following?(target_account) # followers can see followers-only stuff, but also things they are mentioned in
         joins('LEFT OUTER JOIN mentions ON statuses.id = mentions.status_id AND mentions.account_id = ' + account.id.to_s)
           .where('statuses.visibility != ? OR mentions.id IS NOT NULL', Status.visibilities[:direct])
diff --git a/app/workers/application_worker.rb b/app/workers/application_worker.rb
new file mode 100644
index 000000000..f2d7c1062
--- /dev/null
+++ b/app/workers/application_worker.rb
@@ -0,0 +1,5 @@
+class ApplicationWorker
+  def info(message)
+    Rails.logger.info("#{self.class.name} - #{message}")
+  end
+end
diff --git a/app/workers/distribution_worker.rb b/app/workers/distribution_worker.rb
index f4e738d80..9a2867ea6 100644
--- a/app/workers/distribution_worker.rb
+++ b/app/workers/distribution_worker.rb
@@ -1,6 +1,6 @@
 # frozen_string_literal: true
 
-class DistributionWorker
+class DistributionWorker < ApplicationWorker
   include Sidekiq::Worker
 
   def perform(status_id)
@@ -9,6 +9,6 @@ class DistributionWorker
     FanOutOnWriteService.new.call(status)
     WarmCacheService.new.call(status)
   rescue ActiveRecord::RecordNotFound
-    true
+    info("Couldn't find the status")
   end
 end