about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-10 02:55:30 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-10 02:55:30 +0200
commit5f737c72282b981e3e637e5b4836ce45a161947c (patch)
tree38deee09667711264ec9d2bc4b80f26a21726e50
parent0634e8dee5026b06c95b7efe161a0930c7431d9b (diff)
Fix default assumed object type (note->activity), make stream entry threaded? check aware of orphaned replies
-rw-r--r--app/models/stream_entry.rb2
-rw-r--r--app/services/process_feed_service.rb2
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)