Skip to content
Extraits de code Groupes Projets
Valider 5f737c72 rédigé par Eugen Rochko's avatar Eugen Rochko
Parcourir les fichiers

Fix default assumed object type (note->activity), make stream entry threaded?...

Fix default assumed object type (note->activity), make stream entry threaded? check aware of orphaned replies
parent 0634e8de
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -39,7 +39,7 @@ class StreamEntry < ApplicationRecord ...@@ -39,7 +39,7 @@ class StreamEntry < ApplicationRecord
end end
def threaded? def threaded?
verb == :favorite || object_type == :comment (verb == :favorite || object_type == :comment) && !thread.nil?
end end
def thread def thread
......
...@@ -214,7 +214,7 @@ class ProcessFeedService < BaseService ...@@ -214,7 +214,7 @@ class ProcessFeedService < BaseService
def object_type(xml) def object_type(xml)
xml.at_xpath('./activity:object-type').content.gsub('http://activitystrea.ms/schema/1.0/', '').to_sym xml.at_xpath('./activity:object-type').content.gsub('http://activitystrea.ms/schema/1.0/', '').to_sym
rescue rescue
:note :activity
end end
def verb(xml) def verb(xml)
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter