summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpdp8 <pdp8@pdp8.info>2023-09-10 20:20:16 +0200
committerpdp8 <pdp8@pdp8.info>2023-09-10 20:20:16 +0200
commitda017e7cd9394cb759ee74440c5fd25860063905 (patch)
treef4024d152e7326182525df68870c8ef101389345
parent8d9d86a81dd207060b6878787551d43d38f855a0 (diff)
empty objects fixed
-rwxr-xr-xclean-inbox2
-rw-r--r--server.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/clean-inbox b/clean-inbox
index b623890..9429962 100755
--- a/clean-inbox
+++ b/clean-inbox
@@ -1,3 +1,3 @@
#!/usr/bin/env nu
-[create announce undo delete like update move] | each { |a| glob $'/srv/social/inbox/($a)/*.json' | each {|f| rm $f } }
+[create announce undo delete like update move add] | each { |a| glob $'/srv/social/inbox/($a)/*.json' | each {|f| rm $f } }
diff --git a/server.rb b/server.rb
index 2eb7de3..f44e8f0 100644
--- a/server.rb
+++ b/server.rb
@@ -142,6 +142,7 @@ helpers do
return unless @object and @object['type'] != 'Person'
@object = fetch(@object) if @object.is_a? String and @object.match(/^http/)
+ return unless @object
if @activity['type'] != 'Update' && (@object['id'] and File.readlines(VISITED, chomp: true).include? @object['id'])
return
end