about summary refs log tree commit diff
path: root/app/lib/bangtags.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/lib/bangtags.rb')
-rw-r--r--app/lib/bangtags.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/lib/bangtags.rb b/app/lib/bangtags.rb
index 8ed8a0612..99eb14d49 100644
--- a/app/lib/bangtags.rb
+++ b/app/lib/bangtags.rb
@@ -293,11 +293,15 @@ class Bangtags
           case cmd[1].downcase
           when 'permalink'
             chunk = TagManager.instance.url_for(@parent_status)
-          when 'tag'
+          when 'tag', 'untag'
             chunk = nil
             next unless @parent_status.account.id == @account.id
             tags = cmd[2..-1].map {|t| t.gsub(':', '.')}
-            add_tags(@parent_status, *tags)
+            if cmd[1].downcase == 'tag'
+              add_tags(@parent_status, *tags)
+            else
+              del_tags(@parent_status, *tags)
+            end
           when 'emoji'
             @parent_status.emojis.each do |theirs|
               ours = CustomEmoji.find_or_initialize_by(shortcode: theirs.shortcode, domain: nil)