about summary refs log tree commit diff
path: root/spec
AgeCommit message (Collapse)Author
2017-09-23Add emoji autosuggest (#5053)Eugen Rochko
* Add emoji autosuggest Some credit goes to glitch-soc/mastodon#149 * Remove server-side shortcode->unicode conversion * Insert shortcode when suggestion is custom emoji * Remove remnant of server-side emojis * Update style of autosuggestions * Fix wrong emoji filenames generated in autosuggest item * Do not lazy load emoji picker, as that no longer works * Fix custom emoji autosuggest * Fix multiple "Custom" categories getting added to emoji index, only add once
2017-09-23New API: GET /api/v1/custom_emojis to get a server's custom emojis (#5051)Eugen Rochko
2017-09-23Switch from EmojiOne to Twemoji, different emoji picker (#5046)Eugen Rochko
* Switch from EmojiOne to Twemoji, different emoji picker * Make emoji-mart use a local spritesheet * Fix emojify test * yarn manage:translations
2017-09-22Do not filter statuses with unknown languages (#5045)Akihiko Odaki
2017-09-22Make dropdowns render into portal, expand animation (#5018)Eugen Rochko
* Make dropdowns render into portal, expand animation * Improve actions modal style
2017-09-20Change IDs to strings rather than numbers in API JSON output (#5019)aschmitz
* Fix JavaScript interface with long IDs Somewhat predictably, the JS interface handled IDs as numbers, which in JS are IEEE double-precision floats. This loses some precision when working with numbers as large as those generated by the new ID scheme, so we instead handle them here as strings. This is relatively simple, and doesn't appear to have caused any problems, but should definitely be tested more thoroughly than the built-in tests. Several days of use appear to support this working properly. BREAKING CHANGE: The major(!) change here is that IDs are now returned as strings by the REST endpoints, rather than as integers. In practice, relatively few changes were required to make the existing JS UI work with this change, but it will likely hit API clients pretty hard: it's an entirely different type to consume. (The one API client I tested, Tusky, handles this with no problems, however.) Twitter ran into this issue when introducing Snowflake IDs, and decided to instead introduce an `id_str` field in JSON responses. I have opted to *not* do that, and instead force all IDs to 64-bit integers represented by strings in one go. (I believe Twitter exacerbated their problem by rolling out the changes three times: once for statuses, once for DMs, and once for user IDs, as well as by leaving an integer ID value in JSON. As they said, "If you’re using the `id` field with JSON in a Javascript-related language, there is a very high likelihood that the integers will be silently munged by Javascript interpreters. In most cases, this will result in behavior such as being unable to load or delete a specific direct message, because the ID you're sending to the API is different than the actual identifier associated with the message." [1]) However, given that this is a significant change for API users, alternatives or a transition time may be appropriate. 1: https://blog.twitter.com/developer/en_us/a/2011/direct-messages-going-snowflake-on-sep-30-2011.html * Additional fixes for stringified IDs in JSON These should be the last two. These were identified using eslint to try to identify any plain casts to JavaScript numbers. (Some such casts are legitimate, but these were not.) Adding the following to .eslintrc.yml will identify casts to numbers: ~~~ no-restricted-syntax: - warn - selector: UnaryExpression[operator='+'] > :not(Literal) message: Avoid the use of unary + - selector: CallExpression[callee.name='Number'] message: Casting with Number() may coerce string IDs to numbers ~~~ The remaining three casts appear legitimate: two casts to array indices, one in a server to turn an environment variable into a number. * Back out RelationshipsController Change This was made to make a test a bit less flakey, but has nothing to do with this branch. * Change internal streaming payloads to stringified IDs as well Per https://github.com/tootsuite/mastodon/pull/5019#issuecomment-330736452 we need these changes to send deleted status IDs as strings, not integers.
2017-09-19Introduce OStatus::TagManager (#5008)Akihiko Odaki
2017-09-19Custom emoji (#4988)Eugen Rochko
* Custom emoji - In OStatus: `<link rel="emoji" name="coolcat" href="http://..." />` - In ActivityPub: `{ type: "Emoji", name: ":coolcat:", href: "http://..." }` - In REST API: Status object includes `emojis` array (`shortcode`, `url`) - Domain blocks with reject media stop emojis - Emoji file up to 50KB - Web UI handles custom emojis - Static pages render custom emojis as `<img />` tags Side effects: - Undo #4500 optimization, as I needed to modify it to restore shortcode handling in emojify() - Formatter#plaintext should now make sure stripped out line-breaks and paragraphs are replaced with newlines * Fix emoji at the start not being converted
2017-09-17Validate uri presence for remote status (#4985)unarist
2017-09-17Fix an error when actor json couldn't be fetched in ↵unarist
ResolveRemoteAccountService (#4979) * Fix an error when actor json couldn't be fetched in ResolveRemoteAccountService * Add specs
2017-09-17Remove local_only scope in Status (#4977)Akihiko Odaki
2017-09-16Escape URL parts on formatting local status (#4975)unarist
2017-09-16Fix filterable_languages method of SettingsHelper (#4966)Akihiko Odaki
2017-09-15When web UI URL used while logged out, redirect to static page (#4954)Eugen Rochko
2017-09-14Enable to recognize most kinds of characters as URL paths (#4941)ふぁぼ原
2017-09-14Uploads for admin site settings (#4913)Eugen Rochko
* Improve OpenGraph tags for about pages * Add thumbnail admin setting * Fix error * Fix up
2017-09-13Fix ActivityPub handling of replies with WEB_DOMAIN (#4895) (#4904)ThibG
* Fix ActivityPub handling of replies when LOCAL_DOMAIN ≠ WEB_DOMAIN (#4895) For all intents and purposes, `local_url?` is used to check if an URL refers to the Web UI or the various API endpoints of the local instances. Those things reside on `WEB_DOMAIN` and not `LOCAL_DOMAIN`. * Change local_url? spec, as all URLs handled by Mastodon are based on WEB_DOMAIN
2017-09-12Clean up and improve generated OpenGraph tags (#4901)Eugen Rochko
- Return all images as og:image - Return videos as og:image (preview) and og:video - Return profile:username on profiles
2017-09-11Fix error when following locked accounts (#4896)Eugen Rochko
2017-09-10Fix POST /api/v1/follows error when already following (#4878)Eugen Rochko
2017-09-10Default follows for new users (#4871)Eugen Rochko
When a new user confirms their e-mail, bootstrap their home timeline by automatically following a set of accounts. By default, all local admin accounts (that are unlocked). Can be customized by new admin setting (comma-separated usernames, local and unlocked only)
2017-09-09Fix errors preventing UnsubscribeService from working (#4866)Eugen Rochko
2017-09-08Handle stream_entry URL correctly in ActivityPub (#4854)unarist
In before, the method uses stream_entry id as status id, so replied status was wrongly selected. This PR uses StatusFinder which was introduced with `Api::Web::EmbedsController`.
2017-09-08Fix language filter codes (#4841)Eugen Rochko
* Fix language filter codes CLD3 returns BCP-47 language identifier, filter settings expect identifiers in the ISO 639-1 format. Convert between formats, and exclude duplicate languages from filter choices (zh-CN->zh) * Fix zh name
2017-09-08Fetch statuses/following/followers numbers from ActivityPub collections (#4840)Eugen Rochko
2017-09-07Feat add validation for report comment: characters under 1000 valid (#4833)voidSatisfaction
2017-09-06Switch to static URIs, new URI format in both protocols for new statuses (#4815)Eugen Rochko
* Decouple Status#local? from uri being nil * Replace on-the-fly URI generation with stored URIs - Generate URI in after_save hook for local statuses - Use static value in TagManager when available, fallback to tag format - Make TagManager use ActivityPub::TagManager to understand new format - Adjust tests * Use other heuristic for locality of old statuses, do not perform long query * Exclude tombstone stream entries from Atom feed * Prevent nil statuses from landing in Pubsubhubbub::DistributionWorker * Fix URI not being saved (#4818) * Add more specs for Status * Save generated uri immediately and also fix method order to minimize diff. * Fix alternate HTML URL in Atom * Fix tests * Remove not-null constraint from statuses migration to speed it up
2017-09-05Fix #4794 - Fake instant follow in API response when account is believed ↵Eugen Rochko
unlocked (#4799)
2017-09-04Show pinned statuses only in the top of the profile page (#4803)nullkal
* Show pinned statuses only in the top of the profile page * Refactor AccountsController#show_pinned_statuses?
2017-09-02Validate data of Imports (#4782)abcang
2017-09-02Raise an error for remote url in StatusFinder (#4776)unarist
* Raise an error for remote url in StatusFinder Previous implementation had allowed remote url with status id which also exists on local. Then that bug leads /api/web/embed to return wrong embed url. * Fix oembed_controller_spec
2017-09-01Make PreviewCard records reuseable between statuses (#4642)Eugen Rochko
* Make PreviewCard records reuseable between statuses **Warning!** Migration truncates preview_cards tablec * Allow a wider thumbnail for link preview, display it in horizontal layout (#4648) * Delete preview cards files before truncating * Rename old table instead of truncating it * Add mastodon:maintenance:remove_deprecated_preview_cards * Ignore deprecated_preview_cards in schema definition * Fix null behaviour
2017-08-31Remove identity context from output of LinkedDataSignature (#4753)Eugen Rochko
2017-08-31Don't process ActivityPub payload if signature is invalid (#4752)unarist
* Don't process ActivityPub payload if signature is invalid * Fix style issue
2017-08-30Forward ActivityPub creates that reply to local statuses (#4709)Eugen Rochko
* Forward ActivityPub creates that reply to local statuses * Fix test * Fix wrong signers
2017-08-30Update status embeds (#4742)Eugen Rochko
- Use statuses controller for embeds instead of stream entries controller - Prefer /@:username/:id/embed URL for embeds - Use /@:username as author_url in OEmbed - Add follow link to embeds which opens web intent in new window - Use redis cache in development - Cache entire embed
2017-08-29Serialize ActivityPub alternate link into OStatus deletes, handle it (#4730)Eugen Rochko
Requires moving Atom rendering from DistributionWorker (where `stream_entry.status` is already nil) to inline (where `stream_entry.status.destroyed?` is true) and distributing that. Unfortunately, such XML renderings can no longer be easily chained together into one payload of n items.
2017-08-28Fix Delete activity handling when the status has been reblogged (#4729)unarist
2017-08-28Fix deletion of status which has been reblogged (#4728)unarist
2017-08-28rescue HTTP::ConnectionError in RemoteFollowController#create (#4726)abcang
2017-08-26Add handling of Linked Data Signatures in payloads (#4687)Eugen Rochko
* Add handling of Linked Data Signatures in payloads * Add a way to sign JSON, fix canonicalization of signature options * Fix signatureValue encoding, send out signed JSON when distributing * Add missing security context
2017-08-25Allow multiple pinned statuses to be shown and make them be ordered b… (#4690)nullkal
* Allow multiple pinned statuses to be shown and make them be ordered by pinned date * Set timestamps NOT NULL * Make single-line pinned_statuses * Spec for pinned_statuses * Remove redundant empty line
2017-08-25Pinned statuses (#4675)Eugen Rochko
* Pinned statuses * yarn manage:translations
2017-08-24Add configuration to disable private status federation over PuSH (#4582)Eugen Rochko
2017-08-24Fetch reblogs as Announce activity instead of Note object (#4672)unarist
* Process Create / Announce activity in FetchRemoteStatusService * Use activity URL in ActivityPub for reblogs * Redirect to the original status on StatusesController#show
2017-08-24Minor performance improvement for test suite (#4678)Eugen Rochko
2017-08-23Use checkboxes for application scope setting (#4671)nullkal
2017-08-23Fix up the applications area (#4664)Eugen Rochko
- Section it into "Development" area - Improve UI of application form, index, and details
2017-08-22Add Mastodon::Source.url (#4643)Daigo 3 Dango
* Add Mastodon::Source.url * Update spec * Refactor Move things frmo Mastodon::Source to Mastodon::Version
2017-08-22Application prefs section (#2758)Colin Mitchell
* Add code for creating/managing apps to settings section * Add specs for app changes * Fix controller spec * Fix view file I pasted over by mistake * Add locale strings. Add 'my apps' to nav * Add Client ID/Secret to App page. Add some visual separation * Fix rubocop warnings * Fix embarrassing typo I lost an `end` statement while fixing a merge conflict. * Add code for creating/managing apps to settings section - Add specs for app changes - Add locale strings. Add 'my apps' to nav - Add Client ID/Secret to App page. Add some visual separation - Fix some bugs/warnings * Update to match code standards * Trigger notification * Add warning about not sharing API secrets * Tweak spec a bit * Cleanup fixture creation by using let! * Remove unused key * Add foreign key for application<->user