about summary refs log tree commit diff
path: root/app/views/api
AgeCommit message (Collapse)Author
2017-07-15Improve ActivityPub representations (#3844)Eugen Rochko
* Improve webfinger templates and make tests more flexible * Clean up AS2 representation of actor * Refactor outbox * Create activities representation * Add representations of followers/following collections, do not redirect /users/:username route if format is empty * Remove unused translations * ActivityPub endpoint for single statuses, add ActivityPub::TagManager for better URL/URI generation * Add ActivityPub::TagManager#to * Represent all attachments as Document instead of Image/Video specifically (Because for remote ones we may not know for sure) Add mentions and hashtags representation to AP notes * Add AP-resolvable hashtag URIs * Use ActiveModelSerializers for ActivityPub * Clean up unused translations * Separate route for object and activity * Adjust cc/to matrices * Add to/cc to activities, ensure announce activity embeds target status and not the wrapper status, add "id" to all collections
2017-07-08Replace OEmbed and initial state Rabl templates with serializers (#4110)Eugen Rochko
* Replace OEmbed Rabl template with serializer * Replace initial state rabl with serializer
2017-07-07Refactor JSON templates to be generated with ActiveModelSerializers instead ↵Eugen Rochko
of Rabl (#4090)
2017-06-05Add streaming_api_base_url to /api/v1/instance (#3556)IkUrA
* Add streaming_api_base_url to /api/v1/instance * Adjust spaces * nested view * re-adjust spaces
2017-05-31Spec coverage and refactor for the api/v1/accounts controllers (#3451)Matt Jankowski
2017-05-31Misc tidying and clean ups (#3445)Matt Jankowski
* Remove trailing whitespace in i18n mailers * Use query methods instead of #present? on AR attributes * Delegate Status#account_domain method * Delegate Mention #account_username and #account_acct methods
2017-05-31Refactor and spec coverage for api/v1/timelines actions (#3482)Matt Jankowski
2017-05-26Add "meta" attribute to return of POST /api/v1/media method as well (#3333)Eugen Rochko
2017-05-23Refactor of API timeline actions (#3263)Matt Jankowski
- Increase coverage to exercise all parts of each action - Move into namespace to share common code - Misc refactor of each action for smaller methods, simpler code
2017-05-21Fix forgotten to include language attribute in statuses JSON (#3209)Eugen Rochko
2017-05-19Add buttons to block and unblock domain (#3127)Eugen Rochko
* Add buttons to block and unblock domain * Relationship API now returns "domain_blocking" status for accounts, rename "block entire domain" to "hide entire domain", fix unblocking domain, do not block notifications from domain-blocked-but-followed people, do not send Salmons to domain blocked users * Add test * Personal domain blocks shouldn't affect Salmon after all, since in this direction of communication the control is very thin when it comes to public stuff. Best stay consistent and not affect federation in this way * Ignore followers and follow request from domain blocked folks, ensure account domain blocks are not created for empty domain, and avoid duplicates in validation * Purge followers when blocking domain (without soft-blocks, since they are useless here) * Add tests, fix local timeline being empty when having any domain blocks
2017-05-15Feature conversations muting (#3017)Eugen Rochko
* Add <ostatus:conversation /> tag to Atom input/output Only uses ref attribute (not href) because href would be the alternate link that's always included also. Creates new conversation for every non-reply status. Carries over conversation for every reply. Keeps remote URIs verbatim, generates local URIs on the fly like the rest of them. * Conversation muting - prevents notifications that reference a conversation (including replies, favourites, reblogs) from being created. API endpoints /api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute Currently no way to tell when a status/conversation is muted, so the web UI only has a "disable notifications" button, doesn't work as a toggle * Display "Dismiss notifications" on all statuses in notifications column, not just own * Add "muted" as a boolean attribute on statuses JSON For now always false on contained reblogs, since it's only relevant for statuses returned from the notifications endpoint, which are not nested Remove "Disable notifications" from detailed status view, since it's only relevant in the notifications column * Up max class length * Remove pending test for conversation mute * Add tests, clean up * Rename to "mute conversation" and "unmute conversation" * Raise validation error when trying to mute/unmute status without conversation
2017-05-13Revert HTML CW changes (#3020)beatrix
* selectively Revert "Fix regressions from #2683 (#2970)" This reverts commit 72698bc3b49925a2b2955f32e5a562c1eecd729b. * Revert "Handle hashtags in spoiler_texts (partial fix for #699) (#2683)" This reverts commit e2491680e696d2c285a798ec4c66b26d2748df66.
2017-05-11Fix regressions from #2683 (#2970)Eugen Rochko
* Fix regressions from #2683 Properly format spoiler text HTML, while keeping old logic for blankness intact Process hashtags and mentions in spoiler text Format spoiler text for Atom Change "show more" toggle into a button instead of anchor Fix style regression on dropdowns for detailed statuses * Fix lint issue * Convert spoiler text to plaintext in desktop notifications
2017-04-28Fix API for Mastodon version (#2590)Yamagishi Kazutoshi
Fix #2589
2017-04-27Bump version, improve how version is stored for better commit history (#2526)Eugen Rochko
2017-04-27OEmbed support for PreviewCard (#2337)Eugen Rochko
* OEmbed support for PreviewCard * Improve ProviderDiscovery code failure treatment * Do not crawl links if there is a content warning, since those don't display a link card anyway * Reset db schema * Fresh migrate * Fix rubocop style issues Fix #1681 - return existing access token when applicable instead of creating new * Fix test * Extract http client to helper * Improve oembed controller
2017-04-26Add media dimensions (#2448)Francis Chong
* Fixes #1985 - add migration AddMediaAttachmentMeta, which add meta field to media_attachments - before saving attachment, set file meta if needed - add meta in api * add spec * align the “size” format for image and video * fix code climate * fixes media_attachment_spec.rb
2017-04-25Change ActivityPub paging to match spec. Clean up ActivityPub outbox ↵Evan Minto
changes. (#2410) * Change ActivityPub paging to match spec. Clean up ActivityPub outbox changes. * Fix code style and test failures for OutboxController. * Attempt to fix CI errors.
2017-04-23ActivityPub: Add basic, read-only support for Outboxes, Notes, and ↵Evan Minto
Create/Announce Activities (#2197) * Clean up collapsible components * Expose user Outboxes and AS2 representations of statuses * Save work thus far. * Fix bad merge. * Save my work * Clean up pagination. * First test working. * Add tests. * Add Forbidden error template. * Revert yarn.lock changes. * Fix code style deviations and use localized instead of hardcoded English text.
2017-04-21Adds version to about/more and API (#2181)Ash Furrow
* Adds version. * Cleans up code. * Removes standalone endpoint and adds version to instance endpoint. * Addresses feedback from #2181.
2017-04-18Instance helper to replace site title helper (#2038)Matt Jankowski
* Move site title helper to instance helper (name change only) * Remove newline in <title> tag * Add site_hostname helper method to wrap up local_domain value * Use site_hostname helper in places that need local_domain value
2017-04-17Fix #1972, fix #1870 - Fix special characters in XML, add tests (#1988)Eugen
Also improve efficiency of the mastodon:maintenance:add_static_avatars task
2017-04-16Make file attachment on MediaAttachment optional (#1865)Eugen
Create MediaAttachment but without actual file download when domain is blocked with reject_media set to true Clean up old media files when creating a new domain block with reject_media set to true Return remote_url in media attachments API if local file is not present Undo domain block action in admin UI Ability to enable reject_media from admin UI
2017-04-11When avatar/header are GIF, generate static versions (#1428)Eugen
* When avatar/header are GIF, generate static versions. Account API returns "avatar"/"avatar_static", "header"/"header_static" Static version is the same as original for other cases Web UI de-animates avatars in toots, lists of users Fix #441, fix #596, prerequisite for #1064 * Fix JS test * Add rake task to generate static avatars/headers from GIF ones, add test
2017-03-31Fix some views still not using counter cachesEugen Rochko
2017-03-30Add counter caches for a large performance increase on API requestsEugen Rochko
2017-03-28Fix #690 - Webfinger should handle new shortform profile URLs now (nice)Eugen Rochko
2017-03-24Fix #675 - return created_at in notifications APIEugen Rochko
2017-03-22Web UI support for the new omnisearchEugen Rochko
2017-03-22New API method: /api/v1/searchEugen Rochko
Returns accounts, statuses, hashtags arrays
2017-03-15Fix #525 - Add instance information APIEugen Rochko
2017-03-15Merge branch 'master' into mastodon-site-apiEugen
2017-03-04Fix #431 - convert gif to webm during upload. Web UI treats them like it didEugen Rochko
before. In the API, attachments now can be either image, video or gifv. Gifv is to be treated like images in terms of behaviour, but are videos by file type.
2017-03-01Mute button progress so far. WIP, doesn't entirely work correctly.Kit Redgrave
2017-02-27Adds site metadata access to the APIKibigo
2017-02-14Adding POST /api/v1/reports API, and a UI for submitting reportsEugen Rochko
2017-02-05Fix #552 - Replace image links with image icons in status text in the UIEugen Rochko
2017-02-05No replies filter on home timeline no longer hides self-repliesEugen Rochko
2017-02-04untested!! spoiler hotfix for replieshoodie
untested, my vagrant is bugged again, submitted at gargron's request
2017-01-25Instead of using spoiler boolean and spoiler_text, simply check for ↵Eugen Rochko
non-blank spoiler_text Federate spoiler_text using warning attribute on <content /> instead of a <category term="spoiler" /> Clean up schema file from accidental development migrations
2017-01-23Implement a click-to-view spoiler systemblackle
2017-01-20Fix #463 - Fetch and display previews of URLs using OpenGraph tagsEugen Rochko
2017-01-15Fix tests, add applications to eager loading/cache for statuses, fixEugen Rochko
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
2017-01-15Add tracking of OAuth app that posted a status, extend OAuth apps to have ↵Effy Elden
optional website field, add application details to API, show application name and website on detailed status views. Resolves #11
2016-12-29Add API for retrieving favouritesEugen Rochko
2016-12-29Add API for retrieving blocked accountsEugen Rochko
2016-12-26Adding follow requests APIEugen Rochko
2016-12-22Follow call on locked account creates follow request insteadEugen Rochko
Reflect "requested" relationship in API and UI Reflect inability of private posts to be reblogged in the UI Disable Webfinger for locked accounts
2016-12-21Private visibility on statuses prevents non-followers from seeing thoseEugen Rochko
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