about summary refs log tree commit diff
path: root/app/models
AgeCommit message (Collapse)Author
2017-09-28Merge commit 'b9f59ebcc68e9da0a7158741a1a2ef3564e1321e' into merging-upstreamOndřej Hruška
2017-09-28Merge commit '4aea3f88a6d30f102a79c2da7fcfac96465ba1a8' into merging-upstreamOndřej Hruška
2017-09-27Fix empty query sent to postgres for custom emojis (#5121)Eugen Rochko
2017-09-25Increase max height of preview card image (#5092)unarist
We added horizontal layout to preview card for wide image. However, max height of the thumbnail is still limited to 120px and it makes nearly square images to too small for that layout. This PR increases max height as well as max width.
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-23Fix custom emojis not detected when used in content warning (#5049)Eugen Rochko
2017-09-22Do not filter statuses with unknown languages (#5045)Akihiko Odaki
2017-09-20Use file extensions in addition to MIME types for file picker (#5029)unarist
Currently we're using a list of MIME types for `accept` attribute on `input[type="file"]` for filter options of file picker, and actual file extensions will be infered by browsers. However, infered extensions may not include our expected items. For example, "image/jpeg" seems to be infered to only ".jfif" extension in Firefox. To ensure common file extensions are in the list, this PR adds file extensions in addition to MIME types. Also having items in both format is encouraged by HTML5 spec. https://www.w3.org/TR/html5/forms.html#file-upload-state-(type=file)
2017-09-19Introduce OStatus::TagManager (#5008)Akihiko Odaki
2017-09-19Add support for multiple themes (#4959)Andrew
* Add support for selecting a theme * Fix codeclimate issues * Look up site default style if current user is not available due to e.g. not being logged in * Remove outdated comment in common.js * Address requested changes in themes PR * Fix codeclimate issues * Explicitly check current_account in application controller and only check theme availability if non-nil * codeclimate * explicit precedence with && * Fix code style in application_controller according to @nightpool's suggestion, use default style in embedded.html.haml * codeclimate: indentation + return
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-17Remove local_only scope in Status (#4977)Akihiko Odaki
2017-09-16When accessing uncached media attachment, redownload it (#4955)Eugen Rochko
* When accessing uncached media attachment, redownload it * Prevent re-download of rejected media
2017-09-14Fix #4908 - Do not keep remote file names, generate random (#4934)Eugen Rochko
2017-09-13fix typos in the migrationSurinna Curtis
2017-09-13Refactor handling of default params for muting to make code cleanerSurinna Curtis
2017-09-13add an explanatory comment to AccountInteractionsSurinna Curtis
2017-09-13Allow modifying the hide_notifications of a mute with the ↵Surinna Curtis
/api/v1/accounts/:id/mute endpoint
2017-09-13Expose whether a mute hides notifications in the api/v1/relationships endpointSurinna Curtis
2017-09-13Add muting_notifications? and a notifications argument to mute!Surinna Curtis
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-13Add instance search feature (#4925)nullkal
2017-09-12Fix count numbers from ActivityPub not being saved (#4899)Eugen Rochko
They are marked as read-only by Rails, but we know what we are doing, so we are un-marking them as such. The mastodon:maintenance:update_counter_caches task is not really supposed to be run anymore (it was a one-time thing during an upgrade) however, just in case, I have modified it to not touch ActivityPub accounts. Also, no point writing to logger from these rake tasks, since they are not to be run from cron. Better to give stdout feedback.
2017-09-10Fix a spuriously failing spec that assumed we required short bios like upstreamSurinna Curtis
2017-09-10Merge tag 'v1.6.0' into sync/upstreamDavid Yip
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-09Merge tag 'v1.6.0rc4' into sync/upstream-1.6.0rc4David Yip
Conflicts: app/javascript/mastodon/features/getting_started/index.js app/javascript/packs/public.js app/javascript/styles/components.scss
2017-09-09Merge tag 'v1.6.0rc3' into sync/upstreamDavid Yip
2017-09-09Merge branch 'origin/master' into sync/upstreamDavid Yip
Conflicts: app/javascript/mastodon/components/status_list.js app/javascript/mastodon/features/notifications/index.js app/javascript/mastodon/features/ui/components/modal_root.js app/javascript/mastodon/features/ui/components/onboarding_modal.js app/javascript/mastodon/features/ui/index.js app/javascript/styles/about.scss app/javascript/styles/accounts.scss app/javascript/styles/components.scss app/presenters/instance_presenter.rb app/services/post_status_service.rb app/services/reblog_service.rb app/views/about/more.html.haml app/views/about/show.html.haml app/views/accounts/_header.html.haml config/webpack/loaders/babel.js spec/controllers/api/v1/accounts/credentials_controller_spec.rb
2017-09-07Fix #4834 - Adjust Status#local and Status#remote scopes (#4839)Eugen Rochko
2017-09-07Feat add validation for report comment: characters under 1000 valid (#4833)voidSatisfaction
2017-09-06Fix locking migration on statuses table. Nullable column and NO default ↵Eugen Rochko
value (#4825)
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-02Validate data of Imports (#4782)abcang
2017-09-02Fix WebPush (regression from #4524) (#4778)unarist
* Fix NoMethodError in Web::PushSubscription ``` undefined method `site_contact_email' for #<Class:0x00005976d13c40> /usr/local/bundle/gems/activerecord-5.1.3/lib/active_record/dynamic_matchers.rb:22:in `method_missing' /usr/local/bundle/gems/attr_encrypted-3.0.3/lib/attr_encrypted.rb:295:in `method_missing' /usr/local/bundle/gems/attr_encrypted-3.0.3/lib/attr_encrypted/adapters/active_record.rb:129:in `method_missing_with_attr_encrypted' /mastodon/app/models/web/push_subscription.rb:53:in `push_payload' ``` * Specify serializer in Web::NotificationSerializer
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-09-01Refactor Web::PushSubscription, remove welcome message (#4524)Eugen Rochko
* Refactor Web::PushSubscription, remove welcome message * Add missing helper * Use locale of the receiver on push notifications (#4519) * Remove unused translations * Fix dir on notifications
2017-08-30Use request.remote_ip instead of request.ip (#4744)nullkal
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-28rescue HTTP::ConnectionError in RemoteFollowController#create (#4726)abcang
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-24Minor performance improvement for test suite (#4678)Eugen Rochko
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
2017-08-21Periodically remove expired PuSH subscribers (#4654)Eugen Rochko
2017-08-21Do not try to re-subscribe to unsubscribed accounts (#4653)Eugen Rochko
2017-08-16Redesign public profiles (#4608)Eugen Rochko
* Redesign public profiles * Responsive design * Change public profile status filtering defaults and add options - No longer displays private/direct toots even if you are permitted access - By default omits replies - "With replies" option - "Media only" option * Redesign account grid cards * Fix style issues
2017-08-13ActivityPub delivery (#4566)Eugen Rochko
* Deliver ActivityPub Like * Deliver ActivityPub Undo-Like * Deliver ActivityPub Create/Announce activities * Deliver ActivityPub creates from mentions * Deliver ActivityPub Block/Undo-Block * Deliver ActivityPub Accept/Reject-Follow * Deliver ActivityPub Undo-Follow * Deliver ActivityPub Follow * Deliver ActivityPub Delete activities Incidentally fix #889 * Adjust BatchedRemoveStatusService for ActivityPub * Add tests for ActivityPub workers * Add tests for FollowService * Add tests for FavouriteService, UnfollowService and PostStatusService * Add tests for ReblogService, BlockService, UnblockService, ProcessMentionsService * Add tests for AuthorizeFollowService, RejectFollowService, RemoveStatusService * Add tests for BatchedRemoveStatusService * Deliver updates to a local account to ActivityPub followers * Minor adjustments