about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/api/v1/accounts/follower_accounts_controller.rb2
-rw-r--r--app/controllers/api/v1/accounts/following_accounts_controller.rb2
-rw-r--r--app/controllers/api/v1/accounts/relationships_controller.rb12
-rw-r--r--app/controllers/api/v1/accounts/search_controller.rb1
-rw-r--r--app/controllers/api/v1/accounts/statuses_controller.rb2
-rw-r--r--app/javascript/flavours/glitch/features/getting_started/components/trends.js2
-rw-r--r--app/javascript/flavours/glitch/features/ui/components/link_footer.js5
-rw-r--r--app/javascript/flavours/glitch/features/ui/containers/status_list_container.js2
-rw-r--r--app/javascript/flavours/glitch/locales/en.js4
-rw-r--r--app/javascript/flavours/glitch/styles/components/status.scss4
-rw-r--r--app/javascript/mastodon/locales/de.json2
-rw-r--r--app/javascript/mastodon/locales/defaultMessages.json2
-rw-r--r--app/javascript/mastodon/locales/en.json2
-rw-r--r--app/javascript/mastodon/locales/es.json2
-rw-r--r--app/javascript/mastodon/locales/fi.json2
-rw-r--r--app/javascript/mastodon/locales/fr.json2
-rw-r--r--app/javascript/mastodon/locales/ja.json2
-rw-r--r--app/javascript/mastodon/locales/nl.json2
-rw-r--r--app/javascript/mastodon/locales/pl.json2
-rw-r--r--app/javascript/mastodon/locales/pt-BR.json2
-rw-r--r--app/javascript/mastodon/locales/ru.json2
-rw-r--r--app/javascript/mastodon/locales/sk.json2
-rw-r--r--app/javascript/mastodon/locales/sv.json6
-rw-r--r--app/lib/sanitize_config.rb3
24 files changed, 38 insertions, 31 deletions
diff --git a/app/controllers/api/v1/accounts/follower_accounts_controller.rb b/app/controllers/api/v1/accounts/follower_accounts_controller.rb
index 2277067c9..ff7478618 100644
--- a/app/controllers/api/v1/accounts/follower_accounts_controller.rb
+++ b/app/controllers/api/v1/accounts/follower_accounts_controller.rb
@@ -25,7 +25,7 @@ class Api::V1::Accounts::FollowerAccountsController < Api::BaseController
   end
 
   def hide_results?
-    (@account.hides_followers? && current_account&.id != @account.id) || (current_account && @account.blocking?(current_account))
+    !user_signed_in? || (@account.hides_followers? && current_account&.id != @account.id) || (current_account && @account.blocking?(current_account))
   end
 
   def default_accounts
diff --git a/app/controllers/api/v1/accounts/following_accounts_controller.rb b/app/controllers/api/v1/accounts/following_accounts_controller.rb
index 93d4bd3a4..64e1bd2cd 100644
--- a/app/controllers/api/v1/accounts/following_accounts_controller.rb
+++ b/app/controllers/api/v1/accounts/following_accounts_controller.rb
@@ -25,7 +25,7 @@ class Api::V1::Accounts::FollowingAccountsController < Api::BaseController
   end
 
   def hide_results?
-    (@account.hides_following? && current_account&.id != @account.id) || (current_account && @account.blocking?(current_account))
+    !user_signed_in? || (@account.hides_following? && current_account&.id != @account.id) || (current_account && @account.blocking?(current_account))
   end
 
   def default_accounts
diff --git a/app/controllers/api/v1/accounts/relationships_controller.rb b/app/controllers/api/v1/accounts/relationships_controller.rb
index 1d3992a28..865529e25 100644
--- a/app/controllers/api/v1/accounts/relationships_controller.rb
+++ b/app/controllers/api/v1/accounts/relationships_controller.rb
@@ -5,10 +5,14 @@ class Api::V1::Accounts::RelationshipsController < Api::BaseController
   before_action :require_user!
 
   def index
