attribute :local_only if :local?
belongs_to :reblog, serializer: REST::StatusSerializer
- belongs_to :application, if: :user_shows_application?
+ belongs_to :application, if: :show_application?
belongs_to :account, serializer: REST::AccountSerializer
has_many :media_attachments, serializer: REST::MediaAttachmentSerializer
!current_user.nil?
end
- def user_shows_application?
- object.account.user_shows_application?
+ def show_application?
+ object.account.user_shows_application? || (current_user? && current_user.account_id == object.account_id)
end
def visibility
@options = options
@text = @options[:text] || ''
@in_reply_to = @options[:thread]
- @options.delete(:application) unless @account.user&.setting_show_application
return idempotency_duplicate if idempotency_given? && idempotency_duplicate?