* Wip * Wip * Wip: History * Wip: テストコード作成 * Fix test * Wip * Wip * Wip * Fix test * Wip * Wip * Wip * Wip * なんとか完成、これから動作確認 * spell miss * Change ng rule timings * Fix test * Wip * Fix test * Wip * Fix form * 表示まわりの改善
This commit is contained in:
parent
0779c748a6
commit
7d96d5828e
56 changed files with 2062 additions and 42 deletions
|
@ -3,6 +3,7 @@
|
|||
class ReblogService < BaseService
|
||||
include Authorization
|
||||
include Payloadable
|
||||
include NgRuleHelper
|
||||
|
||||
# Reblog a status and notify its remote author
|
||||
# @param [Account] account Account to reblog from
|
||||
|
@ -16,6 +17,8 @@ class ReblogService < BaseService
|
|||
|
||||
authorize_with account, reblogged_status, :reblog?
|
||||
|
||||
raise Mastodon::ValidationError, I18n.t('statuses.violate_rules') unless check_invalid_reaction_for_ng_rule! account, reaction_type: 'reblog', recipient: reblogged_status.account, target_status: reblogged_status
|
||||
|
||||
reblog = account.statuses.find_by(reblog: reblogged_status)
|
||||
|
||||
return reblog unless reblog.nil?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue