Commit Graph

87 Commits

Author SHA1 Message Date
Eugen Rochko 927333f4f8 Improve code style 2016-09-29 21:28:21 +02:00
Eugen Rochko c6b0311b86 Fix #54 - Fetch remote accounts by URL from mentions
Fetching atom extracted from FetchRemoteAccountService and FetchRemoteStatusService
into FetchAtomService. Mentions of the constant "http://activityschema.org/collection/public"
skipped as it's not a real URL/user.
2016-09-26 16:44:40 +02:00
Eugen Rochko b1a670af8d Handle remote account mentions a little better by trying a URL lookup in the db 2016-09-22 21:10:36 +02:00
Eugen Rochko 4a670780f0 Fix #51 - prevent duplicate attachments for remote statuses 2016-09-22 20:42:20 +02:00
Eugen Rochko 4bec613897 Fix #24 - Thread resolving for remote statuses
This is a big one, so let me enumerate:

Accounts as well as stream entry pages now contain Link headers that
reference the Atom feed and Webfinger URL for the former and Atom entry
for the latter. So you only need to HEAD those resources to get that
information, no need to download and parse HTML <link>s.

ProcessFeedService will now queue ThreadResolveWorker for each remote
status that it cannot find otherwise. Furthermore, entries are now
processed in reverse order (from bottom to top) in case a newer entry
references a chronologically previous one.

ThreadResolveWorker uses FetchRemoteStatusService to obtain a status
and attach the child status it was queued for to it.

FetchRemoteStatusService looks up the URL, first with a HEAD, tests
if it's an Atom feed, in which case it processes it directly. Next
for Link headers to the Atom feed, in which case that is fetched
and processed. Lastly if it's HTML, it is checked for <link>s to the Atom
feed, and if such is found, that is fetched and processed. The account for
the status is derived from author/name attribute in the XML and the hostname
in the URL (domain). FollowRemoteAccountService and ProcessFeedService
are used.

This means that potentially threads are resolved recursively until a dead-end
is encountered, however it is performed asynchronously over background jobs,
so it should be ok.
2016-09-21 01:50:31 +02:00
Eugen Rochko 059ebbf48d Separate PuSH subscriptions from following, add mastodon:push:refresh task,
respect hub.lease_seconds (fix #46)
2016-09-20 00:43:36 +02:00
Eugen Rochko adffc7a495 Fix #43 2016-09-18 12:28:49 +02:00
Eugen Rochko 183a23943b Fix how other services used old FollowRemoteAccountService 2016-09-17 17:07:45 +02:00
Eugen Rochko 3cc47beb6e Refactored generation of unique tags, URIs and object URLs into own classes,
as well as formatting of content
2016-09-09 20:04:34 +02:00
Eugen 1efa8e48d1 Fix enclosures not being parsed for reblogged statuses 2016-09-06 12:30:15 +02:00
Eugen Rochko eec0dc46a6 PostStatusService can attach media to status, ProcessFeedService likewise 2016-09-05 18:39:53 +02:00
Eugen Rochko a289c1d52f Handle delete Salmons, todo: clean up timelines 2016-09-04 14:44:16 +02:00
Eugen Rochko da4b675aca Fix favourite handling in ProcessInteractionService 2016-03-26 01:34:12 +01:00
Eugen Rochko 8eeec389c1 Add link to github project to footer, move FanOutOnWriteService calls to
DistributionWorker. That isn't the heaviest service, yet, but gotta start
somewhere
2016-03-25 03:22:26 +01:00
Eugen Rochko a08e724476 Fix subscriptions:clear task, refactor feeds, refactor streamable activites
and atom feed generation to some extent, as well as the way mentions are
stored
2016-03-25 02:13:30 +01:00
Eugen Rochko 97d5aba1ec Do not try to send notification e-mails for reblogs if the reblog is not of a
local account
2016-03-24 13:25:33 +01:00
Eugen Rochko b640f35621 Writing out more tests, fixed some bugs 2016-03-20 13:03:06 +01:00
Eugen Rochko 2b116131d7 Adding e-mail notifications about mentions, follows, favourites and reblogs. Fixing another mention recording bug 2016-03-19 19:20:07 +01:00
Eugen Rochko 66a2107527 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
2016-03-19 11:59:23 +01:00
Eugen Rochko f97fc9744f Use FanOutOnWriteService AFTER processing mentions 2016-03-19 00:41:29 +01:00
Eugen Rochko 48aeacd5f9 Fixed ANOTHER first_or_create bug. Seriously who came up with that API smh 2016-03-18 23:47:02 +01:00
Eugen Rochko 9a7485d034 Fix typo on /api/accounts/:id/statuses, fix potential case-sensitivity issue
when registering incoming status mentions, add Travis CI file
2016-03-18 23:23:19 +01:00
Eugen Rochko d022975444 Fixing small bug with FollowRemoteAccountService usage 2016-03-16 21:20:50 +01:00
Eugen Rochko 75b3339a99 Respect "delete" verb on remote feeds 2016-03-16 10:46:15 +01:00
Eugen Rochko 23d08c6749 Changing the use of config constants to the Rails configuration object 2016-02-29 20:06:39 +01:00
Eugen Rochko 11ff92c9d7 Adding a test for ReblogService, fixing mentions for remote statuses 2016-02-28 21:22:56 +01:00
Eugen Rochko 47d50b0e39 A lot of fixes from a live test 2016-02-28 15:46:29 +01:00
Eugen Rochko ad5ae3f60e Update profile information and download avatar of remote accounts 2016-02-28 14:26:26 +01:00
Eugen Rochko 44c5958203 Fixed small bugs and code style offences 2016-02-25 00:22:46 +01:00
Eugen Rochko 71fe24096c Adding a Mention model, test stubs 2016-02-25 00:17:01 +01:00
Eugen Rochko 8da8387afe Add shared statuses to the database 2016-02-24 17:23:59 +01:00
Eugen Rochko fa7868675d Send Salmon interactions 2016-02-24 12:57:29 +01:00
Eugen Rochko 10eb47a33e Do not PuSH-subscribe to remote accounts when creating them for salmon 2016-02-24 03:05:40 +01:00
Eugen Rochko 9411e8c35a Feed processing except fetching remote statuses 2016-02-24 01:28:53 +01:00
Eugen Rochko 79baf2fd99 Process favourites, reblogs and replies from Salmon 2016-02-24 00:57:47 +01:00
Eugen Rochko 3b0bc18db9 Improved Atom rendering templates, added README 2016-02-23 13:08:01 +01:00
Eugen Rochko 709c6685a9 Made some progress 2016-02-22 16:00:20 +01:00
Renamed from app/services/process_feed_update_service.rb (Browse further)