From 5f737c72282b981e3e637e5b4836ce45a161947c Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 10 Oct 2016 02:55:30 +0200 Subject: [PATCH] Fix default assumed object type (note->activity), make stream entry threaded? check aware of orphaned replies --- app/models/stream_entry.rb | 2 +- app/services/process_feed_service.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/stream_entry.rb b/app/models/stream_entry.rb index 0df7ece60..bc4821ca9 100644 --- a/app/models/stream_entry.rb +++ b/app/models/stream_entry.rb @@ -39,7 +39,7 @@ class StreamEntry < ApplicationRecord end def threaded? - verb == :favorite || object_type == :comment + (verb == :favorite || object_type == :comment) && !thread.nil? end def thread diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb index d24b803e6..4ed0bf0bb 100644 --- a/app/services/process_feed_service.rb +++ b/app/services/process_feed_service.rb @@ -214,7 +214,7 @@ class ProcessFeedService < BaseService def object_type(xml) xml.at_xpath('./activity:object-type').content.gsub('http://activitystrea.ms/schema/1.0/', '').to_sym rescue - :note + :activity end def verb(xml)