summaryrefslogtreecommitdiff
path: root/helpers.rb
diff options
context:
space:
mode:
authorpdp8 <pdp8@pdp8.info>2023-07-25 00:24:02 +0200
committerpdp8 <pdp8@pdp8.info>2023-07-25 00:24:02 +0200
commit3daf30b0a3837d3d8becb0baceed580e92403ce6 (patch)
tree8e0ac2d67a0ead3e0bd324088485618927858bb2 /helpers.rb
parent0f039c1b813653869033e961810942f479a28685 (diff)
send notes to outbox
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)