Commit Graph

282 Commits (750662d9e2e2276495e692825422f4326bbb6e80)

Author SHA1 Message Date
Eugen Rochko 1357c1cb3d Add single user mode
Eugen Rochko 39cc9fde8a Add account suspension
Eugen Rochko 9d9f796130 Adding more to admin accounts UI
Eugen Rochko d236dcded2 Fix public tags page
Eugen Rochko 5abf64d647 Add "next" pagination to public profiles
Eugen Rochko ec44cff9a2 Admin accounts page lists accounts
Eugen Rochko 816284d739 Fix - Reload all accounts when fetching from cache
Eugen Rochko 1d0321fc45 Fix pt translations, improve pre-cache queries, removing will_paginate
from accounts/tags because it's a terribly inefficient way to paginate
large sets of data
Eugen Rochko 6ff93845d5 Add basic OEmbed provider API, fix
Eugen Rochko 14bd46946d Per-status control for unlisted mode, also federation for unlisted mode
Fix , fix 
Eugen Rochko a21bcac9e1 Further abstract caching for includes
Eugen Rochko 356d3874eb Normalize localizations, add stub for admin/accounts
Eugen Rochko ff21ff1489 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
Eugen Rochko 7e90772c92 Unify collection caching code
Eugen Rochko 93a90cd9c3 Delete statuses asynchronously but provide instant feedback in the API
Eugen Rochko 3ba6531611 Fix setting of confirmed=true on successful confirmation
Eugen Rochko 27fc49d745 Add simple admin overview of PuSH subscriptions
Eugen Rochko 2d2c81765b Adding embedded PuSH server
Eugen Rochko 4495baf451 X-RateLimit-Reset formatted with iso8601
Eugen Rochko 8a3745a4df Remove stale entries from cache results
Eugen Rochko 71401659b8 Fix - Options to block notifications from people you don't follow/who don't follow you
Eugen Rochko 8efa081f21 Remove Neo4J
Eugen Rochko 8e34bed7cc Mini Profiler not working well, remove it
Alyssa Ross cefef2c571 Extract filename obfuscation into module
Andrea Faulds 7161f91313 Rename media to avoid exposing filename (fixes )
Eugen Rochko 79a0135869 Cache accounts/:id/statuses and single statuses too
Eugen Rochko 0603971894 Adding sensitive marker to statuses in API
Eugen Rochko 4bdb6a0eaf 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
Eugen Rochko cf912e01fd Implement includes caching for timelines APIs
Eugen Rochko 5c78547198 More query optimizations
Eugen Rochko fc90d38893 Moving some counter queries out of subqueries in the API
Eugen Rochko 45c7ee39b3 Remove unneeded indices, improve error handling in background workers, don't needlessly reload reblogged status, send Devise e-mails asynchronously
Eugen Rochko 1788164352 Local accounts can control "silenced" attribute which removes them from public timeline
Eugen Rochko 627a85f4e4 Better error message in doorkeeper json response
Eugen Rochko f88ca4a206 Performance improvement for notifications API
Eugen Rochko 52119104b9 Remove some n+1 queries from notifications API
Eugen Rochko e8c27767aa Remove orphaned notifications, add scopes param to app create API
Eugen Rochko fb48cc3b74 Desktop notifications
Eugen Rochko da2ef4d676 Adding unified streamable notifications
Eugen Rochko 7dea6a23f7 Move Salmon processing to background as well as PuSH
Eugen Rochko 2c766bd4b4 Add user locale setting
Eugen Rochko 3ce6ac0ce2 Adding some localizations
Eugen Rochko 4f07fb1f0a Fix - Filter statuses from blocked users out of ancestors/descendants results
Eugen Rochko fdc17bea58 Fix rubocop issues, introduce usage of frozen literal to improve performance
Eugen Rochko a91c3ef6ce Delegate processing of incoming PuSH data to background workers
Eugen Rochko cea28e0c1d Fix wrong link header on followers API, wrong link in tabs component, order
account results
Eugen Rochko afded319d2 Add limit to search results
Eugen Rochko 09218d4c01 Use full-text search for autosuggestions
Eugen Rochko 17903c6dae Improve filtering of public/hashtag timelines, both in backlog and real-time
Eugen Rochko 448ab18a20 Replace setting custom CORS headers with rack-cors, set it on /oauth/token endpoint
Eugen Rochko b13e7dda1f API pagination for all collections using Link header
Eugen Rochko 9aecc0f48a 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
Eugen Rochko a698b767c1 Fix linking of remote hashtags in UI, add public view of hashtags
Eugen Rochko 48b9619439 Adding hashtags
Eugen Rochko 62292797ec Adding hashtag model
Eugen Rochko 3731230c6d Allow @username@domain/@username in follow form, prevent duplicate accounts
created via remote look-up when domains differ but point to the same resource
Eugen Rochko e4671adc25 Fix reblogged/favourited caching; add API endpoints for who favd/reblogged status
Eugen Rochko 562044f36a Need to disable caching again due to bug in Rabl
Eugen Rochko 9467b900a2 Make cookies https-only if LOCAL_HTTPS is true, set X-Frame-Options to DENY,
add permissive CORS to API controllers
Eugen Rochko dd03118098 Fix follow icon changing plus to minus, add terms page stub
Eugen Rochko fa1cc2d05a Limit returned followees/followers by API to 40 for now
Eugen Rochko e0a197650a Adding common followers API, fixing fallback query again
Eugen Rochko b746a931a5 Fix OAuth authorization redirect
Eugen Rochko a9e40a3d80 Adding OAuth access scopes, fixing OAuth authorization UI, adding rate limiting
to the API
Eugen Rochko 04bbc57690 Fix - Add "back" button to certain views
Also fix reloading of timelines after merge-type events
Eugen Rochko 43df35213e Improving all forms
Eugen Rochko 2e0a38d07c Added e-mail edit field to settings, proper format default for webfinger
Eugen Rochko d5e086a47b Adding application/jrd+json webfinger resource
Eugen Rochko de1f3aab86 Fix - Optimize n+1 queries when checking reblogged/favourited values for status lists in API
Eugen Rochko e21a3fe0cd Adding sync of follow relationships to Neo4J, accounts/suggestions API
Eugen Rochko 7a6d95f70c E-mail preferences page
Eugen Rochko 33f7e1cf99 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
Eugen Rochko 157f03f8bd No-op for Salmons without body, fail fast if Webfinger does not contain
all required resource links (profile page, salmon, atom feed, magic key)
Eugen Rochko 68eed8c61f Stop logging incoming Atom
Eugen Rochko f49ed8c819 Log incoming Atom from PuSH
Eugen Rochko 427ba27641 Public timeline to exclude users you blocked
Eugen Rochko 22a8801dbc Adding domain blocks
Eugen Rochko 1f650d327d Adding public timeline
Eugen Rochko 943c69c65d Fix - Click on in-UI profile avatar/name to open public profile
Eugen Rochko 3554d638b3 Fix - add follow/unfollow button to public profiles
Eugen Rochko 15d01a5e08 Better comparison of "local" domain
Eugen Rochko b60430fe8f Fix sign-in redirecting "back" to a missing image because missing static files hit the raise_not_found method
Eugen Rochko 2f5b205916 Catch Paperclip errors on /api/v1/media, return early from update profile service if XML given is nil
Eugen Rochko fe77921e47 Catching more exceptions that slipped through, removing AR logging from
production as it's very verbose and not very useful
Eugen Rochko 7b9a4af311 API for blocking and unblocking
Eugen Rochko 2c9e672ee2 Integrating block relationships into the API (read-only for now)
Eugen Rochko 9d59d7b463 Adding a block model and filter mentions from blocked users (fix )
Eugen Rochko fc198a8b4c Adding e-mail confirmations
Eugen Rochko 188c6f326b Making public pages responsive, removing reblogs/favs counts from them
Eugen Rochko 9fd3d7b6cd Add since_id param to feeds
Eugen Rochko a0f85774c4 Redirect after sign in to previous page (unless it's a sign in/up/etc page)
Eugen Rochko 6d7290f47c Add API for getting info about authenticated user: /api/v1/accounts/verify_credentials
Eugen Rochko 96ad9b0db1 Meaningful validation errors in API response
Eugen Rochko 62b057b085 Adjust client registration API
Eugen Rochko ef2b50c9ac Deleting statuses from UI
Eugen Rochko 927333f4f8 Improve code style
Eugen Rochko e63aebff7a Adding landing page
Eugen Rochko 4f9b7432dd Fix - Add API versioning (v1)
Eugen Rochko 7e14eefc81 Replace logo, fix - delete/unreblog/unfavourite API, fix - app
registration API
Eugen Rochko 693383234c Improved style of settings page
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)
Eugen Rochko c6d893a71d Uploading/undoing media modifies status text. Also: status text trimmed before validation
Eugen Rochko c0e9603c92 Fix - Order ancestors/descendants by tree path
Eugen Rochko e46abc71ca Fix notifications in UI, added new API for fetching account relationships
Eugen Rochko 4bec613897 Fix - 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.
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.
Eugen Rochko 246330493b More debugging for PuSH confirmations
Eugen Rochko a66d34878c Add more logging to PuSH callback
Eugen Rochko 608a2bfffc Upgrade to PubSubHubbub 0.4 (removing verify_token)
Eugen Rochko 059ebbf48d Separate PuSH subscriptions from following, add mastodon:push:refresh task,
respect hub.lease_seconds (fix )
Eugen Rochko adffc7a495 Fix
Eugen Rochko bd5ad304ba Adding media controller, 1 webm/compose form allowed, previews generated
Eugen Rochko 0e9c1a297a Improved error handling for FollowRemoteService
Eugen Rochko 8c0b19012b Fix , debug
Eugen Rochko 5b0cef9781 Setting up preliminary "detailed" routes in the UI, new API end-point for fetching status context
Eugen Rochko d6a64f45fd Adding a notification stack for error messages
Eugen Rochko 762157ee4e Fix for single status pages
Eugen Rochko 85d89b472d Optimized n+1 queries in accounts Atom and HTML views
Added stack trace for SQL queries in development
Removed badly thought out accounts/lookup API
Eugen Rochko 509c18eb13 Fix local follows, 404 in logs
Eugen Rochko 0f4bc56719 Improving production logs, removing n+1 on media attachments in atom,
adding attachments display to static views
Eugen Rochko eec0dc46a6 PostStatusService can attach media to status, ProcessFeedService likewise
Eugen Rochko ae1fac0062 Add API to upload media attachments
Eugen Rochko b5ebf99439 Possibly fix issue with stale favourite/reblog information after API call
Eugen Rochko 54ea7f5dfe Case-insensitive search by usernames
Eugen Rochko 92afd29650 The frontend will now be an OAuth app, auto-authorized. The frontend will use an access token for API requests
Adding better errors for the API controllers, posting a simple status works from the frontend now
Eugen Rochko bc0692d75b Removing mini-profiler that doesn't work, formatting timelines a bit better
Eugen Rochko 49520d6e62 Adding React.js, Redux, revamping dashboard
Eugen Rochko 8985f8e66c Fixing more configuration issues with ActionCable
Eugen Rochko 8459acd123 Fix for force SSL issue with websockets
Eugen Rochko 6426819b6f Fix tests
Eugen Rochko 6deb9f966e Live timelines using ActionCable
Eugen Rochko 10ba09f546 Upgrade to Rails 5.0.0.1
Eugen Rochko ff2cbc0753 Remember me enabled by default
Eugen Rochko 85b00d19b8 Moving Salmon notifications to background processing, fixing mini-profiler
behaviour with Turbolinks enabled, optimizing Rabl for production
Eugen Rochko da4b675aca Fix favourite handling in ProcessInteractionService
Eugen Rochko 43bb8a25e7 Remember user logins by default
Eugen Rochko 5764d52b04 Fix Sidekiq pooling issues. Remove API docs from homepage, replace with
a basic home timeline
Eugen Rochko e24bfbde1a Fixing FanOutOnWriteService, fixing Sidekiq not having enough DB connections
in the pool, adding a throttle of 60rpm per IP, adding mini profiler, adding
admin status to users
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
Eugen Rochko 9594f0e858 Fix preloading
Eugen Rochko 0f5bbb999c Pre-loading polymorphic associations for Atom feeds
Eugen Rochko 7e58303a8d Limit Atom feeds to 20 items by default, add pagination by max_id
(But there are no Atom feed pagination elements yet)
Eugen Rochko 082e1cbe5a Fix default max_id query in paginate_by_max_id
Eugen Rochko 12559b01ea Add pagination by max_id instead of offset/limit
Eugen Rochko f14f462eaf Adding Turbolinks, adding status posting form on homepage
Eugen Rochko c28971c70c Fixed the lookup API method
Eugen Rochko 02696a063e Change default avatar, redirect to home after sign up
Eugen Rochko 9d55529318 Fix text color in dashboard inputs, sanitize remote status content in UI,
simplify FanOutOnWriteService, add /api/accounts/lookup method
Eugen Rochko 7e00a21ea6 Small optimizations in Atom feeds
Eugen Rochko 19a259915e Security update