]> cat aescling's git repositories - mastodon.git/commitdiff
Merge branch 'master' into glitch-soc/merge-upstream
authorThibaut Girka <thib@sitedethib.com>
Sun, 10 Feb 2019 19:57:51 +0000 (20:57 +0100)
committerThibaut Girka <thib@sitedethib.com>
Sun, 10 Feb 2019 20:10:09 +0000 (21:10 +0100)
Conflicts:
- app/controllers/oauth/authorized_applications_controller.rb
  Two changes too close to each other
- app/controllers/settings/sessions_controller.rb
- app/lib/user_settings_decorator.rb
  Two changes too close to each other
- app/models/media_attachment.rb
  New changes too close to glitch-soc only changes.
- app/models/user.rb
  Two changes too close to each other.
- app/services/remove_status_service.rb
  Kept direct timeline code which had been removed upstream.
- app/views/settings/preferences/show.html.haml
  Two changes too close to each other.
- config/locales/en.yml
  Introduction of a new string too close to glitch-soc-only's “flavour”
- config/locales/ja.yml
  Introduction of a new string too close to glitch-soc-only's “flavour”
- config/locales/pl.yml
  Introduction of a new string too close to glitch-soc-only's “flavour”
- config/locales/simple_form.en.yml
  Introduction of a new string too close to glitch-soc-only's “skin”
- config/locales/simple_form.pl.yml
  Introduction of a new string too close to glitch-soc-only's “skin”
- config/settings.yml
  Reverted upstream's decision of enabling posting application by default.

30 files changed:
1  2 
Dockerfile
Gemfile
Gemfile.lock
app/controllers/accounts_controller.rb
app/controllers/oauth/authorized_applications_controller.rb
app/controllers/settings/profiles_controller.rb
app/controllers/settings/sessions_controller.rb
app/javascript/mastodon/locales/defaultMessages.json
app/javascript/mastodon/locales/en.json
app/javascript/mastodon/locales/ja.json
app/javascript/mastodon/locales/pl.json
app/javascript/styles/mastodon/admin.scss
app/javascript/styles/mastodon/components.scss
app/lib/feed_manager.rb
app/models/concerns/account_associations.rb
app/models/media_attachment.rb
app/services/batched_remove_status_service.rb
app/services/post_status_service.rb
app/services/remove_status_service.rb
config/i18n-tasks.yml
config/locales/en.yml
config/locales/ja.yml
config/locales/pl.yml
config/locales/simple_form.en.yml
config/locales/simple_form.ja.yml
config/locales/simple_form.pl.yml
config/navigation.rb
config/routes.rb
db/schema.rb
spec/models/concerns/account_interactions_spec.rb

diff --cc Dockerfile
index aefcb44bded1f8352e12a9e6bbca77a8e57d7acd,2b15381ec509ce5a2f3b3f4abe03389884b4638e..eca90094c713fc9d7de71bf64ff86251e6fa22b4
@@@ -64,12 -63,9 +63,12 @@@ RUN apk add --no-cache -t build-depende
   && make install \
   && libtool --finish /usr/local/lib \
   && cd /mastodon \
-  && rm -rf /tmp/* /var/cache/apk/*
+  && rm -rf /tmp/*
  
  COPY Gemfile Gemfile.lock package.json yarn.lock .yarnclean /mastodon/
 +COPY stack-fix.c /lib
 +RUN gcc -shared -fPIC /lib/stack-fix.c -o /lib/stack-fix.so
 +RUN rm /lib/stack-fix.c
  
  RUN bundle config build.nokogiri --use-system-libraries --with-iconv-lib=/usr/local/lib --with-iconv-include=/usr/local/include \
   && bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without test development \
diff --cc Gemfile
Simple merge
diff --cc Gemfile.lock
Simple merge
index 1e420b3e7fd87924f1e0c1712c77373884007961,f3d2353669464c0e91af032fe46168fdfc31a14f..4e45445df44ed945de20d675f1e6061c5b9a7c26
@@@ -5,7 -5,7 +5,8 @@@ class Oauth::AuthorizedApplicationsCont
  
    before_action :store_current_location
    before_action :authenticate_resource_owner!
 +  before_action :set_pack
+   before_action :set_body_classes
  
    include Localized
  
index 780ea64b40f1970b50cfa9645670cef03d89b31a,84ebb21f2cce31ff3014c12df957fc540680a3ca..d74db6000ef352d547f884acd2f7a4ed4373ca4d
@@@ -1,7 -1,7 +1,8 @@@
  # frozen_string_literal: true
  
 -class Settings::SessionsController < Settings::BaseController
 +#  Intentionally does not inherit from BaseController
 +class Settings::SessionsController < ApplicationController
+   before_action :authenticate_user!
    before_action :set_session, only: :destroy
  
    def destroy
index 3bb157aeb9a46ac98736914f9942f75279167dfa,03af57ba800deeeaf47705864013f9914c9f6763..b079f256d8cf66882d8cab2e808719ad0ef82917
    "navigation_bar.favourites": "Favourites",
    "navigation_bar.filters": "Muted words",
    "navigation_bar.follow_requests": "Follow requests",
-   "navigation_bar.info": "About this instance",
+   "navigation_bar.info": "About this server",
    "navigation_bar.keyboard_shortcuts": "Hotkeys",
    "navigation_bar.lists": "Lists",
 +  "navigation_bar.misc": "Misc",
    "navigation_bar.logout": "Logout",
    "navigation_bar.mutes": "Muted users",
    "navigation_bar.personal": "Personal",
Simple merge
index 601b1422345585987d9483fcd22a16307d78d756,a57ba0b2ea0ed4e90bd3112967e22e78e8dd3b2b..81397a18e386ab13ce548319c8b35ffc3ec5c3a6
  class MediaAttachment < ApplicationRecord
    self.inheritance_column = nil
  
 -  enum type: [:image, :gifv, :video, :unknown]
 +  enum type: [:image, :gifv, :video, :audio, :unknown]
  
-   IMAGE_FILE_EXTENSIONS = ['.jpg', '.jpeg', '.png', '.gif'].freeze
+   IMAGE_FILE_EXTENSIONS = ['.jpg', '.jpeg', '.png', '.gif', '.webp'].freeze
    VIDEO_FILE_EXTENSIONS = ['.webm', '.mp4', '.m4v', '.mov'].freeze
 +  AUDIO_FILE_EXTENSIONS = ['.mp3', '.m4a', '.wav', '.ogg'].freeze
  
-   IMAGE_MIME_TYPES             = ['image/jpeg', 'image/png', 'image/gif'].freeze
+   IMAGE_MIME_TYPES             = ['image/jpeg', 'image/png', 'image/gif', 'image/webp'].freeze
    VIDEO_MIME_TYPES             = ['video/webm', 'video/mp4', 'video/quicktime'].freeze
    VIDEO_CONVERTIBLE_MIME_TYPES = ['video/webm', 'video/quicktime'].freeze
 +  AUDIO_MIME_TYPES             = ['audio/mpeg', 'audio/mp4', 'audio/vnd.wav', 'audio/wav', 'audio/x-wav', 'audio/x-wave', 'audio/ogg',].freeze
  
    IMAGE_STYLES = {
      original: {
                      processors: ->(f) { file_processors f },
                      convert_options: { all: '-quality 90 -strip' }
  
 -  validates_attachment_content_type :file, content_type: IMAGE_MIME_TYPES + VIDEO_MIME_TYPES
 +  validates_attachment_content_type :file, content_type: IMAGE_MIME_TYPES + VIDEO_MIME_TYPES + AUDIO_MIME_TYPES
-   validates_attachment_size :file, less_than: IMAGE_LIMIT, unless: :video?
-   validates_attachment_size :file, less_than: VIDEO_LIMIT, if: :video?
+   validates_attachment_size :file, less_than: IMAGE_LIMIT, unless: :video_or_gifv?
+   validates_attachment_size :file, less_than: VIDEO_LIMIT, if: :video_or_gifv?
    remotable_attachment :file, VIDEO_LIMIT
  
    include Attachmentable
Simple merge
index 4bee86c8a1a9a2d319cb68eb8a8d9f6489b4490f,2012f15fc7fac204963afc973eca8a20da4f9c5d..99c8e6cbbb694093330b5627eeaa68efcac52569
@@@ -149,18 -153,7 +154,14 @@@ class RemoveStatusService < BaseServic
    def remove_from_media
      return unless @status.public_visibility?
  
-     Redis.current.publish('timeline:public:media', @payload)
-     Redis.current.publish('timeline:public:local:media', @payload) if @status.local?
+     redis.publish('timeline:public:media', @payload)
+     redis.publish('timeline:public:local:media', @payload) if @status.local?
    end
-   def redis
-     Redis.current
-   end
 +
 +  def remove_from_direct
 +    @mentions.each do |mention|
 +      Redis.current.publish("timeline:direct:#{mention.account.id}", @payload) if mention.account.local?
 +    end
 +    Redis.current.publish("timeline:direct:#{@account.id}", @payload) if @account.local?
 +  end
  end
Simple merge
index b8d80a7484b6181a247875b3015537cf018f53fc,dacf16d56340253c3ba118c151ae61a1e047faa3..a9553aaceaa8a3b0b4918c3e718104a256ee57a7
@@@ -386,11 -386,8 +386,11 @@@ en
          desc_html: Modify the look with CSS loaded on every page
          title: Custom CSS
        hero:
-         desc_html: Displayed on the frontpage. At least 600x100px recommended. When not set, falls back to instance thumbnail
+         desc_html: Displayed on the frontpage. At least 600x100px recommended. When not set, falls back to server thumbnail
          title: Hero image
 +      hide_followers_count:
 +        desc_html: Do not show followers count on user profiles
 +        title: Hide followers count
        mascot:
          desc_html: Displayed on multiple pages. At least 293×205px recommended. When not set, falls back to default mascot
          title: Mascot image
      development: Development
      edit_profile: Edit profile
      export: Data export
+     featured_tags: Featured hashtags
 +    flavours: Flavours
      followers: Authorized followers
      import: Import
      migrate: Account migration
index 2b1b70639ef58df0aaaa6aa20b43730972c439c0,1a2591cb4e8b7beb12c4d5fb8b16a97fcadfcd2c..e16ce31a90737ccb775d1d81cdd39d9f9f270f89
@@@ -801,8 -810,8 +811,9 @@@ ja
      development: 開発
      edit_profile: プロフィールを編集
      export: データのエクスポート
-     followers: 信頼済みのインスタンス
+     featured_tags: 注目のハッシュタグ
 +    flavours: フレーバー
+     followers: 信頼済みのサーバー
      import: データのインポート
      migrate: アカウントの引っ越し
      notifications: 通知
index 23fa10179e4af7756032f4e2afc29d62a0a5b60c,e110db50de642b074e7fa48ea81b2855182ee0cb..1567ac6265b217b812254516d1f2a8684d9bc1be
@@@ -826,7 -835,7 +836,8 @@@ pl
      development: Tworzenie aplikacji
      edit_profile: Edytuj profil
      export: Eksportowanie danych
+     featured_tags: Wyróżnione hashtagi
 +    flavours: Odmiany
      followers: Autoryzowani śledzący
      import: Importowanie danych
      migrate: Migracja konta
index 674abff6338f1479a32a1a40e7279826187402d8,3faaa6ac7bfef637029b8aff5c9aefbee203212c..ad9ae74174eb0bd0011ba603aa09a273a80d58d0
@@@ -34,11 -34,13 +34,13 @@@ en
          setting_hide_network: Who you follow and who follows you will not be shown on your profile
          setting_noindex: Affects your public profile and status pages
          setting_show_application: The application you use to toot will be displayed in the detailed view of your toots
 -        setting_theme: Affects how Mastodon looks when you're logged in from any device.
 +        setting_skin: Reskins the selected Mastodon flavour
          username: Your username will be unique on %{domain}
          whole_word: When the keyword or phrase is alphanumeric only, it will only be applied if it matches the whole word
+       featured_tag:
+         name: 'You might want to use one of these:'
        imports:
-         data: CSV file exported from another Mastodon instance
+         data: CSV file exported from another Mastodon server
        sessions:
          otp: 'Enter the two-factor code generated by your phone app or use one of your recovery codes:'
        user:
Simple merge
index 660841e06c28f0feda4bd825237c7d6d2cd26aa1,0ab045068e7cb203a73a6227d071f391558945dd..f5b5a6ca5ed1a1c6be02ee5d27b9d22ea03b25b1
@@@ -33,9 -33,12 +33,12 @@@ pl
          setting_display_media_show_all: Zawsze pokazuj zawartość multimedialną jako wrażliwą
          setting_hide_network: Informacje o tym, kto Cię śledzi i kogo śledzisz nie będą widoczne
          setting_noindex: Wpływa na widoczność strony profilu i Twoich wpisów
 -        setting_theme: Zmienia wygląd Mastodona po zalogowaniu z dowolnego urządzenia.
+         setting_show_application: W informacjach o wpisie będzie widoczna informacja o aplikacji, z której został wysłany
 +        setting_skin: Zmienia wygląd używanej odmiany Mastodona
          username: Twoja nazwa użytkownika będzie niepowtarzalna na %{domain}
          whole_word: Jeśli słowo lub fraza składa się jedynie z liter lub cyfr, filtr będzie zastosowany tylko do pełnych wystąpień
+       featured_tag:
+         name: 'Sugerujemy użycie jednego z następujących:'
        imports:
          data: Plik CSV wyeksportowany z innej instancji Mastodona
        sessions:
          setting_hide_network: Ukryj swoją sieć
          setting_noindex: Nie indeksuj mojego profilu w wyszukiwarkach internetowych
          setting_reduce_motion: Ogranicz ruch w animacjach
+         setting_show_application: Informuj o aplikacji z której wysłano wpisy
 +        setting_skin: Motyw
          setting_system_font_ui: Używaj domyślnej czcionki systemu
 -        setting_theme: Motyw strony
          setting_unfollow_modal: Pytaj o potwierdzenie przed cofnięciem śledzenia
          severity: Priorytet
          type: Importowane dane
Simple merge
Simple merge
diff --cc db/schema.rb
Simple merge