Commit graph

222 commits

Author SHA1 Message Date
Eugen Rochko
1bb1ec3b8d Further abstract caching for includes 2016-11-30 15:57:56 +01:00
Eugen Rochko
329b2a326d Normalize localizations, add stub for admin/accounts 2016-11-30 15:32:26 +01:00
Eugen Rochko
015cd99f41 Make User#current_sign_in_at actually track when user was last active,
by updating it at least every 24h if the user visits the site
2016-11-30 15:17:03 +01:00
Eugen Rochko
bee7aeaea5 Unify collection caching code 2016-11-29 15:49:39 +01:00
Eugen Rochko
d26b8f3cce Delete statuses asynchronously but provide instant feedback in the API 2016-11-29 15:32:25 +01:00
Eugen Rochko
02da8fdcbe Fix setting of confirmed=true on successful confirmation 2016-11-28 19:24:49 +01:00
Eugen Rochko
f37efe8e56 Add simple admin overview of PuSH subscriptions 2016-11-28 18:45:13 +01:00
Eugen Rochko
b5ad0eb4ea Adding embedded PuSH server 2016-11-28 13:36:47 +01:00
Eugen Rochko
abeccf6eb2 X-RateLimit-Reset formatted with iso8601 2016-11-25 15:21:22 +01:00
Eugen Rochko
666eda7256 Remove stale entries from cache results 2016-11-25 13:25:40 +01:00
Eugen Rochko
ea0846645a Fix #65 - Options to block notifications from people you don't follow/who don't follow you 2016-11-25 13:13:16 +01:00
Eugen Rochko
30f9e9e624 Remove Neo4J 2016-11-24 23:46:27 +01:00
Eugen Rochko
8ab2fcbb2c Mini Profiler not working well, remove it 2016-11-24 19:59:11 +01:00
Alyssa Ross
cb06801b21 Extract filename obfuscation into module 2016-11-24 00:30:58 +00:00
Andrea Faulds
66a20701b7 Rename media to avoid exposing filename (fixes #207) 2016-11-23 21:03:03 +00:00
Eugen Rochko
d78962c1ed Cache accounts/:id/statuses and single statuses too 2016-11-23 19:00:43 +01:00
Eugen Rochko
65d6191147 Adding sensitive marker to statuses in API 2016-11-23 10:46:48 +01:00
Eugen Rochko
c60df460af Rename "publish" to "toot" in english locale, fix lightbox showing old image
before loading new one, cache notifications API, fix missing follow button
on public profiles
2016-11-23 09:20:34 +01:00
Eugen Rochko
dda6354c76 Implement includes caching for timelines APIs 2016-11-23 08:34:35 +01:00
Eugen Rochko
f6a975af8b More query optimizations 2016-11-22 23:18:54 +01:00
Eugen Rochko
30010a6dbd Moving some counter queries out of subqueries in the API 2016-11-22 22:59:54 +01:00
Eugen Rochko
f07b0dc82f Remove unneeded indices, improve error handling in background workers, don't needlessly reload reblogged status, send Devise e-mails asynchronously 2016-11-22 17:32:51 +01:00
Eugen Rochko
74df3ba1d7 Local accounts can control "silenced" attribute which removes them from public timeline 2016-11-21 23:06:41 +01:00
Eugen Rochko
0aeae195cb Better error message in doorkeeper json response 2016-11-21 16:19:35 +01:00
Eugen Rochko
0a68464995 Performance improvement for notifications API 2016-11-21 16:10:42 +01:00
Eugen Rochko
4d100a1b36 Remove some n+1 queries from notifications API 2016-11-21 15:16:04 +01:00
Eugen Rochko
83cdfefa7d Remove orphaned notifications, add scopes param to app create API 2016-11-21 14:59:13 +01:00
Eugen Rochko
80d58c6c04 Desktop notifications 2016-11-21 10:24:50 +01:00
Eugen Rochko
38025dfea3 Adding unified streamable notifications 2016-11-20 19:39:58 +01:00
Eugen Rochko
fbaddca49e Move Salmon processing to background as well as PuSH 2016-11-18 23:24:57 +01:00
Eugen Rochko
b8e6ca45e5 Add user locale setting 2016-11-16 17:56:31 +01:00
Eugen Rochko
0e956910c3 Adding some localizations 2016-11-15 23:02:57 +01:00
Eugen Rochko
c6f5eb8aa7 Fix #144 - Filter statuses from blocked users out of ancestors/descendants results 2016-11-15 17:33:41 +01:00
Eugen Rochko
e71b152d89 Fix rubocop issues, introduce usage of frozen literal to improve performance 2016-11-15 16:56:29 +01:00
Eugen Rochko
a7332acba3 Delegate processing of incoming PuSH data to background workers 2016-11-15 15:43:33 +01:00
Eugen Rochko
19ea717b3c Fix wrong link header on followers API, wrong link in tabs component, order
account results
2016-11-14 01:19:25 +01:00
Eugen Rochko
6206f75837 Add limit to search results 2016-11-12 14:49:28 +01:00
Eugen Rochko
cbfa28b9cc Use full-text search for autosuggestions 2016-11-12 14:36:10 +01:00
Eugen Rochko
6d9f8ee11e Improve filtering of public/hashtag timelines, both in backlog and real-time 2016-11-10 00:03:33 +01:00
Eugen Rochko
a6667f7f58 Replace setting custom CORS headers with rack-cors, set it on /oauth/token endpoint 2016-11-09 18:06:01 +01:00
Eugen Rochko
beb36e24fe API pagination for all collections using Link header 2016-11-09 17:48:44 +01:00
Eugen Rochko
d98b43cf56 Move timelines API from statuses to its own controller, add a check for
resources that require a user context vs those that don't (such as public timeline)

/api/v1/statuses/public   -> /api/v1/timelines/public
/api/v1/statuses/home     -> /api/v1/timelines/home
/api/v1/statuses/mentions -> /api/v1/timelines/mentions
/api/v1/statuses/tag/:tag -> /api/v1/timelines/tag/:tag
2016-11-08 23:29:08 +01:00
Eugen Rochko
814907e870 Fix linking of remote hashtags in UI, add public view of hashtags 2016-11-05 17:44:14 +01:00
Eugen Rochko
cb22dce970 Adding hashtags 2016-11-05 17:13:14 +01:00
Eugen Rochko
082e57fc13 Adding hashtag model 2016-11-04 19:12:59 +01:00
Eugen Rochko
4c3885b952 Allow @username@domain/@username in follow form, prevent duplicate accounts
created via remote look-up when domains differ but point to the same resource
2016-11-03 16:57:44 +01:00
Eugen Rochko
7a527c947d Fix reblogged/favourited caching; add API endpoints for who favd/reblogged status 2016-11-03 14:50:22 +01:00
Eugen Rochko
695f62e49e Need to disable caching again due to bug in Rabl 2016-11-03 13:59:31 +01:00
Eugen Rochko
e7035a4d39 Make cookies https-only if LOCAL_HTTPS is true, set X-Frame-Options to DENY,
add permissive CORS to API controllers
2016-11-02 12:58:15 +01:00
Eugen Rochko
36470feeb2 Fix follow icon changing plus to minus, add terms page stub 2016-11-01 18:05:55 +01:00
Eugen Rochko
95e65d883a Limit returned followees/followers by API to 40 for now 2016-10-30 15:14:07 +01:00
Eugen Rochko
38cacac4b0 Adding common followers API, fixing fallback query again 2016-10-29 01:29:19 +02:00
Eugen Rochko
cab1211ef7 Fix OAuth authorization redirect 2016-10-23 12:05:55 +02:00
Eugen Rochko
6657414266 Adding OAuth access scopes, fixing OAuth authorization UI, adding rate limiting
to the API
2016-10-22 19:39:44 +02:00
Eugen Rochko
4470966cd9 Fix #100 - Add "back" button to certain views
Also fix reloading of timelines after merge-type events
2016-10-19 18:20:19 +02:00
Eugen Rochko
be98addccc Improving all forms 2016-10-18 16:37:15 +02:00
Eugen Rochko
683c42724f Added e-mail edit field to settings, proper format default for webfinger 2016-10-18 03:34:26 +02:00
Eugen Rochko
02613aef3b Adding application/jrd+json webfinger resource 2016-10-18 02:54:49 +02:00
Eugen Rochko
41aae40927 Fix #16 - Optimize n+1 queries when checking reblogged/favourited values for status lists in API 2016-10-16 19:10:16 +02:00
Eugen Rochko
5860094354 Adding sync of follow relationships to Neo4J, accounts/suggestions API 2016-10-14 23:10:07 +02:00
Eugen Rochko
588cb77e9f E-mail preferences page 2016-10-14 02:28:49 +02:00
Eugen Rochko
84495615b4 Shorten rendered links (strip protocol and www, truncate to 30 chars), redirect
to sign in page after sign up instead of root path which redirects to /about
2016-10-13 16:51:34 +02:00
Eugen Rochko
405f7f0541 No-op for Salmons without body, fail fast if Webfinger does not contain
all required resource links (profile page, salmon, atom feed, magic key)
2016-10-13 13:41:06 +02:00
Eugen Rochko
ad2a5cc79f Stop logging incoming Atom 2016-10-10 18:16:39 +02:00
Eugen Rochko
4f406d89b1 Log incoming Atom from PuSH 2016-10-10 17:40:28 +02:00
Eugen Rochko
102eab0ac9 Public timeline to exclude users you blocked 2016-10-09 15:15:21 +02:00
Eugen Rochko
9bf5a73968 Adding domain blocks 2016-10-09 14:48:59 +02:00
Eugen Rochko
c3f5dfeabb Adding public timeline 2016-10-07 16:00:11 +02:00
Eugen Rochko
93aa4085a2 Fix #73 - Click on in-UI profile avatar/name to open public profile 2016-10-06 23:15:50 +02:00
Eugen Rochko
10395fd275 Fix #72 - add follow/unfollow button to public profiles 2016-10-06 21:27:58 +02:00
Eugen Rochko
b23c4b488c Better comparison of "local" domain 2016-10-06 16:36:16 +02:00
Eugen Rochko
c02bdd64a0 Fix sign-in redirecting "back" to a missing image because missing static files hit the raise_not_found method 2016-10-06 15:42:00 +02:00
Eugen Rochko
96cc77ce55 Catch Paperclip errors on /api/v1/media, return early from update profile service if XML given is nil 2016-10-06 14:40:15 +02:00
Eugen Rochko
fe77921e47 Catching more exceptions that slipped through, removing AR logging from
production as it's very verbose and not very useful
2016-10-05 13:26:44 +02:00
Eugen Rochko
7b9a4af311 API for blocking and unblocking 2016-10-03 18:17:06 +02:00
Eugen Rochko
2c9e672ee2 Integrating block relationships into the API (read-only for now) 2016-10-03 17:16:58 +02:00
Eugen Rochko
9d59d7b463 Adding a block model and filter mentions from blocked users (fix #60) 2016-10-03 17:12:13 +02:00
Eugen Rochko
fc198a8b4c Adding e-mail confirmations 2016-10-03 16:51:00 +02:00
Eugen Rochko
188c6f326b Making public pages responsive, removing reblogs/favs counts from them 2016-10-03 00:26:00 +02:00
Eugen Rochko
9fd3d7b6cd Add since_id param to feeds 2016-10-02 22:35:27 +02:00
Eugen Rochko
a0f85774c4 Redirect after sign in to previous page (unless it's a sign in/up/etc page) 2016-10-02 17:11:08 +02:00
Eugen Rochko
6d7290f47c Add API for getting info about authenticated user: /api/v1/accounts/verify_credentials 2016-10-02 16:14:21 +02:00
Eugen Rochko
96ad9b0db1 Meaningful validation errors in API response 2016-09-30 22:31:16 +02:00
Eugen Rochko
62b057b085 Adjust client registration API 2016-09-30 00:03:08 +02:00
Eugen Rochko
ef2b50c9ac Deleting statuses from UI 2016-09-30 00:00:45 +02:00
Eugen Rochko
927333f4f8 Improve code style 2016-09-29 21:28:21 +02:00
Eugen Rochko
e63aebff7a Adding landing page 2016-09-27 23:12:33 +02:00
Eugen Rochko
4f9b7432dd Fix #52 - Add API versioning (v1) 2016-09-27 16:59:08 +02:00
Eugen Rochko
7e14eefc81 Replace logo, fix #57 - delete/unreblog/unfavourite API, fix #45 - app
registration API
2016-09-26 23:56:53 +02:00
Eugen Rochko
693383234c Improved style of settings page 2016-09-25 15:48:20 +02:00
Eugen Rochko
3f9708edc4 Change output of api/accounts/:id/follow and unfollow to return relationship
Track relationship in redux state. Display follow/unfollow and following-back
information on account view (unstyled)
2016-09-23 20:23:26 +02:00
Eugen Rochko
c6d893a71d Uploading/undoing media modifies status text. Also: status text trimmed before validation 2016-09-22 21:39:53 +02:00
Eugen Rochko
c0e9603c92 Fix #50 - Order ancestors/descendants by tree path 2016-09-21 23:18:28 +02:00
Eugen Rochko
e46abc71ca Fix notifications in UI, added new API for fetching account relationships 2016-09-21 22:07:18 +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
1d2856c2af Since GNU Social hubs don't seem to return a hub.lease_seconds param in the subscription confirmation request,
we'll have to default that value to the GS "minimum" (from their code) which is 24 hours.
2016-09-20 03:24:04 +02:00
Eugen Rochko
246330493b More debugging for PuSH confirmations 2016-09-20 03:18:55 +02:00
Eugen Rochko
a66d34878c Add more logging to PuSH callback 2016-09-20 03:12:23 +02:00
Eugen Rochko
608a2bfffc Upgrade to PubSubHubbub 0.4 (removing verify_token) 2016-09-20 02:43:20 +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