Commit Graph

52 Commits (a6807201d2003fc0d544813ba67cfe315d829e06)

Author SHA1 Message Date
Matt Jankowski b155e6ccf5 Fix issue with intermittent api/v1/notifications failure (#1606)
The spec was checking the activity_id of the activities held in notifications
within the controller.

Because the activities are different models, it is possible that they are
created with the same database IDs, and when they are this spec fails because an
activity which should not count as a match is counted as one.
8 years ago
Eugen 2810013b93 API param to exclude notification types from response (#1341)
* Add exclude_types param to /api/v1/notifications

* Exclude notification types in web UI through exclude_types in the API
8 years ago
Eugen 15d442cf9d Fix /api/v1/accounts/update_credentials tests (#1357) 8 years ago
David Celis d4fe6cd2bf Allow users to update their Account in the API (#1179)
* Allow users to update their Account in the API

It would be nice for API clients to be able to allow users to update
their accounts without having to wrap Mastodon in a web view. This patch
adds an API endpoint to let users submit a PATCH for their account.

Signed-off-by: David Celis <me@davidcel.is>

* Add /api/v1/accounts/update_credentials to the API docs

Signed-off-by: David Celis <me@davidcel.is>
8 years ago
Eugen Rochko d6ed2eb512 Prettier account and stream entry URLs 8 years ago
Kit Redgrave 442fdbfc53 Mute button progress so far. WIP, doesn't entirely work correctly. 8 years ago
Eugen Rochko 00b5731ecb After FollowService, re-fetch remote account asynchronously, do nothing
if account lock info was up to date, otherwise re-do the FollowService
with now updated information
8 years ago
Eugen Rochko 77e13c2bc9 Removing failed push notification API, make context loads use cache 8 years ago
Eugen Rochko d9ca46b464 Cleaning up format of broadcast real-time messages, removing
redis-backed "mentions" timeline as redundant (given notifications)
8 years ago
Eugen Rochko e70e721a0d Add tests for new API 8 years ago
Eugen Rochko 7c015ece45 Fix oembed controller test 8 years ago
Eugen Rochko e9737c2235 Fix tests, add applications to eager loading/cache for statuses, fix
application website validation, don't link to app website if website isn't set,
also comment out animated boost icon from #464 until it's consistent with non-animated version
8 years ago
Eugen Rochko a302e56f9a Add API for retrieving favourites 8 years ago
Eugen Rochko 49834a6e7f Add API for retrieving blocked accounts 8 years ago
Eugen Rochko 004382e4d0 Adding follow requests API 8 years ago
Eugen Rochko 7376af90f7 Don't show statuses to blocked users 8 years ago
Eugen Rochko 80e02b90e4 Private visibility on statuses prevents non-followers from seeing those
Filters out hidden stream entries from Atom feed
Blocks now generate hidden stream entries, can be used to federate blocks
Private statuses cannot be reblogged (generates generic 422 error for now)
POST /api/v1/statuses now takes visibility=(public|unlisted|private) param instead of unlisted boolean
Statuses JSON now contains visibility=(public|unlisted|private) field
8 years ago
Eugen Rochko 6de079a5af Removing external hub completely, fix #333 fixing digit-only hashtags,
removing web app capability from non-webapp pages
8 years ago
Eugen Rochko f978b06dd1 Add suspend account functionality to admin UI 8 years ago
Eugen Rochko 6ff93845d5 Add basic OEmbed provider API, fix #247 8 years ago
Eugen Rochko 2d2c81765b Adding embedded PuSH server 8 years ago
Eugen Rochko 2cb3dc5e5a Update hub URL and re-subscribe if hub URL changes 8 years ago
Eugen Rochko 8efa081f21 Remove Neo4J 8 years ago
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
8 years ago
Eugen Rochko 48b9619439 Adding hashtags 8 years ago
Eugen Rochko 829d189f44 Add tests for recently added API end points 8 years ago
Eugen Rochko 1f650d327d Adding public timeline 8 years ago
Eugen Rochko 7b9a4af311 API for blocking and unblocking 8 years ago
Eugen Rochko 6d7290f47c Add API for getting info about authenticated user: /api/v1/accounts/verify_credentials 8 years ago
Eugen Rochko b36197c307 Fix tests, update goldfinger to catch XML errors 8 years ago
Eugen Rochko 4f9b7432dd Fix #52 - Add API versioning (v1) 8 years ago
Eugen Rochko 7e14eefc81 Replace logo, fix #57 - delete/unreblog/unfavourite API, fix #45 - app
registration API
8 years ago
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.
8 years ago
Eugen Rochko e46abc71ca Fix notifications in UI, added new API for fetching account relationships 8 years ago
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.
8 years ago
Eugen Rochko 608a2bfffc Upgrade to PubSubHubbub 0.4 (removing verify_token) 8 years ago
Eugen Rochko 4f25e3d042 Test case for new api endpoint 8 years ago
Eugen Rochko ce29624c6d Fixing image upload limits, allowing webm, merge/unmerge events trigger
timeline reload in UI, other small fixes
8 years ago
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
8 years ago
Eugen Rochko 509c18eb13 Fix local follows, 404 in logs 8 years ago
Eugen Rochko 87576e1ab1 Fixing atom feeds for accounts, adding tests that would catch such bugs in future 8 years ago
Eugen Rochko ae1fac0062 Add API to upload media attachments 8 years ago
Eugen Rochko 413e700fe0 Enhancing test suite but I think the problem might have been caching setting 8 years ago
Eugen Rochko 8985f8e66c Fixing more configuration issues with ActionCable 8 years ago
Eugen Rochko 10ba09f546 Upgrade to Rails 5.0.0.1 8 years ago
Eugen Rochko c28971c70c Fixed the lookup API method 9 years ago
Eugen Rochko 9d55529318 Fix text color in dashboard inputs, sanitize remote status content in UI,
simplify FanOutOnWriteService, add /api/accounts/lookup method
9 years ago
Eugen Rochko 35aafdba96 Ancestors and descendants of statuses 9 years ago
Eugen Rochko b640f35621 Writing out more tests, fixed some bugs 9 years ago
Eugen Rochko d4892ace62 Adding more test stubs 9 years ago