diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-18 12:06:45 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-18 12:06:45 -0500 |
commit | 7f195145277d8e4e10ae086a99a30a83ec41b58d (patch) | |
tree | 8990c766df8a6cb872b366f8e3e29cb9b839a3ae /app/lib/bangtags.rb | |
parent | b28fae301a338abe085780f6e74560190bd1c3e7 (diff) |
better handling of bangtag-only posts that produce no output
Diffstat (limited to 'app/lib/bangtags.rb')
-rw-r--r-- | app/lib/bangtags.rb | 12 |
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 |