summaryrefslogtreecommitdiff
path: root/helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'helpers.rb')
-rw-r--r--helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/helpers.rb b/helpers.rb
index 6812a83..5344606 100644
--- a/helpers.rb
+++ b/helpers.rb
@@ -6,7 +6,7 @@ helpers do
# add date and id, save
def save_activity(activity, box)
date = Time.now.utc.iso8601
- activity['published'] = date if box == OUTBOX
+ activity['published'] ||= date # if box == OUTBOX
basename = "#{activity['published']}_#{mention(activity['actor'])}.json"
activity_rel_path = File.join(activity['type'].downcase, basename)
activity_path = File.join(box[:dir], activity_rel_path)