about summary refs log tree commit diff
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-17 15:51:11 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-17 15:51:11 -0500
commitd3357a90fe1498f426a50e078ae8d678d8c6ec57 (patch)
treef2dee33d9936af56844dea88e76fca79ca920a04
parent0189e487f812c9e2e345cbebd6d00102978ad630 (diff)
use private user var for `media:desc` bangtag
-rw-r--r--app/lib/bangtags.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/lib/bangtags.rb b/app/lib/bangtags.rb
index 52fc7bf9b..6de8fc5d5 100644
--- a/app/lib/bangtags.rb
+++ b/app/lib/bangtags.rb
@@ -325,9 +325,10 @@ class Bangtags
           case media_cmd.downcase
           when 'desc'
             if media_args.present?
-              @vars["media_#{media_idx}_desc"] = media_args.join(':')
+              @vars["_media:#{media_idx}:desc"] = media_args.join(':')
             else
-              @vore_stack.push("media_#{media_idx}_desc")
+              @vars.delete("_media:#{media_idx}:desc")
+              @vore_stack.push("_media:#{media_idx}:desc")
               @component_stack.push(:var)
             end
           end
@@ -654,7 +655,7 @@ class Bangtags
 
         case media_cmd
         when 'desc'
-          status.media_attachments[media_idx-1].description = @vars["media_#{media_idx}_desc"]
+          status.media_attachments[media_idx-1].description = @vars["_media:#{media_idx}:desc"]
           status.media_attachments[media_idx-1].save
         end
       end