summaryrefslogtreecommitdiff
path: root/server.rb
diff options
context:
space:
mode:
authorpdp8 <pdp8@pdp8.info>2023-09-10 12:40:43 +0200
committerpdp8 <pdp8@pdp8.info>2023-09-10 12:40:43 +0200
commit8d9d86a81dd207060b6878787551d43d38f855a0 (patch)
tree52a473ffc9ac80a21159ed0d7f8f9b43410cc9e1 /server.rb
parent3a87028b34c969744f6c63ba73947cfa32156e7d (diff)
recursive download of lemmy objects fixed
Diffstat (limited to 'server.rb')
-rw-r--r--server.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/server.rb b/server.rb
index 68c51e1..2eb7de3 100644
--- a/server.rb
+++ b/server.rb
@@ -138,15 +138,10 @@ helpers do
end
def save_inbox_object
- @object = fetch(@object) if @object.is_a? String and @object.match(/^http/)
- if @object['type'] and ACTIVITIES.include? @object['type'].downcase.to_sym
- @activity = @object
- handle_activity
- return
- end
- # @object = @object['object'] if @object['type'] == 'Like' # lemmy likes
+ @object = @object['object'] if @object['type'] and ACTIVITIES.include? @object['type'].downcase.to_sym # lemmy
return unless @object and @object['type'] != 'Person'
+ @object = fetch(@object) if @object.is_a? String and @object.match(/^http/)
if @activity['type'] != 'Update' && (@object['id'] and File.readlines(VISITED, chomp: true).include? @object['id'])
return
end