diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/lib/bangtags.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/lib/bangtags.rb b/app/lib/bangtags.rb index c89146035..3934e5bb1 100644 --- a/app/lib/bangtags.rb +++ b/app/lib/bangtags.rb @@ -491,7 +491,11 @@ class Bangtags end else who = cmd[0] - next if switch_account(who.strip) + if @once + next if post_as(who.strip) + else + next if switch_account(who.strip) + end name = who.downcase.gsub(/\s+/, '').strip description = cmd[1..-1].join(':').strip if description.blank? @@ -1017,6 +1021,12 @@ class Bangtags true end + def post_as(target_acct) + target_acct = Account.find_local(target_acct) + return false unless target_acct&.user.present? && target_acct.user.in?(@user.linked_users) + status.account_id = target_acct.id + end + def html_entities @html_entities ||= HTMLEntities.new end |