diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-12-19 09:33:58 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-12-19 09:33:58 -0600 |
commit | 5a08b14186a7ce421feb3c551d0145adb22829ec (patch) | |
tree | 8a9b2822fe233afb3f312934cdbfe08c4474f470 /app | |
parent | 8635ba66f4791ee38ed393b643e697b9e0e31e32 (diff) |
drop check for mentions-only posts
Diffstat (limited to 'app')
-rw-r--r-- | app/services/post_status_service.rb | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index da14728f7..dc1a3bcdc 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -55,7 +55,6 @@ class PostStatusService < BaseService raise Mastodon::LengthValidationError, I18n.t('statuses.replies_rejected') if recipient_rejects_replies? raise Mastodon::LengthValidationError, I18n.t('statuses.kicked') if kicked? - raise Mastodon::LengthValidationError, I18n.t('statuses.no_body') if has_only_mentions? return idempotency_duplicate if idempotency_given? && idempotency_duplicate? @@ -99,10 +98,6 @@ class PostStatusService < BaseService @in_reply_to.present? && ConversationKick.where(account_id: @account.id, conversation_id: @in_reply_to.conversation_id).exists? end - def has_only_mentions? - @options[:nomentions].blank? && @text.match?(/\A(?:\s*@((#{Account::USERNAME_RE})(?:@[a-z0-9\.\-]+[a-z0-9]+)?))+\z/i) - end - def mark_recipient_known @in_reply_to.account.mark_known! unless !Setting.auto_mark_known || @in_reply_to.account.known? end |