-    accounts = Account.where(id: account_ids).select('id')
-    # .where doesn't guarantee that our results are in the same order
-    # we requested them, so return the "right" order to the requestor.
-    @accounts = accounts.index_by(&:id).values_at(*account_ids).compact
+    if user_signed_in?
+      accounts = Account.where(id: account_ids).select('id')
+      # .where doesn't guarantee that our results are in the same order
+      # we requested them, so return the "right" order to the requestor.
+      @accounts = accounts.index_by(&:id).values_at(*account_ids).compact
+    else
+      @accounts = Account.none
+    end
     render json: @accounts, each_serializer: REST::RelationshipSerializer, relationships: relationships
   end
 
diff --git a/app/controllers/api/v1/accounts/search_controller.rb b/app/controllers/api/v1/accounts/search_controller.rb
index 3061fcb7e..aa8745931 100644
--- a/app/controllers/api/v1/accounts/search_controller.rb
+++ b/app/controllers/api/v1/accounts/search_controller.rb
@@ -12,6 +12,7 @@ class Api::V1::Accounts::SearchController < Api::BaseController
   private
 
   def account_search
+    return Account.none unless user_signed_in?
     AccountSearchService.new.call(
       params[:q],
       current_account,
diff --git a/app/controllers/api/v1/accounts/statuses_controller.rb b/app/controllers/api/v1/accounts/statuses_controller.rb
index 114ee0a82..fe932f93c 100644
--- a/app/controllers/api/v1/accounts/statuses_controller.rb
+++ b/app/controllers/api/v1/accounts/statuses_controller.rb
@@ -26,6 +26,8 @@ class Api::V1::Accounts::StatusesController < Api::BaseController
   end
 
   def account_statuses
+    return Status.none unless user_signed_in?
+
     statuses = truthy_param?(:pinned) ? pinned_scope : permitted_account_statuses
 
     statuses.merge!(only_media_scope) if truthy_param?(:only_media)
diff --git a/app/javascript/flavours/glitch/features/getting_started/components/trends.js b/app/javascript/flavours/glitch/features/getting_started/components/trends.js
index 0734ec72b..c60f78f7e 100644
--- a/app/javascript/flavours/glitch/features/getting_started/components/trends.js
+++ b/app/javascript/flavours/glitch/features/getting_started/components/trends.js
@@ -38,7 +38,7 @@ export default class Trends extends ImmutablePureComponent {
       <div className='getting-started__trends'>
         <h4><FormattedMessage id='trends.trending_now' defaultMessage='Trending now' /></h4>
 
-        {trends.take(3).map(hashtag => <Hashtag key={hashtag.get('name')} hashtag={hashtag} />)}
+        {trends.take(1).map(hashtag => <Hashtag key={hashtag.get('name')} hashtag={hashtag} />)}
       </div>
     );
   }
