Explorar el Código

For now, put a "." into no-text statuses with media for backcompat (#6691)

master
Eugen Rochko hace 6 años
committed by GitHub
padre
commit
510c9049c7
No se encontró ninguna clave conocida en la base de datos para esta firma ID de clave GPG: 4AEE18F83AFDEB23
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. +1
    -0
      app/services/post_status_service.rb

+ 1
- 0
app/services/post_status_service.rb Ver fichero

@@ -22,6 +22,7 @@ class PostStatusService < BaseService
media = validate_media!(options[:media_ids])
status = nil
text = options.delete(:spoiler_text) if text.blank? && options[:spoiler_text].present?
text = '.' if text.blank? && !media.empty?

ApplicationRecord.transaction do
status = account.statuses.create!(text: text,


Cargando…
Cancelar
Guardar