From 33a71e8f7cd28aad5aa690a6d77aa83fe289f69c Mon Sep 17 00:00:00 2001 From: ThibG Date: Tue, 30 Oct 2018 00:47:31 +0100 Subject: Do not hide boost notifications from followed people with hidden boosts (#9147) * Do not hide boost notifications from followed people with hidden boosts Not displaying boosts from a followed user in the Home timeline and not having notifications when they reblog your own content are two very separate concerns, tying them together seem counter-intuitive and unwanted. * Update specs accordingly --- app/services/notify_service.rb | 2 +- spec/services/notify_service_spec.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/services/notify_service.rb b/app/services/notify_service.rb index 49022a844..a8b7bb30b 100644 --- a/app/services/notify_service.rb +++ b/app/services/notify_service.rb @@ -31,7 +31,7 @@ class NotifyService < BaseService end def blocked_reblog? - @recipient.muting_reblogs?(@notification.from_account) + false end def blocked_follow_request? diff --git a/spec/services/notify_service_spec.rb b/spec/services/notify_service_spec.rb index d34667943..39a681abb 100644 --- a/spec/services/notify_service_spec.rb +++ b/spec/services/notify_service_spec.rb @@ -104,9 +104,9 @@ RSpec.describe NotifyService, type: :service do is_expected.to change(Notification, :count) end - it 'hides reblogs when disabled' do - recipient.follow!(sender, reblogs: false) - is_expected.to_not change(Notification, :count) + it 'shows reblogs when disabled' do + recipient.follow!(sender, reblogs: true) + is_expected.to change(Notification, :count) end end -- cgit From 5ee0b51ac8363da1687cc518e80eac53c23b048a Mon Sep 17 00:00:00 2001 From: Masoud Abkenar Date: Tue, 30 Oct 2018 00:47:43 +0100 Subject: RTL: fix preferences page checkbox margins (#9145) * RTL: fix preferences page checkbox margins * Update rtl.scss --- app/javascript/styles/mastodon/rtl.scss | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/javascript/styles/mastodon/rtl.scss b/app/javascript/styles/mastodon/rtl.scss index 176fb5ce0..e5621c519 100644 --- a/app/javascript/styles/mastodon/rtl.scss +++ b/app/javascript/styles/mastodon/rtl.scss @@ -199,12 +199,16 @@ body.rtl { margin-left: 5px; } - .simple_form .check_boxes .checkbox label, - .simple_form .input.with_label.boolean label.checkbox { + .simple_form .check_boxes .checkbox label { padding-left: 0; padding-right: 25px; } + .simple_form .input.with_label.boolean label.checkbox { + padding-left: 25px; + padding-right: 0; + } + .simple_form .check_boxes .checkbox input[type="checkbox"], .simple_form .input.boolean input[type="checkbox"] { left: auto; -- cgit From e961a763a2cf722bd5f1311a2de706e28d6c33c6 Mon Sep 17 00:00:00 2001 From: Masoud Abkenar Date: Tue, 30 Oct 2018 00:49:29 +0100 Subject: RTL: fix toot privacy preferences radio buttonss (#9146) --- app/javascript/styles/mastodon/rtl.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/javascript/styles/mastodon/rtl.scss b/app/javascript/styles/mastodon/rtl.scss index e5621c519..940dc8af2 100644 --- a/app/javascript/styles/mastodon/rtl.scss +++ b/app/javascript/styles/mastodon/rtl.scss @@ -374,4 +374,9 @@ body.rtl { padding-left: 0; padding-right: 10px; } + + .simple_form .input.radio_buttons .radio > label input { + left: auto; + right: 0; + } } -- cgit From d4415cc3169fcbb4d373e41c9bf5912a337f87a6 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 30 Oct 2018 01:06:47 +0100 Subject: Bump i18n-tasks from master to 0.9.28 (#9148) --- Gemfile | 2 +- Gemfile.lock | 33 +++++++++++++-------------------- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/Gemfile b/Gemfile index 3ffb0140f..1f9733530 100644 --- a/Gemfile +++ b/Gemfile @@ -95,7 +95,7 @@ gem 'rdf-normalize', '~> 0.3' group :development, :test do gem 'fabrication', '~> 2.20' gem 'fuubar', '~> 2.3' - gem 'i18n-tasks', '~> 0.9', require: false, git: 'https://github.com/glebm/i18n-tasks.git', branch: 'master', ref: 'a1c9089b4ffed4f33e3b3a1bb2378d7a23445c0f' + gem 'i18n-tasks', '~> 0.9', require: false gem 'pry-byebug', '~> 3.6' gem 'pry-rails', '~> 0.3' gem 'rspec-rails', '~> 3.8' diff --git a/Gemfile.lock b/Gemfile.lock index b0efd1bfb..aedfe6de8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,20 +1,3 @@ -GIT - remote: https://github.com/glebm/i18n-tasks.git - revision: a1c9089b4ffed4f33e3b3a1bb2378d7a23445c0f - ref: a1c9089b4ffed4f33e3b3a1bb2378d7a23445c0f - branch: master - specs: - i18n-tasks (0.9.27) - activesupport (>= 4.0.2) - ast (>= 2.1.0) - erubi - highline (>= 2.0.0) - i18n - parser (>= 2.2.3.0) - rails-i18n - rainbow (>= 2.2.2, < 4.0) - terminal-table (>= 1.5.1) - GIT remote: https://github.com/rtomayko/posix-spawn revision: 58465d2e213991f8afb13b984854a49fcdcc980c @@ -289,6 +272,16 @@ GEM rainbow (>= 2.0.0) i18n (1.1.1) concurrent-ruby (~> 1.0) + i18n-tasks (0.9.28) + activesupport (>= 4.0.2) + ast (>= 2.1.0) + erubi + highline (>= 2.0.0) + i18n + parser (>= 2.2.3.0) + rails-i18n + rainbow (>= 2.2.2, < 4.0) + terminal-table (>= 1.5.1) idn-ruby (0.1.0) ipaddress (0.8.3) iso-639 (0.2.8) @@ -396,7 +389,7 @@ GEM parallel (1.12.1) parallel_tests (2.26.0) parallel - parser (2.5.1.2) + parser (2.5.3.0) ast (~> 2.4.0) pastel (0.7.2) equatable (~> 0.5.0) @@ -459,7 +452,7 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.0.4) loofah (~> 2.2, >= 2.2.2) - rails-i18n (5.1.1) + rails-i18n (5.1.2) i18n (>= 0.7, < 2) railties (>= 5.0, < 6) rails-settings-cached (0.6.6) @@ -699,7 +692,7 @@ DEPENDENCIES http_accept_language (~> 2.1) http_parser.rb (~> 0.6)! httplog (~> 1.1) - i18n-tasks (~> 0.9)! + i18n-tasks (~> 0.9) idn-ruby iso-639 json-ld (~> 2.2) -- cgit From 2cc099c70f92a9d845c64996b7ff14f90f55b9e1 Mon Sep 17 00:00:00 2001 From: trwnh Date: Tue, 30 Oct 2018 00:33:02 -0500 Subject: Make detailed-status__wrapper actually wrap detailed status (#8547) * Remove class from scrollable div .detailed-status__wrapper does not actually wrap the detailed status here * Re-add class to focusable div .detailed-status__wrapper now wraps the detailed status instead of the entire scrollable area --- app/javascript/mastodon/features/status/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/features/status/index.js b/app/javascript/mastodon/features/status/index.js index b36d82865..a092f7bb1 100644 --- a/app/javascript/mastodon/features/status/index.js +++ b/app/javascript/mastodon/features/status/index.js @@ -428,11 +428,11 @@ class Status extends ImmutablePureComponent { /> -
+
{ancestors} -
+
Date: Tue, 30 Oct 2018 06:39:52 +0100 Subject: Bump oj from 3.6.12 to 3.7.0 (#9155) Bumps [oj](https://github.com/ohler55/oj) from 3.6.12 to 3.7.0. - [Release notes](https://github.com/ohler55/oj/releases) - [Changelog](https://github.com/ohler55/oj/blob/master/CHANGELOG.md) - [Commits](https://github.com/ohler55/oj/compare/v3.6.12...v3.7.0) Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 1f9733530..bf23015e6 100644 --- a/Gemfile +++ b/Gemfile @@ -59,7 +59,7 @@ gem 'link_header', '~> 0.0' gem 'mime-types', '~> 3.2', require: 'mime/types/columnar' gem 'nokogiri', '~> 1.8' gem 'nsa', '~> 0.2' -gem 'oj', '~> 3.6' +gem 'oj', '~> 3.7' gem 'ostatus2', '~> 2.0' gem 'ox', '~> 2.10' gem 'posix-spawn', git: 'https://github.com/rtomayko/posix-spawn', ref: '58465d2e213991f8afb13b984854a49fcdcc980c' diff --git a/Gemfile.lock b/Gemfile.lock index aedfe6de8..82b5f9224 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -360,7 +360,7 @@ GEM concurrent-ruby (~> 1.0.0) sidekiq (>= 3.5.0) statsd-ruby (~> 1.2.0) - oj (3.6.12) + oj (3.7.0) omniauth (1.8.1) hashie (>= 3.4.6, < 3.6.0) rack (>= 1.6.2, < 3) @@ -709,7 +709,7 @@ DEPENDENCIES net-ldap (~> 0.10) nokogiri (~> 1.8) nsa (~> 0.2) - oj (~> 3.6) + oj (~> 3.7) omniauth (~> 1.2) omniauth-cas (~> 1.1) omniauth-saml (~> 1.10) -- cgit From e32a4f55fe2f0b066ae129c5ab26e7fad0086570 Mon Sep 17 00:00:00 2001 From: Masoud Abkenar Date: Tue, 30 Oct 2018 00:47:43 +0100 Subject: [Glitch] RTL: fix preferences page checkbox margins Port 5ee0b51ac8363da1687cc518e80eac53c23b048a to glitch-soc --- app/javascript/flavours/glitch/styles/rtl.scss | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/styles/rtl.scss b/app/javascript/flavours/glitch/styles/rtl.scss index d4618440d..c0079a286 100644 --- a/app/javascript/flavours/glitch/styles/rtl.scss +++ b/app/javascript/flavours/glitch/styles/rtl.scss @@ -210,12 +210,16 @@ body.rtl { margin-left: 5px; } - .simple_form .check_boxes .checkbox label, - .simple_form .input.with_label.boolean label.checkbox { + .simple_form .check_boxes .checkbox label { padding-left: 0; padding-right: 25px; } + .simple_form .input.with_label.boolean label.checkbox { + padding-left: 25px; + padding-right: 0; + } + .simple_form .check_boxes .checkbox input[type="checkbox"], .simple_form .input.boolean input[type="checkbox"] { left: auto; -- cgit From 3aa2418217edf77ccfd499064938896dce4c2bee Mon Sep 17 00:00:00 2001 From: Masoud Abkenar Date: Tue, 30 Oct 2018 00:49:29 +0100 Subject: [Glitch] RTL: fix toot privacy preferences radio buttonss Port e961a763a2cf722bd5f1311a2de706e28d6c33c6 to glitch-soc --- app/javascript/flavours/glitch/styles/rtl.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/javascript/flavours/glitch/styles/rtl.scss b/app/javascript/flavours/glitch/styles/rtl.scss index c0079a286..9e0a93ec2 100644 --- a/app/javascript/flavours/glitch/styles/rtl.scss +++ b/app/javascript/flavours/glitch/styles/rtl.scss @@ -385,4 +385,9 @@ body.rtl { padding-left: 0; padding-right: 10px; } + + .simple_form .input.radio_buttons .radio > label input { + left: auto; + right: 0; + } } -- cgit From 48be335f4f64c5513bb4b0d760225ceca78416c2 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 30 Oct 2018 12:46:05 +0100 Subject: Remove duplicate and outdated specs --- spec/services/notify_service_spec.rb | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/spec/services/notify_service_spec.rb b/spec/services/notify_service_spec.rb index 30214030e..7bfca7fb5 100644 --- a/spec/services/notify_service_spec.rb +++ b/spec/services/notify_service_spec.rb @@ -47,26 +47,6 @@ RSpec.describe NotifyService, type: :service do recipient.update(suspended: true) is_expected.to_not change(Notification, :count) end - - describe 'reblogs' do - let(:status) { Fabricate(:status, account: Fabricate(:account)) } - let(:activity) { Fabricate(:status, account: sender, reblog: status) } - - it 'shows reblogs by default' do - recipient.follow!(sender) - is_expected.to change(Notification, :count) - end - - it 'shows reblogs when explicitly enabled' do - recipient.follow!(sender, reblogs: true) - is_expected.to change(Notification, :count) - end - - it 'hides reblogs when disabled' do - recipient.follow!(sender, reblogs: false) - is_expected.to_not change(Notification, :count) - end - end context 'for direct messages' do let(:activity) { Fabricate(:mention, account: recipient, status: Fabricate(:status, account: sender, visibility: :direct)) } -- cgit From c1eec9869e62177cbeaa76db12682553cdeb168a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 30 Oct 2018 22:59:11 +0900 Subject: [Security] Bump loofah from 2.2.2 to 2.2.3 (#9160) Bumps [loofah](https://github.com/flavorjones/loofah) from 2.2.2 to 2.2.3. **This update includes security fixes.** - [Release notes](https://github.com/flavorjones/loofah/releases) - [Changelog](https://github.com/flavorjones/loofah/blob/master/CHANGELOG.md) - [Commits](https://github.com/flavorjones/loofah/compare/v2.2.2...v2.2.3) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 82b5f9224..91a2e8281 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -319,7 +319,7 @@ GEM activesupport (>= 4) railties (>= 4) request_store (~> 1.0) - loofah (2.2.2) + loofah (2.2.3) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.0) -- cgit From a03d5066265c9555ea2e42cf4bb06edc7439e50c Mon Sep 17 00:00:00 2001 From: ThibG Date: Tue, 30 Oct 2018 15:02:24 +0100 Subject: Fix Pleroma mentions being fetched as preview cards (#9158) --- app/services/fetch_link_card_service.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb index 462e5ee13..3e77579bb 100644 --- a/app/services/fetch_link_card_service.rb +++ b/app/services/fetch_link_card_service.rb @@ -17,8 +17,7 @@ class FetchLinkCardService < BaseService return if @url.nil? || @status.preview_cards.any? - @mentions = status.mentions - @url = @url.to_s + @url = @url.to_s RedisLock.acquire(lock_options) do |lock| if lock.acquired? @@ -84,9 +83,8 @@ class FetchLinkCardService < BaseService end def mention_link?(a) - return false if @mentions.nil? - @mentions.any? do |mention| - a['href'] == TagManager.instance.url_for(mention.target) + @status.mentions.any? do |mention| + a['href'] == TagManager.instance.url_for(mention.account) end end -- cgit From 47b8d195e6ea5bc5f3cd4fe3a5be0b25ec322f10 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 30 Oct 2018 15:02:55 +0100 Subject: Always let through notifications from staff (#9152) * Always let through notifications from staff Follow-up to #8993 * Let messages from staff through, but no other notifications --- app/services/notify_service.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/services/notify_service.rb b/app/services/notify_service.rb index a8b7bb30b..b80ceef03 100644 --- a/app/services/notify_service.rb +++ b/app/services/notify_service.rb @@ -51,8 +51,12 @@ class NotifyService < BaseService @recipient.user.settings.interactions['must_be_following'] && !following_sender? end + def message? + @notification.type == :mention + end + def direct_message? - @notification.type == :mention && @notification.target_status.direct_visibility? + message? && @notification.target_status.direct_visibility? end def response_to_recipient? @@ -66,7 +70,6 @@ class NotifyService < BaseService def optional_non_following_and_direct? direct_message? && @recipient.user.settings.interactions['must_be_following_dm'] && - !from_staff? && !following_sender? && !response_to_recipient? end @@ -86,6 +89,9 @@ class NotifyService < BaseService def blocked? blocked = @recipient.suspended? # Skip if the recipient account is suspended anyway blocked ||= from_self? # Skip for interactions with self + + return blocked if message? && from_staff? + blocked ||= domain_blocking? # Skip for domain blocked accounts blocked ||= @recipient.blocking?(@notification.from_account) # Skip for blocked accounts blocked ||= @recipient.muting_notifications?(@notification.from_account) -- cgit From be202f9377fecfc801befac0be6d11d9f0039c5d Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 30 Oct 2018 15:03:55 +0100 Subject: Accept the same payload in multiple inboxes and deliver (#9150) --- app/lib/activitypub/activity/create.rb | 20 +++++++++++++++++++- app/services/fan_out_on_write_service.rb | 6 ++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index baa05e14c..45079e2b3 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -10,7 +10,12 @@ class ActivityPub::Activity::Create < ActivityPub::Activity RedisLock.acquire(lock_options) do |lock| if lock.acquired? @status = find_existing_status - process_status if @status.nil? + + if @status.nil? + process_status + elsif @options[:delivered_to_account_id].present? + postprocess_audience_and_deliver + end else raise Mastodon::RaceConditionError end @@ -99,6 +104,19 @@ class ActivityPub::Activity::Create < ActivityPub::Activity @params[:visibility] = :limited end + def postprocess_audience_and_deliver + return if @status.mentions.find_by(account_id: @options[:delivered_to_account_id]) + + delivered_to_account = Account.find(@options[:delivered_to_account_id]) + + @status.mentions.create(account: delivered_to_account, silent: true) + @status.update(visibility: :limited) if @status.direct_visibility? + + return unless delivered_to_account.following?(@account) + + FeedInsertWorker.perform_async(@status.id, delivered_to_account.id, :home) + end + def attach_tags(status) @tags.each do |tag| status.tags << tag diff --git a/app/services/fan_out_on_write_service.rb b/app/services/fan_out_on_write_service.rb index 7f2a91775..f3e9c855d 100644 --- a/app/services/fan_out_on_write_service.rb +++ b/app/services/fan_out_on_write_service.rb @@ -58,10 +58,8 @@ class FanOutOnWriteService < BaseService def deliver_to_mentioned_followers(status) Rails.logger.debug "Delivering status #{status.id} to limited followers" - status.mentions.includes(:account).each do |mention| - mentioned_account = mention.account - next if !mentioned_account.local? || !mentioned_account.following?(status.account) || FeedManager.instance.filter?(:home, status, mention.account_id) - FeedManager.instance.push_to_home(mentioned_account, status) + FeedInsertWorker.push_bulk(status.mentions.includes(:account).map(&:account).select { |mentioned_account| mentioned_account.local? && mentioned_account.following?(status.account) }) do |follower| + [status.id, follower.id, :home] end end -- cgit From a3d40ba53b1154a8711d625a4ec6162b343a217d Mon Sep 17 00:00:00 2001 From: Quentí <33203663+Quenty31@users.noreply.github.com> Date: Tue, 30 Oct 2018 15:05:01 +0100 Subject: [i18n] Update for Occitan (#9157) * Update oc.json * Update devise.oc.yml * Update oc.yml * Update oc.json --- app/javascript/mastodon/locales/oc.json | 6 +++--- config/locales/devise.oc.yml | 4 ++-- config/locales/oc.yml | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/javascript/mastodon/locales/oc.json b/app/javascript/mastodon/locales/oc.json index 64ada60da..93ab4be7d 100644 --- a/app/javascript/mastodon/locales/oc.json +++ b/app/javascript/mastodon/locales/oc.json @@ -157,7 +157,7 @@ "keyboard_shortcuts.legend": "mostrar aquesta legenda", "keyboard_shortcuts.local": "per dobrir lo flux public local", "keyboard_shortcuts.mention": "mencionar l’autor", - "keyboard_shortcuts.muted": "per dorbir la lista dels utilizaires silenciats", + "keyboard_shortcuts.muted": "per dobrir la lista dels utilizaires silenciats", "keyboard_shortcuts.my_profile": "per dobrir vòstre perfil", "keyboard_shortcuts.notifications": "per dobrir la columna de notificacions", "keyboard_shortcuts.pinned": "per dobrir la lista dels tuts penjats", @@ -314,8 +314,8 @@ "status.show_more_all": "Los desplegar totes", "status.unmute_conversation": "Tornar mostrar la conversacion", "status.unpin": "Tirar del perfil", - "suggestions.dismiss": "Dismiss suggestion", - "suggestions.header": "You might be interested in…", + "suggestions.dismiss": "Regetar la suggestion", + "suggestions.header": "Aquò vos poiriá interessar…", "tabs_bar.federated_timeline": "Flux public global", "tabs_bar.home": "Acuèlh", "tabs_bar.local_timeline": "Flux public local", diff --git a/config/locales/devise.oc.yml b/config/locales/devise.oc.yml index beecbb426..16633e233 100644 --- a/config/locales/devise.oc.yml +++ b/config/locales/devise.oc.yml @@ -8,10 +8,10 @@ oc: failure: already_authenticated: Sètz ja connectat. inactive: Vòstre compte es pas encara activat. - invalid: "%{authentication_keys} invalid." + invalid: "%{authentication_keys} invalida." last_attempt: Vos demòra un ensag abans que vòstre compte siasque blocat. locked: Vòstre compte es blocat. - not_found_in_database: "%{authentication_keys} invalid." + not_found_in_database: "%{authentication_keys} invalida." timeout: Vòstra session a expirat. Mercés de vos tornar connectar per contunhar. unauthenticated: Vos cal vos connectar o marcar abans de contunhar. unconfirmed: Vos cal confirmar vòstra adreça de corrièl abans de contunhar. diff --git a/config/locales/oc.yml b/config/locales/oc.yml index 0fb4684b1..820f094ff 100644 --- a/config/locales/oc.yml +++ b/config/locales/oc.yml @@ -311,7 +311,7 @@ oc: description_html: Un relai de federacion es un servidor intermediari qu’escàmbia de bèls volumes de tuts publics entre servidors que son abonats e i publican.Pòt ajudar de pichons e mejans servidors a trobar de contenguts del fediverse estant, qu’autrament demandariá als utilizaires locals de s’abonar manualament a d’autres monde marcats sus de servidors alonhats. disable: Desactivar disabled: Desactivat - enable: Activat + enable: Activar enable_hint: Un còp activat, vòstre servidor s’abonarà a totes los tuts publics del relai estant, e començarà de mandar sos tuts publics a aqueste d’enlà. enabled: Activat inbox_url: URL del relai @@ -533,7 +533,7 @@ oc: formats: default: "%e/%m/%Y" long: Lo %e %B de %Y - short: "%e %b. de %Y" + short: "%e %B de %Y" month_names: - None - de genièr @@ -557,7 +557,7 @@ oc: about_x_hours: "%{count} h" about_x_months: "%{count} meses" about_x_years: "%{count} ans" - almost_x_years: "%{count}ans" + almost_x_years: "%{count} ans" half_a_minute: Ara less_than_x_minutes: "%{count} min" less_than_x_seconds: Ara meteis -- cgit From c36a4a16178441968715e13c77859b1eb813c2af Mon Sep 17 00:00:00 2001 From: valerauko Date: Tue, 30 Oct 2018 23:07:57 +0900 Subject: Fix FetchAtomService content type handling (#9132) * Add profile to json+ld in Accept It's required by the ActivityPub spec * Use headers['Content-type'] instead of mime_type mime_type strips the profile from the content type, but it's still available raw in the headers hash * Add test for ld+json with profile --- app/services/fetch_atom_service.rb | 10 ++++++---- spec/services/fetch_atom_service_spec.rb | 9 ++++++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/services/fetch_atom_service.rb b/app/services/fetch_atom_service.rb index 550e75f33..b6c6cdd1c 100644 --- a/app/services/fetch_atom_service.rb +++ b/app/services/fetch_atom_service.rb @@ -29,7 +29,7 @@ class FetchAtomService < BaseService def perform_request(&block) accept = 'text/html' - accept = 'application/activity+json, application/ld+json, application/atom+xml, ' + accept unless @unsupported_activity + accept = 'application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams", application/atom+xml, ' + accept unless @unsupported_activity Request.new(:get, @url).add_headers('Accept' => accept).perform(&block) end @@ -37,9 +37,11 @@ class FetchAtomService < BaseService def process_response(response, terminal = false) return nil if response.code != 200 - if response.mime_type == 'application/atom+xml' + response_type = response.headers['Content-type'] + + if response_type == 'application/atom+xml' [@url, { prefetched_body: response.body_with_limit }, :ostatus] - elsif ['application/activity+json', 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'].include?(response.mime_type) + elsif ['application/activity+json', 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'].include?(response_type) body = response.body_with_limit json = body_to_json(body) if supported_context?(json) && equals_or_includes_any?(json['type'], ActivityPub::FetchRemoteAccountService::SUPPORTED_TYPES) && json['inbox'].present? @@ -55,7 +57,7 @@ class FetchAtomService < BaseService if link_header&.find_link(%w(rel alternate)) process_link_headers(link_header) - elsif response.mime_type == 'text/html' + elsif response_type == 'text/html' process_html(response) end end diff --git a/spec/services/fetch_atom_service_spec.rb b/spec/services/fetch_atom_service_spec.rb index 30e5b0935..0cdcda892 100644 --- a/spec/services/fetch_atom_service_spec.rb +++ b/spec/services/fetch_atom_service_spec.rb @@ -60,13 +60,20 @@ RSpec.describe FetchAtomService, type: :service do it { is_expected.to eq [url, { :prefetched_body => "" }, :ostatus] } end - context 'content_type is json' do + context 'content_type is activity+json' do let(:content_type) { 'application/activity+json' } let(:body) { json } it { is_expected.to eq [1, { prefetched_body: body, id: true }, :activitypub] } end + context 'content_type is ld+json with profile' do + let(:content_type) { 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"' } + let(:body) { json } + + it { is_expected.to eq [1, { prefetched_body: body, id: true }, :activitypub] } + end + before do WebMock.stub_request(:get, url).to_return(status: 200, body: body, headers: headers) WebMock.stub_request(:get, 'http://example.com/foo').to_return(status: 200, body: json, headers: { 'Content-Type' => 'application/activity+json' }) -- cgit From 5c8e7f0e1d28a0f534d40386be4bd2046e3661d9 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 30 Oct 2018 16:25:54 +0100 Subject: Revert "feat(auth/session_controller): Send Clear-Site-Data when logging out (8627)" (#9161) This reverts commit 10680f93e7d6333d43aabc4c6f251a076120231c. --- app/controllers/auth/sessions_controller.rb | 9 --------- 1 file changed, 9 deletions(-) diff --git a/app/controllers/auth/sessions_controller.rb b/app/controllers/auth/sessions_controller.rb index 901e82331..fb8615c31 100644 --- a/app/controllers/auth/sessions_controller.rb +++ b/app/controllers/auth/sessions_controller.rb @@ -10,7 +10,6 @@ class Auth::SessionsController < Devise::SessionsController prepend_before_action :authenticate_with_two_factor, if: :two_factor_enabled?, only: [:create] before_action :set_instance_presenter, only: [:new] before_action :set_body_classes - after_action :clear_site_data, only: [:destroy] def new Devise.omniauth_configs.each do |provider, config| @@ -125,14 +124,6 @@ class Auth::SessionsController < Devise::SessionsController paths end - def clear_site_data - return if continue_after? - - # Should be '"*"' but that doesn't work in Chrome (neither does '"executionContexts"') - # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Clear-Site-Data - response.headers['Clear-Site-Data'] = '"cache", "cookies", "storage"' - end - def continue_after? truthy_param?(:continue) end -- cgit From cc45a8f9f7e05df57641bea19e1290570e76c172 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 30 Oct 2018 17:00:34 +0100 Subject: Fix td instead of th in sessions table header (#9162) Fix #9130 --- app/views/auth/registrations/_sessions.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/auth/registrations/_sessions.html.haml b/app/views/auth/registrations/_sessions.html.haml index 8586c0549..d7d96a1bb 100644 --- a/app/views/auth/registrations/_sessions.html.haml +++ b/app/views/auth/registrations/_sessions.html.haml @@ -8,7 +8,7 @@ %th= t 'sessions.browser' %th= t 'sessions.ip' %th= t 'sessions.activity' - %td + %th %tbody - @sessions.each do |session| %tr -- cgit From f59b840549d1b4dfd02ae4f52b64149ff8de0165 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 30 Oct 2018 17:06:12 +0100 Subject: Fix empty display name precedence over username in web UI (#9163) Fix #9131 --- app/javascript/mastodon/actions/importer/normalizer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/mastodon/actions/importer/normalizer.js b/app/javascript/mastodon/actions/importer/normalizer.js index a2af3222e..34a4150fa 100644 --- a/app/javascript/mastodon/actions/importer/normalizer.js +++ b/app/javascript/mastodon/actions/importer/normalizer.js @@ -14,7 +14,7 @@ export function normalizeAccount(account) { account = { ...account }; const emojiMap = makeEmojiMap(account); - const displayName = account.display_name.length === 0 ? account.username : account.display_name; + const displayName = account.display_name.trim().length === 0 ? account.username : account.display_name; account.display_name_html = emojify(escapeTextContentForBrowser(displayName), emojiMap); account.note_emojified = emojify(account.note, emojiMap); -- cgit From 66019b0ec4aaa584e58e91583425ed7c0d55c28e Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 30 Oct 2018 17:37:49 +0100 Subject: Bump version to 2.6.0rc4 (#9164) * Bump version to 2.6.0rc4 * Update CHANGELOG.md --- CHANGELOG.md | 13 +++++++++---- lib/mastodon/version.rb | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5443a358..3c6847e0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ All notable changes to this project will be documented in this file. - Add conversations API (#8832) - Add limit for the number of people that can be followed from one account (#8807) - Add admin setting to customize mascot (#8766) -- Add support for more granular ActivityPub audiences from other software, i.e. circles (#8950, #9093) +- Add support for more granular ActivityPub audiences from other software, i.e. circles (#8950, #9093, #9150) - Add option to block all reports from a domain (#8830) - Add user preference to always expand toots marked with content warnings (#8762) - Add user preference to always hide all media (#8569) @@ -30,7 +30,6 @@ All notable changes to this project will be documented in this file. - Add PostgreSQL disk space growth tracking in PGHero (#8906) - Add button for disabling local account to report quick actions bar (#9024) - Add Czech language (#8594) -- Add `Clear-Site-Data` header when logging out (#8627) - Add `same-site` (`lax`) attribute to cookies (#8626) - Add support for styled scrollbars in Firefox Nightly (#8653) - Add highlight to the active tab in web UI profiles (#8673) @@ -64,6 +63,9 @@ All notable changes to this project will be documented in this file. - Change recommended Ruby version to 2.5.3 (#9003) - Change docker-compose default to persist volumes in current directory (#9055) - Change character counters on edit profile page to input length limit (#9100) +- Change notification filtering to always let through messages from staff (#9152) +- Change "hide boosts from user" function also hiding notifications about boosts (#9147) +- Change CSS `detailed-status__wrapper` class actually wrap the detailed status (#8547) ### Deprecated @@ -89,18 +91,21 @@ All notable changes to this project will be documented in this file. - Fix some dark emojis not having a white outline (#8597) - Fix media description not being displayed in various media modals (#8678) - Fix generated URLs of desktop notifications missing base URL (#8758) -- Fix RTL styles (#8764, #8767, #8823, #8897, #9005, #9007, #9018, #9021) +- Fix RTL styles (#8764, #8767, #8823, #8897, #9005, #9007, #9018, #9021, #9145, #9146) - Fix crash in streaming API when tag param missing (#8955) - Fix hotkeys not working when no element is focused (#8998) - Fix some hotkeys not working on detailed status view (#9006) - Fix og:url on status pages (#9047) - Fix upload option buttons only being visible on hover (#9074) - Fix tootctl not returning exit code 1 on wrong arguments (#9094) -- Fix preview cards for appearing for profiles mentioned in toot (#6934) +- Fix preview cards for appearing for profiles mentioned in toot (#6934, #9158) - Fix local accounts sometimes being duplicated as faux-remote (#9109) - Fix emoji search when the shortcode has multiple separators (#9124) - Fix dropdowns sometimes being partially obscured by other elements (#9126) - Fix cache not updating when reply/boost/favourite counters or media sensitivity update (#9119) +- Fix empty display name precedence over username in web UI (#9163) +- Fix td instead of th in sessions table header (#9162) +- Fix handling of content types with profile (#9132) ## [2.5.2] - 2018-10-12 ### Security diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index 757d327bd..e4c5b9cbd 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -21,7 +21,7 @@ module Mastodon end def flags - 'rc3' + 'rc4' end def to_a -- cgit From ac9780b8449527a6a7ab5e2031eeb37f7f2291e7 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 29 Oct 2018 14:44:04 +0100 Subject: [Glitch] Include preview cards in status entity in REST API Port 795f0107d23c1c9bd039f6449fa1e094ab7653a7 to glitch-soc --- .../flavours/glitch/components/status.js | 10 ++++++++ .../glitch/features/status/components/card.js | 18 +++++++------- .../features/status/containers/card_container.js | 2 +- app/javascript/flavours/glitch/reducers/index.js | 2 -- .../flavours/glitch/reducers/statuses.js | 5 ++++ .../flavours/glitch/styles/components/status.scss | 28 ++++++++++++++++++++++ 6 files changed, 54 insertions(+), 11 deletions(-) diff --git a/app/javascript/flavours/glitch/components/status.js b/app/javascript/flavours/glitch/components/status.js index 449532ea4..3a22f165b 100644 --- a/app/javascript/flavours/glitch/components/status.js +++ b/app/javascript/flavours/glitch/components/status.js @@ -7,6 +7,7 @@ import StatusIcons from './status_icons'; import StatusContent from './status_content'; import StatusActionBar from './status_action_bar'; import AttachmentList from './attachment_list'; +import Card from '../features/status/components/card'; import { injectIntl, FormattedMessage } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { MediaGallery, Video } from 'flavours/glitch/util/async-components'; @@ -477,6 +478,15 @@ export default class Status extends ImmutablePureComponent { if (!status.get('sensitive') && !(status.get('spoiler_text').length > 0) && settings.getIn(['collapsed', 'backgrounds', 'preview_images'])) { background = attachments.getIn([0, 'preview_url']); } + } else if (status.get('card')) { + media = ( + + ); + //TODO: set mediaIcon? } // Here we prepare extra data-* attributes for CSS selectors. diff --git a/app/javascript/flavours/glitch/features/status/components/card.js b/app/javascript/flavours/glitch/features/status/components/card.js index b52f3c4fa..9a87f7a3f 100644 --- a/app/javascript/flavours/glitch/features/status/components/card.js +++ b/app/javascript/flavours/glitch/features/status/components/card.js @@ -59,10 +59,12 @@ export default class Card extends React.PureComponent { card: ImmutablePropTypes.map, maxDescription: PropTypes.number, onOpenMedia: PropTypes.func.isRequired, + compact: PropTypes.boolean, }; static defaultProps = { maxDescription: 50, + compact: false, }; state = { @@ -131,25 +133,25 @@ export default class Card extends React.PureComponent { } render () { - const { card, maxDescription } = this.props; - const { width, embedded } = this.state; + const { card, maxDescription, compact } = this.props; + const { width, embedded } = this.state; if (card === null) { return null; } const provider = card.get('provider_name').length === 0 ? decodeIDNA(getHostname(card.get('url'))) : card.get('provider_name'); - const horizontal = card.get('width') > card.get('height') && (card.get('width') + 100 >= width) || card.get('type') !== 'link'; - const className = classnames('status-card', { horizontal }); + const horizontal = (!compact && card.get('width') > card.get('height') && (card.get('width') + 100 >= width)) || card.get('type') !== 'link' || embedded; const interactive = card.get('type') !== 'link'; + const className = classnames('status-card', { horizontal, compact, interactive }); const title = interactive ? {card.get('title')} : {card.get('title')}; - const ratio = card.get('width') / card.get('height'); + const ratio = compact ? 16 / 9 : card.get('width') / card.get('height'); const height = card.get('width') > card.get('height') ? (width / ratio) : (width * ratio); const description = (
{title} - {!horizontal &&

{trim(card.get('description') || '', maxDescription)}

} + {!(horizontal || compact) &&

{trim(card.get('description') || '', maxDescription)}

} {provider}
); @@ -174,7 +176,7 @@ export default class Card extends React.PureComponent {
- + {horizontal && }
@@ -184,7 +186,7 @@ export default class Card extends React.PureComponent { return (
{embed} - {description} + {!compact && description}
); } else if (card.get('image')) { diff --git a/app/javascript/flavours/glitch/features/status/containers/card_container.js b/app/javascript/flavours/glitch/features/status/containers/card_container.js index a97404de1..6170d9fd8 100644 --- a/app/javascript/flavours/glitch/features/status/containers/card_container.js +++ b/app/javascript/flavours/glitch/features/status/containers/card_container.js @@ -2,7 +2,7 @@ import { connect } from 'react-redux'; import Card from '../components/card'; const mapStateToProps = (state, { statusId }) => ({ - card: state.getIn(['cards', statusId], null), + card: state.getIn(['statuses', statusId, 'card'], null), }); export default connect(mapStateToProps)(Card); diff --git a/app/javascript/flavours/glitch/reducers/index.js b/app/javascript/flavours/glitch/reducers/index.js index 218a5ac8f..ae9e2b639 100644 --- a/app/javascript/flavours/glitch/reducers/index.js +++ b/app/javascript/flavours/glitch/reducers/index.js @@ -15,7 +15,6 @@ import settings from './settings'; import local_settings from './local_settings'; import push_notifications from './push_notifications'; import status_lists from './status_lists'; -import cards from './cards'; import mutes from './mutes'; import reports from './reports'; import contexts from './contexts'; @@ -47,7 +46,6 @@ const reducers = { settings, local_settings, push_notifications, - cards, mutes, reports, contexts, diff --git a/app/javascript/flavours/glitch/reducers/statuses.js b/app/javascript/flavours/glitch/reducers/statuses.js index 617d96e5d..4c6387461 100644 --- a/app/javascript/flavours/glitch/reducers/statuses.js +++ b/app/javascript/flavours/glitch/reducers/statuses.js @@ -23,6 +23,9 @@ import { STATUS_MUTE_SUCCESS, STATUS_UNMUTE_SUCCESS, } from 'flavours/glitch/actions/statuses'; +import { + STATUS_CARD_FETCH_SUCCESS +} from 'flavours/glitch/actions/cards'; import { TIMELINE_UPDATE, TIMELINE_DELETE, @@ -143,6 +146,8 @@ export default function statuses(state = initialState, action) { return normalizeStatuses(state, action.statuses); case TIMELINE_DELETE: return deleteStatus(state, action.id, action.references); + case STATUS_CARD_FETCH_SUCCESS: + return state.setIn([action.id, 'card'], fromJS(action.card)); default: return state; } diff --git a/app/javascript/flavours/glitch/styles/components/status.scss b/app/javascript/flavours/glitch/styles/components/status.scss index aa49aba55..38ead06cf 100644 --- a/app/javascript/flavours/glitch/styles/components/status.scss +++ b/app/javascript/flavours/glitch/styles/components/status.scss @@ -731,6 +731,9 @@ a.status-card { display: block; margin-top: 5px; font-size: 13px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .status-card__image { @@ -755,6 +758,31 @@ a.status-card { } } +.status-card.compact { + border-color: lighten($ui-base-color, 4%); + + &.interactive { + border: 0; + } + + .status-card__content { + padding: 8px; + padding-top: 10px; + } + + .status-card__title { + white-space: nowrap; + } + + .status-card__image { + flex: 0 0 60px; + } +} + +a.status-card.compact:hover { + background-color: lighten($ui-base-color, 4%); +} + .status-card__image-image { border-radius: 4px 0 0 4px; display: block; -- cgit From b21615e9579a6f33ed1cdf6fc37fc8a1ff24a0d5 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 29 Oct 2018 14:56:53 +0100 Subject: [Glitch] Fix dimensions of preview cards, fix crash in web UI, fix warning Port 9c38c5daa3d7298f02c763a84a74680dcc89dac2 to glitch-soc --- app/javascript/flavours/glitch/actions/cards.js | 52 ---------------------- app/javascript/flavours/glitch/actions/statuses.js | 2 - .../glitch/features/status/components/card.js | 8 ++-- .../features/status/components/detailed_status.js | 4 +- .../features/status/containers/card_container.js | 8 ---- app/javascript/flavours/glitch/reducers/cards.js | 14 ------ .../flavours/glitch/reducers/statuses.js | 5 --- 7 files changed, 6 insertions(+), 87 deletions(-) delete mode 100644 app/javascript/flavours/glitch/actions/cards.js delete mode 100644 app/javascript/flavours/glitch/features/status/containers/card_container.js delete mode 100644 app/javascript/flavours/glitch/reducers/cards.js diff --git a/app/javascript/flavours/glitch/actions/cards.js b/app/javascript/flavours/glitch/actions/cards.js deleted file mode 100644 index c897daf58..000000000 --- a/app/javascript/flavours/glitch/actions/cards.js +++ /dev/null @@ -1,52 +0,0 @@ -import api from 'flavours/glitch/util/api'; - -export const STATUS_CARD_FETCH_REQUEST = 'STATUS_CARD_FETCH_REQUEST'; -export const STATUS_CARD_FETCH_SUCCESS = 'STATUS_CARD_FETCH_SUCCESS'; -export const STATUS_CARD_FETCH_FAIL = 'STATUS_CARD_FETCH_FAIL'; - -export function fetchStatusCard(id) { - return (dispatch, getState) => { - if (getState().getIn(['cards', id], null) !== null) { - return; - } - - dispatch(fetchStatusCardRequest(id)); - - api(getState).get(`/api/v1/statuses/${id}/card`).then(response => { - if (!response.data.url) { - return; - } - - dispatch(fetchStatusCardSuccess(id, response.data)); - }).catch(error => { - dispatch(fetchStatusCardFail(id, error)); - }); - }; -}; - -export function fetchStatusCardRequest(id) { - return { - type: STATUS_CARD_FETCH_REQUEST, - id, - skipLoading: true, - }; -}; - -export function fetchStatusCardSuccess(id, card) { - return { - type: STATUS_CARD_FETCH_SUCCESS, - id, - card, - skipLoading: true, - }; -}; - -export function fetchStatusCardFail(id, error) { - return { - type: STATUS_CARD_FETCH_FAIL, - id, - error, - skipLoading: true, - skipAlert: true, - }; -}; diff --git a/app/javascript/flavours/glitch/actions/statuses.js b/app/javascript/flavours/glitch/actions/statuses.js index fa8845002..6183f3c03 100644 --- a/app/javascript/flavours/glitch/actions/statuses.js +++ b/app/javascript/flavours/glitch/actions/statuses.js @@ -1,7 +1,6 @@ import api from 'flavours/glitch/util/api'; import { deleteFromTimelines } from './timelines'; -import { fetchStatusCard } from './cards'; export const STATUS_FETCH_REQUEST = 'STATUS_FETCH_REQUEST'; export const STATUS_FETCH_SUCCESS = 'STATUS_FETCH_SUCCESS'; @@ -38,7 +37,6 @@ export function fetchStatus(id) { const skipLoading = getState().getIn(['statuses', id], null) !== null; dispatch(fetchContext(id)); - dispatch(fetchStatusCard(id)); if (skipLoading) { return; diff --git a/app/javascript/flavours/glitch/features/status/components/card.js b/app/javascript/flavours/glitch/features/status/components/card.js index 9a87f7a3f..743fe779a 100644 --- a/app/javascript/flavours/glitch/features/status/components/card.js +++ b/app/javascript/flavours/glitch/features/status/components/card.js @@ -59,7 +59,7 @@ export default class Card extends React.PureComponent { card: ImmutablePropTypes.map, maxDescription: PropTypes.number, onOpenMedia: PropTypes.func.isRequired, - compact: PropTypes.boolean, + compact: PropTypes.bool, }; static defaultProps = { @@ -120,7 +120,7 @@ export default class Card extends React.PureComponent { const content = { __html: addAutoPlay(card.get('html')) }; const { width } = this.state; const ratio = card.get('width') / card.get('height'); - const height = card.get('width') > card.get('height') ? (width / ratio) : (width * ratio); + const height = width / ratio; return (
{card.get('title')} : {card.get('title')}; - const ratio = compact ? 16 / 9 : card.get('width') / card.get('height'); - const height = card.get('width') > card.get('height') ? (width / ratio) : (width * ratio); + const ratio = card.get('width') / card.get('height'); + const height = (compact && !embedded) ? (width / (16 / 9)) : (width / ratio); const description = (
diff --git a/app/javascript/flavours/glitch/features/status/components/detailed_status.js b/app/javascript/flavours/glitch/features/status/components/detailed_status.js index 2e61e6d8c..1fe0c069d 100644 --- a/app/javascript/flavours/glitch/features/status/components/detailed_status.js +++ b/app/javascript/flavours/glitch/features/status/components/detailed_status.js @@ -8,7 +8,7 @@ import MediaGallery from 'flavours/glitch/components/media_gallery'; import AttachmentList from 'flavours/glitch/components/attachment_list'; import { Link } from 'react-router-dom'; import { FormattedDate, FormattedNumber } from 'react-intl'; -import CardContainer from '../containers/card_container'; +import Card from './card'; import ImmutablePureComponent from 'react-immutable-pure-component'; import Video from 'flavours/glitch/features/video'; import VisibilityIcon from 'flavours/glitch/components/status_visibility_icon'; @@ -83,7 +83,7 @@ export default class DetailedStatus extends ImmutablePureComponent { ); mediaIcon = 'picture-o'; } - } else media = ; + } else media = ; if (status.get('application')) { applicationLink = · {status.getIn(['application', 'name'])}; diff --git a/app/javascript/flavours/glitch/features/status/containers/card_container.js b/app/javascript/flavours/glitch/features/status/containers/card_container.js deleted file mode 100644 index 6170d9fd8..000000000 --- a/app/javascript/flavours/glitch/features/status/containers/card_container.js +++ /dev/null @@ -1,8 +0,0 @@ -import { connect } from 'react-redux'; -import Card from '../components/card'; - -const mapStateToProps = (state, { statusId }) => ({ - card: state.getIn(['statuses', statusId, 'card'], null), -}); - -export default connect(mapStateToProps)(Card); diff --git a/app/javascript/flavours/glitch/reducers/cards.js b/app/javascript/flavours/glitch/reducers/cards.js deleted file mode 100644 index 92ecfd086..000000000 --- a/app/javascript/flavours/glitch/reducers/cards.js +++ /dev/null @@ -1,14 +0,0 @@ -import { STATUS_CARD_FETCH_SUCCESS } from 'flavours/glitch/actions/cards'; - -import { Map as ImmutableMap, fromJS } from 'immutable'; - -const initialState = ImmutableMap(); - -export default function cards(state = initialState, action) { - switch(action.type) { - case STATUS_CARD_FETCH_SUCCESS: - return state.set(action.id, fromJS(action.card)); - default: - return state; - } -}; diff --git a/app/javascript/flavours/glitch/reducers/statuses.js b/app/javascript/flavours/glitch/reducers/statuses.js index 4c6387461..617d96e5d 100644 --- a/app/javascript/flavours/glitch/reducers/statuses.js +++ b/app/javascript/flavours/glitch/reducers/statuses.js @@ -23,9 +23,6 @@ import { STATUS_MUTE_SUCCESS, STATUS_UNMUTE_SUCCESS, } from 'flavours/glitch/actions/statuses'; -import { - STATUS_CARD_FETCH_SUCCESS -} from 'flavours/glitch/actions/cards'; import { TIMELINE_UPDATE, TIMELINE_DELETE, @@ -146,8 +143,6 @@ export default function statuses(state = initialState, action) { return normalizeStatuses(state, action.statuses); case TIMELINE_DELETE: return deleteStatus(state, action.id, action.references); - case STATUS_CARD_FETCH_SUCCESS: - return state.setIn([action.id, 'card'], fromJS(action.card)); default: return state; } -- cgit From bdc23388334f9d683d3829c5880cc6064cc994d0 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 30 Oct 2018 14:39:00 +0100 Subject: Add a “link” status icon for toots with a preview card MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/flavours/glitch/components/status.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/components/status.js b/app/javascript/flavours/glitch/components/status.js index 3a22f165b..0c82ea7c6 100644 --- a/app/javascript/flavours/glitch/components/status.js +++ b/app/javascript/flavours/glitch/components/status.js @@ -486,7 +486,7 @@ export default class Status extends ImmutablePureComponent { compact /> ); - //TODO: set mediaIcon? + mediaIcon = 'link'; } // Here we prepare extra data-* attributes for CSS selectors. -- cgit From 7e18e95716052d5566f2e31559cbe4a68268f493 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 30 Oct 2018 14:46:48 +0100 Subject: Add a local setting for inline preview cards --- app/javascript/flavours/glitch/components/status.js | 2 +- .../flavours/glitch/features/local_settings/page/index.js | 8 ++++++++ app/javascript/flavours/glitch/reducers/local_settings.js | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/components/status.js b/app/javascript/flavours/glitch/components/status.js index 0c82ea7c6..9ff53485e 100644 --- a/app/javascript/flavours/glitch/components/status.js +++ b/app/javascript/flavours/glitch/components/status.js @@ -478,7 +478,7 @@ export default class Status extends ImmutablePureComponent { if (!status.get('sensitive') && !(status.get('spoiler_text').length > 0) && settings.getIn(['collapsed', 'backgrounds', 'preview_images'])) { background = attachments.getIn([0, 'preview_url']); } - } else if (status.get('card')) { + } else if (status.get('card') && settings.get('inline_preview_cards')) { media = ( + + +
), ]; diff --git a/app/javascript/flavours/glitch/reducers/local_settings.js b/app/javascript/flavours/glitch/reducers/local_settings.js index 19233a963..bf42810e9 100644 --- a/app/javascript/flavours/glitch/reducers/local_settings.js +++ b/app/javascript/flavours/glitch/reducers/local_settings.js @@ -15,6 +15,7 @@ const initialState = ImmutableMap({ always_show_spoilers_field: false, confirm_missing_media_description: false, preselect_on_reply: true, + inline_preview_cards: true, content_warnings : ImmutableMap({ auto_unfold : false, filter : null, -- cgit From 0d6b8f36aaee9c8c68c64ce4a63bcc66c6faf78d Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 30 Oct 2018 17:54:50 +0100 Subject: [Glitch] Fix empty display name precedence over username in web UI Port f59b840549d1b4dfd02ae4f52b64149ff8de0165 to glitch-soc --- app/javascript/flavours/glitch/reducers/accounts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/reducers/accounts.js b/app/javascript/flavours/glitch/reducers/accounts.js index c2f016a87..860c13534 100644 --- a/app/javascript/flavours/glitch/reducers/accounts.js +++ b/app/javascript/flavours/glitch/reducers/accounts.js @@ -72,7 +72,7 @@ const normalizeAccount = (state, account) => { delete account.statuses_count; const emojiMap = makeEmojiMap(account); - const displayName = account.display_name.length === 0 ? account.username : account.display_name; + const displayName = account.display_name.trim().length === 0 ? account.username : account.display_name; account.display_name_html = emojify(escapeTextContentForBrowser(displayName), emojiMap); account.note_emojified = emojify(account.note, emojiMap); -- cgit From 7800e1af7eb3c2203655298d8b3079eeff085111 Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Wed, 31 Oct 2018 03:46:20 +0900 Subject: Specify node version to not use node11 (#9166) uWS has no support node11 yet. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8320a76fb..7b162e576 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "mastodon", "license": "AGPL-3.0-or-later", "engines": { - "node": ">=8" + "node": ">=8 <11" }, "scripts": { "postversion": "git push --tags", -- cgit From f2290e311b155f27b721508cec58e08f304507f2 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 30 Oct 2018 21:09:33 +0100 Subject: Remove progress estimate from MigrateAccountConversations (#9168) --- ...20181024224956_migrate_account_conversations.rb | 30 +++++----------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/db/migrate/20181024224956_migrate_account_conversations.rb b/db/migrate/20181024224956_migrate_account_conversations.rb index 47f7375ba..b718f9e1d 100644 --- a/db/migrate/20181024224956_migrate_account_conversations.rb +++ b/db/migrate/20181024224956_migrate_account_conversations.rb @@ -14,17 +14,15 @@ class MigrateAccountConversations < ActiveRecord::Migration[5.2] sleep 1 end - total = estimate_rows(local_direct_statuses) + estimate_rows(notifications_about_direct_statuses) - migrated = 0 - started_time = Time.zone.now - last_time = Time.zone.now + migrated = 0 + last_time = Time.zone.now local_direct_statuses.includes(:account, mentions: :account).find_each do |status| AccountConversation.add_status(status.account, status) migrated += 1 if Time.zone.now - last_time > 1 - say_progress(migrated, total, started_time) + say_progress(migrated) last_time = Time.zone.now end end @@ -34,7 +32,7 @@ class MigrateAccountConversations < ActiveRecord::Migration[5.2] migrated += 1 if Time.zone.now - last_time > 1 - say_progress(migrated, total, started_time) + say_progress(migrated) last_time = Time.zone.now end end @@ -45,24 +43,8 @@ class MigrateAccountConversations < ActiveRecord::Migration[5.2] private - def estimate_rows(query) - result = exec_query("EXPLAIN #{query.to_sql}").first - result['QUERY PLAN'].scan(/ rows=([\d]+)/).first&.first&.to_i || 0 - end - - def say_progress(migrated, total, started_time) - status = "Migrated #{migrated} rows" - - percentage = 100.0 * migrated / total - status += " (~#{sprintf('%.2f', percentage)}%, " - - remaining_time = (100.0 - percentage) * (Time.zone.now - started_time) / percentage - - status += "#{(remaining_time / 60).to_i}:" - status += sprintf('%02d', remaining_time.to_i % 60) - status += ' remaining)' - - say status, true + def say_progress(migrated) + say "Migrated #{migrated} rows", true end def local_direct_statuses -- cgit From 804586172ed726dbfaa213365dd309c4d7fd55d9 Mon Sep 17 00:00:00 2001 From: Quentí <33203663+Quenty31@users.noreply.github.com> Date: Tue, 30 Oct 2018 22:06:31 +0100 Subject: [i18n] Update for Occitan (#9169) * Update oc.json * Update oc.yml * Update simple_form.oc.yml * Update simple_form.oc.yml * Update oc.json --- app/javascript/mastodon/locales/oc.json | 14 +++++++------- config/locales/oc.yml | 6 +++--- config/locales/simple_form.oc.yml | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/javascript/mastodon/locales/oc.json b/app/javascript/mastodon/locales/oc.json index 93ab4be7d..5df64e192 100644 --- a/app/javascript/mastodon/locales/oc.json +++ b/app/javascript/mastodon/locales/oc.json @@ -90,9 +90,9 @@ "confirmations.mute.confirm": "Rescondre", "confirmations.mute.message": "Volètz vertadièrament rescondre {name} ?", "confirmations.redraft.confirm": "Escafar & tornar formular", - "confirmations.redraft.message": "Volètz vertadièrament escafar aqueste estatut e lo reformular ? Tote sos partiments e favorits seràn perduts, e sas responsas seràn orfanèlas.", + "confirmations.redraft.message": "Volètz vertadièrament escafar aqueste estatut e lo reformular ? Totes sos partiments e favorits seràn perduts, e sas responsas seràn orfanèlas.", "confirmations.reply.confirm": "Respondre", - "confirmations.reply.message": "Respondre remplaçarà lo messatge que sètz a escriure. Volètz vertadièrament contunhar ?", + "confirmations.reply.message": "Respondre remplaçarà lo messatge que sètz a escriure. Volètz vertadièrament contunhar ?", "confirmations.unfollow.confirm": "Quitar de sègre", "confirmations.unfollow.message": "Volètz vertadièrament quitar de sègre {name} ?", "embed.instructions": "Embarcar aqueste estatut per lo far veire sus un site Internet en copiar lo còdi çai-jos.", @@ -115,8 +115,8 @@ "empty_column.community": "Lo flux public local es void. Escrivètz quicòm per lo garnir !", "empty_column.direct": "Avètz pas encara cap de messatges. Quand ne mandatz un o que ne recebètz un, serà mostrat aquí.", "empty_column.domain_blocks": "I a pas encara cap de domeni amagat.", - "empty_column.favourited_statuses": "Avètz pas encara cap de tut favorit. Quanda n’auretz un, apareisserà aquí.", - "empty_column.favourites": "Degun a pas encara mes en favorit aqueste tut. Quanda qualqu’un o farà, apareisserà aquí.", + "empty_column.favourited_statuses": "Avètz pas encara cap de tut favorit. Quand n’auretz un, apareisserà aquí.", + "empty_column.favourites": "Degun a pas encara mes en favorit aqueste tut. Quand qualqu’un o farà, apareisserà aquí.", "empty_column.follow_requests": "Avètz pas encara de demanda d’abonament. Quand n’auretz una apareisserà aquí.", "empty_column.hashtag": "I a pas encara de contengut ligat a aquesta etiqueta.", "empty_column.home": "Vòstre flux d’acuèlh es void. Visitatz {public} o utilizatz la recèrca per vos connectar a d’autras personas.", @@ -129,7 +129,7 @@ "follow_request.authorize": "Acceptar", "follow_request.reject": "Regetar", "getting_started.developers": "Desvelopaires", - "getting_started.documentation": "Documentation", + "getting_started.documentation": "Documentacion", "getting_started.find_friends": "Trobar d’amics de Twitter", "getting_started.heading": "Per començar", "getting_started.invite": "Convidar de monde", @@ -145,7 +145,7 @@ "keyboard_shortcuts.column": "centrar un estatut a una colomna", "keyboard_shortcuts.compose": "anar al camp tèxte", "keyboard_shortcuts.description": "Descripcion", - "keyboard_shortcuts.direct": "per dobrir la columna de messatges dirèctes", + "keyboard_shortcuts.direct": "per dobrir la colomna de messatges dirèctes", "keyboard_shortcuts.down": "far davalar dins la lista", "keyboard_shortcuts.enter": "dobrir los estatuts", "keyboard_shortcuts.favourite": "apondre als favorits", @@ -159,7 +159,7 @@ "keyboard_shortcuts.mention": "mencionar l’autor", "keyboard_shortcuts.muted": "per dobrir la lista dels utilizaires silenciats", "keyboard_shortcuts.my_profile": "per dobrir vòstre perfil", - "keyboard_shortcuts.notifications": "per dobrir la columna de notificacions", + "keyboard_shortcuts.notifications": "per dobrir la colomna de notificacions", "keyboard_shortcuts.pinned": "per dobrir la lista dels tuts penjats", "keyboard_shortcuts.profile": "per dobrir lo perfil de l’autor", "keyboard_shortcuts.reply": "respondre", diff --git a/config/locales/oc.yml b/config/locales/oc.yml index 820f094ff..428bbfffe 100644 --- a/config/locales/oc.yml +++ b/config/locales/oc.yml @@ -139,7 +139,7 @@ oc: resend_confirmation: already_confirmed: Aqueste utilizaire es ja confirmat send: Tornar mandar lo corrièl de confirmacion - success: Corrièl de confirmacion corrèctament mandat ! + success: Corrièl de confirmacion corrèctament mandat ! reset: Reïnicializar reset_password: Reïnicializar lo senhal resubscribe: Se tornar abonar @@ -438,11 +438,11 @@ oc: title: WebSub topic: Subjècte suspensions: - bad_acct_msg: La valor de confirmacion a pas coïncidit. Sètz a suspendre lo bon compte ? + bad_acct_msg: La valor de confirmacion a pas coïncidit. Sètz a suspendre lo bon compte ? hint_html: 'Per confirmar la suspension del compte, picatz %{value} al camp çai-jos :' proceed: Tractat title: Suspension de %{acct} - warning_html: 'Suspendre aqueste compte suprimirà irreversiblament las donadas del compte, aquò compren :' + warning_html: 'Suspendre aqueste compte suprimirà irreversiblament las donadas del compte, aquò compren :' title: Administracion admin_mailer: new_report: diff --git a/config/locales/simple_form.oc.yml b/config/locales/simple_form.oc.yml index c7cc2b471..bb9e3529c 100644 --- a/config/locales/simple_form.oc.yml +++ b/config/locales/simple_form.oc.yml @@ -30,7 +30,7 @@ oc: imports: data: Fichièr CSV exportat d’una autra instància Mastodon sessions: - otp: 'Picatz lo còdi d’autentificacion en dos temps (Two factor code) de vòstra aplicacion mobil o utilizatz un de vòstres còdis de recuperacion :' + otp: 'Picatz lo còdi d’autentificacion en dos temps (Two factor code) de vòstra aplicacion mobil o utilizatz un de vòstres còdis de recuperacion :' user: chosen_languages: Quand seleccionadas, solament los tuts dins las lengas triadas seràn mostrats dins vòstre flux d’actualitat labels: -- cgit From 50ce347ef96690767b21ee01d6a785166c583b6b Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 30 Oct 2018 22:06:59 +0100 Subject: Bump version to 2.6.0 (#9149) * Bump version to 2.6.0 * Update CHANGELOG.md --- CHANGELOG.md | 18 +++++++++--------- lib/mastodon/version.rb | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c6847e0b..6a7502656 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ Changelog All notable changes to this project will be documented in this file. -## [Unreleased] +## [2.6.0] - 2018-10-30 ### Added - Add link ownership verification (#8703) @@ -46,7 +46,7 @@ All notable changes to this project will be documented in this file. - Add CORS header to `/.well-known/*` routes (#9083) - Add `card` attribute to statuses returned from REST API (#9120) - Add in-stream link preview (#9120) -- Add support for ActivityPub `Page` objects (#9121) +- Add support for ActivityPub `Page` objects (#9121) ### Changed @@ -63,7 +63,7 @@ All notable changes to this project will be documented in this file. - Change recommended Ruby version to 2.5.3 (#9003) - Change docker-compose default to persist volumes in current directory (#9055) - Change character counters on edit profile page to input length limit (#9100) -- Change notification filtering to always let through messages from staff (#9152) +- Change notification filtering to always let through messages from staff (#9152) - Change "hide boosts from user" function also hiding notifications about boosts (#9147) - Change CSS `detailed-status__wrapper` class actually wrap the detailed status (#8547) @@ -97,15 +97,15 @@ All notable changes to this project will be documented in this file. - Fix some hotkeys not working on detailed status view (#9006) - Fix og:url on status pages (#9047) - Fix upload option buttons only being visible on hover (#9074) -- Fix tootctl not returning exit code 1 on wrong arguments (#9094) -- Fix preview cards for appearing for profiles mentioned in toot (#6934, #9158) +- Fix tootctl not returning exit code 1 on wrong arguments (#9094) +- Fix preview cards for appearing for profiles mentioned in toot (#6934, #9158) - Fix local accounts sometimes being duplicated as faux-remote (#9109) - Fix emoji search when the shortcode has multiple separators (#9124) -- Fix dropdowns sometimes being partially obscured by other elements (#9126) -- Fix cache not updating when reply/boost/favourite counters or media sensitivity update (#9119) -- Fix empty display name precedence over username in web UI (#9163) +- Fix dropdowns sometimes being partially obscured by other elements (#9126) +- Fix cache not updating when reply/boost/favourite counters or media sensitivity update (#9119) +- Fix empty display name precedence over username in web UI (#9163) - Fix td instead of th in sessions table header (#9162) -- Fix handling of content types with profile (#9132) +- Fix handling of content types with profile (#9132) ## [2.5.2] - 2018-10-12 ### Security diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index e4c5b9cbd..7cc837345 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -21,7 +21,7 @@ module Mastodon end def flags - 'rc4' + '' end def to_a -- cgit From ce2ee68b64c2ba2baa10378027efd0aadbe98598 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 31 Oct 2018 00:43:34 +0100 Subject: Revert "Fix FetchAtomService content type handling (#9132)" (#9171) This reverts commit c36a4a16178441968715e13c77859b1eb813c2af. --- app/services/fetch_atom_service.rb | 10 ++++------ spec/services/fetch_atom_service_spec.rb | 9 +-------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/app/services/fetch_atom_service.rb b/app/services/fetch_atom_service.rb index b6c6cdd1c..550e75f33 100644 --- a/app/services/fetch_atom_service.rb +++ b/app/services/fetch_atom_service.rb @@ -29,7 +29,7 @@ class FetchAtomService < BaseService def perform_request(&block) accept = 'text/html' - accept = 'application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams", application/atom+xml, ' + accept unless @unsupported_activity + accept = 'application/activity+json, application/ld+json, application/atom+xml, ' + accept unless @unsupported_activity Request.new(:get, @url).add_headers('Accept' => accept).perform(&block) end @@ -37,11 +37,9 @@ class FetchAtomService < BaseService def process_response(response, terminal = false) return nil if response.code != 200 - response_type = response.headers['Content-type'] - - if response_type == 'application/atom+xml' + if response.mime_type == 'application/atom+xml' [@url, { prefetched_body: response.body_with_limit }, :ostatus] - elsif ['application/activity+json', 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'].include?(response_type) + elsif ['application/activity+json', 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'].include?(response.mime_type) body = response.body_with_limit json = body_to_json(body) if supported_context?(json) && equals_or_includes_any?(json['type'], ActivityPub::FetchRemoteAccountService::SUPPORTED_TYPES) && json['inbox'].present? @@ -57,7 +55,7 @@ class FetchAtomService < BaseService if link_header&.find_link(%w(rel alternate)) process_link_headers(link_header) - elsif response_type == 'text/html' + elsif response.mime_type == 'text/html' process_html(response) end end diff --git a/spec/services/fetch_atom_service_spec.rb b/spec/services/fetch_atom_service_spec.rb index 0cdcda892..30e5b0935 100644 --- a/spec/services/fetch_atom_service_spec.rb +++ b/spec/services/fetch_atom_service_spec.rb @@ -60,20 +60,13 @@ RSpec.describe FetchAtomService, type: :service do it { is_expected.to eq [url, { :prefetched_body => "" }, :ostatus] } end - context 'content_type is activity+json' do + context 'content_type is json' do let(:content_type) { 'application/activity+json' } let(:body) { json } it { is_expected.to eq [1, { prefetched_body: body, id: true }, :activitypub] } end - context 'content_type is ld+json with profile' do - let(:content_type) { 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"' } - let(:body) { json } - - it { is_expected.to eq [1, { prefetched_body: body, id: true }, :activitypub] } - end - before do WebMock.stub_request(:get, url).to_return(status: 200, body: body, headers: headers) WebMock.stub_request(:get, 'http://example.com/foo').to_return(status: 200, body: json, headers: { 'Content-Type' => 'application/activity+json' }) -- cgit From b9d0d209cd16ef19b306528a9c4be34b47cf1945 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 31 Oct 2018 00:55:20 +0100 Subject: Fix reducer error when conversation has no last status in web UI (#9173) Fix #9170 --- app/javascript/mastodon/reducers/conversations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/mastodon/reducers/conversations.js b/app/javascript/mastodon/reducers/conversations.js index ea39fccee..b13a9fdf4 100644 --- a/app/javascript/mastodon/reducers/conversations.js +++ b/app/javascript/mastodon/reducers/conversations.js @@ -21,7 +21,7 @@ const conversationToMap = item => ImmutableMap({ id: item.id, unread: item.unread, accounts: ImmutableList(item.accounts.map(a => a.id)), - last_status: item.last_status.id, + last_status: item.last_status ? item.last_status.id : null, }); const updateConversation = (state, item) => state.update('items', list => { -- cgit From ba06a5f485d305bc917506828fd5cb20b3f0c226 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 31 Oct 2018 01:04:45 +0100 Subject: Bump version to 2.6.1 (#9172) --- CHANGELOG.md | 6 ++++++ lib/mastodon/version.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a7502656..cb8bf3272 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ Changelog All notable changes to this project will be documented in this file. +## [2.6.1] - 2018-10-30 +### Fixed + +- Fix resolving resources by URL not working due to a regression in #9132 (#9171) +- Fix reducer error in web UI when a conversation has no last status (#9173) + ## [2.6.0] - 2018-10-30 ### Added diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index 7cc837345..2e39ad01e 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -13,7 +13,7 @@ module Mastodon end def patch - 0 + 1 end def pre -- cgit From 2b2facbbdfb7c0b53e38048e932143d592af401e Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sat, 27 Oct 2018 23:09:07 +0200 Subject: [Glitch] Port some of upstream's getting started footer links --- .../glitch/features/getting_started/index.js | 40 ++++++++++------------ .../flavours/glitch/styles/components/index.scss | 36 +++++++++++++++++++ .../flavours/glitch/util/initial_state.js | 2 ++ 3 files changed, 57 insertions(+), 21 deletions(-) diff --git a/app/javascript/flavours/glitch/features/getting_started/index.js b/app/javascript/flavours/glitch/features/getting_started/index.js index c1897cc33..ce1ae50e4 100644 --- a/app/javascript/flavours/glitch/features/getting_started/index.js +++ b/app/javascript/flavours/glitch/features/getting_started/index.js @@ -8,7 +8,7 @@ import { openModal } from 'flavours/glitch/actions/modal'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import { me } from 'flavours/glitch/util/initial_state'; +import { me, invitesEnabled, version } from 'flavours/glitch/util/initial_state'; import { fetchFollowRequests } from 'flavours/glitch/actions/accounts'; import { List as ImmutableList } from 'immutable'; import { createSelector } from 'reselect'; @@ -163,26 +163,24 @@ export default class GettingStarted extends ImmutablePureComponent {
-
-

- - -  •  - - - -

-

- glitch-soc/mastodon, - Mastodon: Mastodon, - }} - /> -

-
+
    +
  • ·
  • + {invitesEnabled &&
  • ·
  • } +
  • ·
  • +
  • ·
  • +
  • ·
  • +
  • +
+ +

+ glitch-soc/mastodon (v{version}), + Mastodon: Mastodon }} + /> +

diff --git a/app/javascript/flavours/glitch/styles/components/index.scss b/app/javascript/flavours/glitch/styles/components/index.scss index cbf968ec4..7d71f0d1d 100644 --- a/app/javascript/flavours/glitch/styles/components/index.scss +++ b/app/javascript/flavours/glitch/styles/components/index.scss @@ -732,6 +732,42 @@ a { color: $dark-text-color; } + + &__footer { + flex: 0 0 auto; + padding: 10px; + padding-top: 20px; + + ul { + margin-bottom: 10px; + } + + ul li { + display: inline; + } + + p { + color: $dark-text-color; + font-size: 13px; + margin-bottom: 20px; + + a { + color: $dark-text-color; + text-decoration: underline; + } + } + + a { + text-decoration: none; + color: $darker-text-color; + + &:hover, + &:focus, + &:active { + text-decoration: underline; + } + } + } } .column-link__badge { diff --git a/app/javascript/flavours/glitch/util/initial_state.js b/app/javascript/flavours/glitch/util/initial_state.js index 0aaf65904..d12c05c0d 100644 --- a/app/javascript/flavours/glitch/util/initial_state.js +++ b/app/javascript/flavours/glitch/util/initial_state.js @@ -22,6 +22,8 @@ export const deleteModal = getMeta('delete_modal'); export const me = getMeta('me'); export const searchEnabled = getMeta('search_enabled'); export const maxChars = (initialState && initialState.max_toot_chars) || 500; +export const invitesEnabled = getMeta('invites_enabled'); +export const version = getMeta('version'); export const isStaff = getMeta('is_staff'); export default initialState; -- cgit From b3c13809808560870ac649c438211e4c64a24749 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Wed, 31 Oct 2018 11:01:50 +0100 Subject: Fix styling of display names in public pages --- app/javascript/flavours/glitch/styles/stream_entries.scss | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/javascript/flavours/glitch/styles/stream_entries.scss b/app/javascript/flavours/glitch/styles/stream_entries.scss index 80e2d0ca0..7b6060628 100644 --- a/app/javascript/flavours/glitch/styles/stream_entries.scss +++ b/app/javascript/flavours/glitch/styles/stream_entries.scss @@ -175,12 +175,6 @@ .embed, .public-layout { .status { - .status__info .status__display-name { - display: block; - max-width: 100%; - padding-right: 25px; - } - .status__info { font-size: 15px; display: initial; @@ -200,6 +194,10 @@ max-width: 100%; padding-right: 25px; margin: initial; + + .display-name strong { + display: inline; + } } .status__avatar { -- cgit From 34209c0340ca6b7c61de964a17f5f3fe2e0f7c7b Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Wed, 31 Oct 2018 11:10:51 +0100 Subject: Fix timestamp position in public pages with RTL languages --- app/javascript/flavours/glitch/styles/stream_entries.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/javascript/flavours/glitch/styles/stream_entries.scss b/app/javascript/flavours/glitch/styles/stream_entries.scss index 7b6060628..45dcf70ed 100644 --- a/app/javascript/flavours/glitch/styles/stream_entries.scss +++ b/app/javascript/flavours/glitch/styles/stream_entries.scss @@ -208,3 +208,11 @@ } } } + +.rtl { + .embed, .public-layout { + .status .status__relative-time { + float: left; + } + } +} -- cgit