diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-19 11:59:23 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-19 11:59:23 +0100 |
commit | 66a2107527485f01f54f0899fcb913f05053cd0e (patch) | |
tree | 641278b4820f213a0a45e4f47ee5e5e6ab3c0330 /app | |
parent | 111f2a1d489bdd7bd29e148a12a6465fee6edea9 (diff) |
Turns out that replies don't have to have the type comment. Changed handling
of those to depend on presence of <thr:in-reply-to /> instead
Diffstat (limited to 'app')
-rw-r--r-- | app/services/process_feed_service.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb index 7f72ea251..ccdf07cc1 100644 --- a/app/services/process_feed_service.rb +++ b/app/services/process_feed_service.rb @@ -26,12 +26,14 @@ class ProcessFeedService < BaseService status = Status.new(uri: activity_id(entry), url: activity_link(entry), account: account, text: content(entry), created_at: published(entry), updated_at: updated(entry)) - if object_type(entry) == :comment && verb(entry) == :post - add_reply!(entry, status) - elsif verb(entry) == :share + if verb(entry) == :share add_reblog!(entry, status) elsif verb(entry) == :post - add_post!(entry, status) + if thread_id(entry).nil? + add_post!(entry, status) + else + add_reply!(entry, status) + end end # If we added a status, go through accounts it mentions and create respective relations |