]> cat aescling's git repositories - mastodon.git/commitdiff
Merge branch 'master' into glitch-soc/merge-upstream
authorThibaut Girka <thib@sitedethib.com>
Tue, 5 Mar 2019 18:23:16 +0000 (19:23 +0100)
committerThibaut Girka <thib@sitedethib.com>
Tue, 5 Mar 2019 18:23:16 +0000 (19:23 +0100)
Conflicts:
- app/models/status.rb
- db/schema.rb

Both conflicts are caused by us having extra database columns.

13 files changed:
1  2 
Gemfile.lock
app/helpers/stream_entries_helper.rb
app/javascript/styles/mastodon/components.scss
app/models/account.rb
app/models/concerns/account_associations.rb
app/models/status.rb
app/serializers/rest/status_serializer.rb
app/services/post_status_service.rb
app/views/stream_entries/_simple_status.html.haml
config/locales/en.yml
config/routes.rb
db/schema.rb
lib/mastodon/version.rb

diff --cc Gemfile.lock
Simple merge
Simple merge
Simple merge
index 4566c0d20905c1fc3bdd2db70f098fc103664ccc,f33130dd6cdddd6683eab9da3a78f8f6f29fb80c..f576489b4597254aa727fc9ba5b6c42f4c0f1091
@@@ -21,8 -21,7 +21,9 @@@
  #  account_id             :bigint(8)        not null
  #  application_id         :bigint(8)
  #  in_reply_to_account_id :bigint(8)
 +#  local_only             :boolean
 +#  full_status_text       :text             default(""), not null
+ #  poll_id                :bigint(8)
  #
  
  class Status < ApplicationRecord
Simple merge
index 28b4e321720bb34dc8448362a71fa736afea3eb1,68e48edbb8c506ed9721e2a3aa92bd2b219b75cf..d3441ca904e73ba400fde2237ebbc6e68fef4226
        %p{ :style => ('margin-bottom: 0' unless current_account&.user&.setting_expand_spoilers) }<
          %span.p-summary> #{Formatter.instance.format_spoiler(status, autoplay: autoplay)}&nbsp;
          %a.status__content__spoiler-link{ href: '#' }= t('statuses.show_more')
 -    .e-content{ lang: status.language, style: "display: #{!current_account&.user&.setting_expand_spoilers && status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status, custom_emojify: true, autoplay: autoplay)
 +    .e-content{ lang: status.language, style: "display: #{!current_account&.user&.setting_expand_spoilers && status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }<
 +      = Formatter.instance.format(status, custom_emojify: true, autoplay: autoplay)
  
-   - if !status.media_attachments.empty?
+   - if status.poll
+     = react_component :poll, disabled: true, poll: ActiveModelSerializers::SerializableResource.new(status.poll, serializer: REST::PollSerializer, scope: current_user, scope_name: :current_user).as_json do
+       = render partial: 'stream_entries/poll', locals: { poll: status.poll }
+   - elsif !status.media_attachments.empty?
      - if status.media_attachments.first.video?
        - video = status.media_attachments.first
        = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, width: 610, height: 343, inline: true, alt: video.description do
Simple merge
Simple merge
diff --cc db/schema.rb
index 05d4deb1a9e26373f33367e2d040eaba1935d920,161619dcf5993c81d571429296cb6c1e2236306c..48c00511bf6ae2783ea43251c827887e94edfedc
@@@ -592,7 -608,7 +619,8 @@@ ActiveRecord::Schema.define(version: 20
      t.bigint "account_id", null: false
      t.bigint "application_id"
      t.bigint "in_reply_to_account_id"
 +    t.boolean "local_only"
+     t.bigint "poll_id"
      t.index ["account_id", "id", "visibility", "updated_at"], name: "index_statuses_20180106", order: { id: :desc }
      t.index ["in_reply_to_account_id"], name: "index_statuses_on_in_reply_to_account_id"
      t.index ["in_reply_to_id"], name: "index_statuses_on_in_reply_to_id"
Simple merge