From 8d9d86a81dd207060b6878787551d43d38f855a0 Mon Sep 17 00:00:00 2001 From: pdp8 Date: Sun, 10 Sep 2023 12:40:43 +0200 Subject: recursive download of lemmy objects fixed --- server.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'server.rb') 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 -- cgit v1.2.3