diff --git a/bin/ljsend b/bin/ljsend index 6bfa43a..c4d9186 100755 --- a/bin/ljsend +++ b/bin/ljsend @@ -28,20 +28,14 @@ Dir.open("#{outgoingdir}") do |d| "Music" => :current_music, "Userpic" => :picture, "Security" => :security, - "Preformatted" => :preformatted + "Preformatted" => :preformatted, + "Backdate" => :backdated }.each do |header, option| if posting[header] != "" then opts[option] = posting[header] end end - if opts.has_key? "Backdate" then - if opts["Backdate"] then - opts["opt_backdated"] = true - end - opts.delete "Backdate" - end - if posting["Date"] != "" then unless posting["Date"].respond_to? :strftime posting["Date"] = DateTime.parse(posting["Date"]) diff --git a/lib/livejournaller.rb b/lib/livejournaller.rb index 41dca6f..ac4e998 100644 --- a/lib/livejournaller.rb +++ b/lib/livejournaller.rb @@ -187,7 +187,8 @@ def post subject, text, options = {} :preformatted => :opt_preformatted, :nocomments => :opt_nocomments, :picture => :picture_keyword, - :noemail => :opt_noemail + :noemail => :opt_noemail, + :backdated => :opt_backdated }.each do |option_name, lj_option_name| if options[option_name] then callhash[:props][lj_option_name] = options[option_name]