about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-18 12:06:45 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-18 12:06:45 -0500
commit7f195145277d8e4e10ae086a99a30a83ec41b58d (patch)
tree8990c766df8a6cb872b366f8e3e29cb9b839a3ae /app/lib
parentb28fae301a338abe085780f6e74560190bd1c3e7 (diff)
better handling of bangtag-only posts that produce no output
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/bangtags.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/app/lib/bangtags.rb b/app/lib/bangtags.rb
index 40714097b..536606065 100644
--- a/app/lib/bangtags.rb
+++ b/app/lib/bangtags.rb
@@ -730,10 +730,14 @@ class Bangtags
 
     account.user.save
 
-    status.text = @chunks.join
-    status.save
-
-    postprocess_after_save
+    text = @chunks.join
+    if text.blank?
+      RemoveStatusService.new.call(@status)
+    else
+      status.text = text
+      status.save
+      postprocess_after_save
+    end
   end
 
   private