diff --git a/app/javascript/flavours/glitch/features/ui/components/link_footer.js b/app/javascript/flavours/glitch/features/ui/components/link_footer.js
index 4d7fc36c2..d26bbe9f8 100644
--- a/app/javascript/flavours/glitch/features/ui/components/link_footer.js
+++ b/app/javascript/flavours/glitch/features/ui/components/link_footer.js
@@ -58,9 +58,10 @@ class LinkFooter extends React.PureComponent {
         <p>
           <FormattedMessage
             id='getting_started.open_source_notice'
-            defaultMessage='Glitchsoc is open source software, a friendly fork of {Mastodon}. You can contribute or report issues on GitHub at {github}.'
+            defaultMessage='GlitchCafe is open source software, based on {Glitchsoc} which is a friendly fork of {Mastodon}. You can contribute or report issues on GitHub at {github}.'
             values={{
-              github: <span><a href='https://github.com/glitch-soc/mastodon' rel='noopener noreferrer' target='_blank'>glitch-soc/mastodon</a> (v{version})</span>,
+              github: <span><a href='https://github.com/pluralcafe/mastodon' rel='noopener noreferrer' target='_blank'>pluralcafe/mastodon</a> (v{version})</span>,
+              Glitchsoc: <a href='https://github.com/glitch-soc/mastodon' rel='noopener noreferrer' target='_blank'>glitch-soc/mastodon</a>,
               Mastodon: <a href='https://github.com/tootsuite/mastodon' rel='noopener noreferrer' target='_blank'>Mastodon</a> }}
           />
         </p>
diff --git a/app/javascript/flavours/glitch/features/ui/containers/status_list_container.js b/app/javascript/flavours/glitch/features/ui/containers/status_list_container.js
index bd2d2eb4e..abcbf13db 100644
--- a/app/javascript/flavours/glitch/features/ui/containers/status_list_container.js
+++ b/app/javascript/flavours/glitch/features/ui/containers/status_list_container.js
@@ -33,8 +33,6 @@ const makeGetStatusIds = (pending = false) => createSelector([
     const statusForId = statuses.get(id);
     let showStatus    = true;
 
-    if (statusForId.get('account') === me) return true;
-
     if (columnSettings.getIn(['shows', 'reblog']) === false) {
       showStatus = showStatus && statusForId.get('reblog') === null;
     }
diff --git a/app/javascript/flavours/glitch/locales/en.js b/app/javascript/flavours/glitch/locales/en.js
index 90e924d4a..528875e45 100644
--- a/app/javascript/flavours/glitch/locales/en.js
+++ b/app/javascript/flavours/glitch/locales/en.js
@@ -1,7 +1,7 @@
 import inherited from 'mastodon/locales/en.json';
 
 const messages = {
-  'getting_started.open_source_notice': 'Glitchsoc is free open source software forked from {Mastodon}. You can contribute or report issues on GitHub at {github}.',
+  'getting_started.open_source_notice': 'GlitchCafe is free open source software forked from {Glitchsoc} and {Mastodon}. You can contribute or report issues on GitHub at {github}.',
   'layout.auto': 'Auto',
   'layout.current_is': 'Your current layout is:',
   'layout.desktop': 'Desktop',
@@ -10,7 +10,7 @@ const messages = {
   'getting_started.onboarding': 'Show me around',
   'onboarding.page_one.federation': '{domain} is an \'instance\' of Mastodon. Mastodon is a network of independent servers joining up to make one larger social network. We call these servers instances.',
   'onboarding.page_one.welcome': 'Welcome to {domain}!',
-  'onboarding.page_six.github': '{domain} runs on Glitchsoc. Glitchsoc is a friendly {fork} of {Mastodon}, and is compatible with any Mastodon instance or app. Glitchsoc is entirely free and open-source. You can report bugs, request features, or contribute to the code on {github}.',
+  'onboarding.page_six.github': '{domain} runs on GlitchCafe, which is based on Glitchsoc. Glitchsoc is a friendly {fork} of {Mastodon}, and is compatible with any Mastodon instance or app. GlitchCafe includes Plural Cafe-specific additions to Glitchsoc. Glitchsoc is entirely free and open-source. You can report bugs, request features, or contribute to the code on {github}.',
   'settings.auto_collapse': 'Automatic collapsing',
   'settings.auto_collapse_all': 'Everything',
   'settings.auto_collapse_lengthy': 'Lengthy toots',
diff --git a/app/javascript/flavours/glitch/styles/components/status.scss b/app/javascript/flavours/glitch/styles/components/status.scss
index a65581136..76167ec60 100644
--- a/app/javascript/flavours/glitch/styles/components/status.scss
+++ b/app/javascript/flavours/glitch/styles/components/status.scss
@@ -132,19 +132,19 @@
     }
 
     ul, ol {
-      margin-left: 1em;
-
       p {
         margin: 0;
       }
     }
 
     ul {
+      margin-left: 1em;
       list-style-type: disc;
     }
 
     ol {
       list-style-type: decimal;
+      list-style-position: inside;
     }
   }
 
diff --git a/app/javascript/mastodon/locales/de.json b/app/javascript/mastodon/locales/de.json
index d0274b077..61d7bd58a 100644
--- a/app/javascript/mastodon/locales/de.json
+++ b/app/javascript/mastodon/locales/de.json
@@ -435,7 +435,7 @@
   "upload_error.poll": "Dateiuploads sind in Kombination mit Umfragen nicht erlaubt.",
   "upload_form.audio_description": "Beschreibe die Audiodatei für Menschen mit Hörschädigungen",
   "upload_form.description": "Für Menschen mit Sehbehinderung beschreiben",
-  "upload_form.edit": "Bearbeiten",
+  "upload_form.edit": "Beschreiben",
   "upload_form.thumbnail": "Miniaturansicht ändern",
   "upload_form.undo": "Löschen",
   "upload_form.video_description": "Beschreibe das Video für Menschen mit einer Hör- oder Sehbehinderung",
diff --git a/app/javascript/mastodon/locales/defaultMessages.json b/app/javascript/mastodon/locales/defaultMessages.json
index 5f7c4a0f6..24b4634c7 100644
--- a/app/javascript/mastodon/locales/defaultMessages.json
+++ b/app/javascript/mastodon/locales/defaultMessages.json
@@ -1283,7 +1283,7 @@
         "id": "upload_form.undo"
       },
       {
-        "defaultMessage": "Edit",
+        "defaultMessage": "Describe",
         "id": "upload_form.edit"
       }
     ],
diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json
index 3e7d29352..cec1dacdd 100644
--- a/app/javascript/mastodon/locales/en.json
+++ b/app/javascript/mastodon/locales/en.json
@@ -440,7 +440,7 @@
   "upload_error.poll": "File upload not allowed with polls.",
   "upload_form.audio_description": "Describe for people with hearing loss",
   "upload_form.description": "Describe for the visually impaired",
-  "upload_form.edit": "Edit",
+  "upload_form.edit": "Describe",
   "upload_form.thumbnail": "Change thumbnail",
   "upload_form.undo": "Delete",
   "upload_form.video_description": "Describe for people with hearing loss or visual impairment",
diff --git a/app/javascript/mastodon/locales/es.json b/app/javascript/mastodon/locales/es.json
index c0615d757..d9cca021a 100644
--- a/app/javascript/mastodon/locales/es.json
+++ b/app/javascript/mastodon/locales/es.json
@@ -435,7 +435,7 @@
   "upload_error.poll": "Subida de archivos no permitida con encuestas.",
   "upload_form.audio_description": "Describir para personas con problemas auditivos",
   "upload_form.description": "Describir para los usuarios con dificultad visual",
-  "upload_form.edit": "Editar",
+  "upload_form.edit": "Describir",
   "upload_form.thumbnail": "Cambiar miniatura",
   "upload_form.undo": "Borrar",
   "upload_form.video_description": "Describir para personas con problemas auditivos o visuales",
diff --git a/app/javascript/mastodon/locales/fi.json b/app/javascript/mastodon/locales/fi.json
index 364427e65..b808be172 100644
--- a/app/javascript/mastodon/locales/fi.json
+++ b/app/javascript/mastodon/locales/fi.json
@@ -435,7 +435,7 @@
   "upload_error.poll": "Tiedon lataaminen ei ole sallittua kyselyissä.",
   "upload_form.audio_description": "Kuvaile kuulovammaisille",
   "upload_form.description": "Anna kuvaus näkörajoitteisia varten",
-  "upload_form.edit": "Muokkaa",
+  "upload_form.edit": "Kuvaile",
   "upload_form.thumbnail": "Change thumbnail",
   "upload_form.undo": "Peru",
   "upload_form.video_description": "Kuvaile kuulo- tai näkövammaisille",
diff --git a/app/javascript/mastodon/locales/fr.json b/app/javascript/mastodon/locales/fr.json
index 6376ca351..a13bc2da9 100644
--- a/app/javascript/mastodon/locales/fr.json
+++ b/app/javascript/mastodon/locales/fr.json
@@ -435,7 +435,7 @@
   "upload_error.poll": "L’envoi de fichiers n’est pas autorisé avec les sondages.",
   "upload_form.audio_description": "Décrire pour les personnes ayant des difficultés d’audition",
   "upload_form.description": "Décrire pour les malvoyant·e·s",
-  "upload_form.edit": "Modifier",
+  "upload_form.edit": "Décrire",
   "upload_form.thumbnail": "Changer la vignette",
   "upload_form.undo": "Supprimer",
   "upload_form.video_description": "Décrire pour les personnes ayant des problèmes d’audition ou de vision",
diff --git a/app/javascript/mastodon/locales/ja.json b/app/javascript/mastodon/locales/ja.json
index 46957c615..8bf63287c 100644
--- a/app/javascript/mastodon/locales/ja.json
+++ b/app/javascript/mastodon/locales/ja.json
@@ -440,7 +440,7 @@
   "upload_error.poll": "アンケートではファイルをアップロードできません。",
   "upload_form.audio_description": "聴取が難しいユーザーへの説明",
   "upload_form.description": "閲覧が難しいユーザーへの説明",
-  "upload_form.edit": "編集",
+  "upload_form.edit": "説明",
   "upload_form.thumbnail": "サムネイルを変更",
   "upload_form.undo": "削除",
   "upload_form.video_description": "視聴が難しいユーザーへの説明",
diff --git a/app/javascript/mastodon/locales/nl.json b/app/javascript/mastodon/locales/nl.json
index ad10bb63c..1611ba636 100644
--- a/app/javascript/mastodon/locales/nl.json
+++ b/app/javascript/mastodon/locales/nl.json
@@ -435,7 +435,7 @@
   "upload_error.poll": "Het uploaden van bestanden is in polls niet toegestaan.",
   "upload_form.audio_description": "Omschrijf dit voor mensen met een auditieve beperking",
   "upload_form.description": "Omschrijf dit voor mensen met een visuele beperking",
-  "upload_form.edit": "Bewerken",
+  "upload_form.edit": "Omschrijf",
   "upload_form.thumbnail": "Change thumbnail",
   "upload_form.undo": "Verwijderen",
   "upload_form.video_description": "Omschrijf dit voor mensen met een auditieve of visuele beperking",
diff --git a/app/javascript/mastodon/locales/pl.json b/app/javascript/mastodon/locales/pl.json
index 20b3b2b9f..c03ab95cf 100644
--- a/app/javascript/mastodon/locales/pl.json
+++ b/app/javascript/mastodon/locales/pl.json
@@ -440,7 +440,7 @@
   "upload_error.poll": "Dołączanie plików nie dozwolone z głosowaniami.",
   "upload_form.audio_description": "Opisz dla osób niesłyszących i niedosłyszących",
   "upload_form.description": "Wprowadź opis dla niewidomych i niedowidzących",
-  "upload_form.edit": "Edytuj",
+  "upload_form.edit": "Opisz",
   "upload_form.thumbnail": "Change thumbnail",
   "upload_form.undo": "Usuń",
   "upload_form.video_description": "Opisz dla osób niesłyszących, niedosłyszących, niewidomych i niedowidzących",
diff --git a/app/javascript/mastodon/locales/pt-BR.json b/app/javascript/mastodon/locales/pt-BR.json
index f494eaaa9..dae582437 100644
--- a/app/javascript/mastodon/locales/pt-BR.json
+++ b/app/javascript/mastodon/locales/pt-BR.json
@@ -435,7 +435,7 @@
   "upload_error.poll": "Não é possível fazer upload de arquivos com enquetes.",
   "upload_form.audio_description": "Descrever para pessoas com deficiência auditiva",
   "upload_form.description": "Descreva para deficientes visuais",
-  "upload_form.edit": "Editar",
+  "upload_form.edit": "Descreva",
   "upload_form.thumbnail": "Change thumbnail",
   "upload_form.undo": "Excluir",
   "upload_form.video_description": "Descreva para pessoas com deficiência auditiva ou visual",
diff --git a/app/javascript/mastodon/locales/ru.json b/app/javascript/mastodon/locales/ru.json
index 38d714525..0d1a401a2 100644
--- a/app/javascript/mastodon/locales/ru.json
+++ b/app/javascript/mastodon/locales/ru.json
@@ -435,7 +435,7 @@
   "upload_error.poll": "К опросам нельзя прикреплять файлы.",
   "upload_form.audio_description": "Опишите аудиофайл для людей с нарушением слуха",
   "upload_form.description": "Добавьте описание для людей с нарушениями зрения:",
-  "upload_form.edit": "Изменить",
+  "upload_form.edit": "Опишите",
   "upload_form.thumbnail": "Изменить обложку",
   "upload_form.undo": "Отменить",
   "upload_form.video_description": "Опишите видео для людей с нарушением слуха или зрения",
diff --git a/app/javascript/mastodon/locales/sk.json b/app/javascript/mastodon/locales/sk.json
index 569a8cd12..048704872 100644
--- a/app/javascript/mastodon/locales/sk.json
+++ b/app/javascript/mastodon/locales/sk.json
@@ -435,7 +435,7 @@
   "upload_error.poll": "Nahrávanie súborov pri anketách nieje možné.",
   "upload_form.audio_description": "Popíš, pre ľudí so stratou sluchu",
   "upload_form.description": "Opis pre slabo vidiacich",
-  "upload_form.edit": "Uprav",
+  "upload_form.edit": "Popíš",
   "upload_form.thumbnail": "Change thumbnail",
   "upload_form.undo": "Vymaž",
   "upload_form.video_description": "Popíš, pre ľudí so stratou sluchu, alebo očným znevýhodnením",
diff --git a/app/javascript/mastodon/locales/sv.json b/app/javascript/mastodon/locales/sv.json
index a0d0807ab..f7fa1a1c6 100644
--- a/app/javascript/mastodon/locales/sv.json
+++ b/app/javascript/mastodon/locales/sv.json
@@ -433,12 +433,12 @@
   "upload_button.label": "Lägg till media",
   "upload_error.limit": "Filöverföringsgränsen överskriden.",
   "upload_error.poll": "Filuppladdning tillåts inte med omröstningar.",
-  "upload_form.audio_description": "Describe for people with hearing loss",
+  "upload_form.audio_description": "Beskriv för hörselskadade",
   "upload_form.description": "Beskriv för synskadade",
-  "upload_form.edit": "Redigera",
+  "upload_form.edit": "Beskriv",
   "upload_form.thumbnail": "Change thumbnail",
   "upload_form.undo": "Ta bort",
-  "upload_form.video_description": "Describe for people with hearing loss or visual impairment",
+  "upload_form.video_description": "Beskriv för hörselskadade eller synskadade",
   "upload_modal.analyzing_picture": "Analyserar bild…",
   "upload_modal.apply": "Verkställ",
   "upload_modal.choose_image": "Choose image",
diff --git a/app/lib/sanitize_config.rb b/app/lib/sanitize_config.rb
index ccc3f4642..80e8f6cc7 100644
--- a/app/lib/sanitize_config.rb
+++ b/app/lib/sanitize_config.rb
@@ -15,6 +15,7 @@ class Sanitize
       ipfs
       ipns
       ssb
+      gemini
       gopher
       xmpp
       magnet
@@ -83,7 +84,7 @@ class Sanitize
     end
 
     MASTODON_STRICT ||= freeze_config(
-      elements: %w(p br span a abbr del pre blockquote code b strong u sub sup i em h1 h2 h3 h4 h5 ul ol li),
+      elements: %w(p br span a abbr del pre blockquote code b strong u sub sup i em h1 h2 h3 h4 h5 ul ol li details summary),
 
       attributes: {
         'a'          => %w(href rel class title),