about summary refs log tree commit diff
path: root/app/models
AgeCommit message (Collapse)Author
2018-05-19Improve payload format of Web Push API now that it's open (#7521)Eugen Rochko
> Good lord what is happening in there Previously the contents of the Web Push API payloads closely resembled the structure of JavaScript's [Notification](https://developer.mozilla.org/en-US/docs/Web/API/Notification). But now that the API is open to non-browser apps, and given that there is no required coupling between contents of the payload and a Notification object, here is how I changed the payload: ```json { "access_token": "...", "preferred_locale": "en", "notification_id": "12345", "notification_type": "follow", "title": "So and so followed you", "body": "This is my bio", "icon": "https://example.com/avatar.png" } ``` The title, body and icon attributes are included as a fallback so you can construct a minimal notification if you cannot perform a network request to the API to get more data.
2018-05-18Add preference to hide following/followers lists (#7532)Eugen Rochko
* Add preference to hide following/followers lists - Public pages - ActivityPub collections (does not return pages but does give total) - REST API (unless it's your own) (does not federate) Fix #6901 * Add preference * Add delegation * Fix issue * Fix issue
2018-05-13Fix nil error in StatusFilter (#7470)Eugen Rochko
Fix #7462
2018-05-11Catch Paperclip processing failures (fixes #6378) (#7439)ThibG
2018-05-11Add REST API for Web Push Notifications subscriptions (#7445)Eugen Rochko
- POST /api/v1/push/subscription - PUT /api/v1/push/subscription - DELETE /api/v1/push/subscription - New OAuth scope: "push" (required for the above methods)
2018-05-07Bot nameplates (#7391)Eugen Rochko
* Store actor type in database * Add bot nameplate to web UI, add setting to preferences, API, AP Fix #7365 * Fix code style issues
2018-05-06Enable custom emojis in profiles (notes, field values, display names) (#7374)Eugen Rochko
Follow-up to #6124
2018-05-054 profile fields max, store only 255 characters per name/value (#7348)Eugen Rochko
Fix #7303
2018-05-05Store home feeds for 7 days instead of 14 (#7354)Eugen Rochko
* Store home feeds for 7 days instead of 14 Reduces workload for status fan-out to active followers * Fix test for user model
2018-05-04Store URIs of follows, follow requests and blocks for ActivityPub (#7160)Eugen Rochko
Same URI passed between follow request and follow, since they are the same thing in ActivityPub. Local URIs are generated during creation using UUIDs and are passed to serializers.
2018-05-03Fixes/do not override timestamps (#7336)ThibG
* Revert "Fixes/do not override timestamps (#7331)" This reverts commit 581a5c9d29ef2a12f46b67a1097a9ad6df1c6953. * Document Snowflake ID corner-case a bit more Snowflake IDs are used for two purposes: making object identifiers harder to guess and ensuring they are in chronological order. For this reason, they are based on the `created_at` attribute of the object. Unfortunately, inserting items with older snowflakes IDs will break the assumption of consumers of the paging APIs that new items will always have a greater identifier than the last seen one. * Add `override_timestamps` virtual attribute to not correlate snowflake ID with created_at
2018-05-03Fix n+1 queries in StatusThreadingConcern (#7321)Eugen Rochko
2018-05-03Fix cache_associated no longer working (#7320)Eugen Rochko
2018-05-02Keep notification when muting_notifications is true (#7311)abcang
* Keep notification when muting_notifications is true * Retrun mute object * Fix test
2018-05-02Allow updating bio fields via PUT /api/v1/accounts/update_credentials (#7288)Eugen Rochko
Add raw bio fields to the source attribute on GET /api/v1/accounts/verify_credentials
2018-05-02Speed up test suite by not generating RSA keys in test environment (#7296)Eugen Rochko
One RSA keypair for all fabricated test accounts is enough
2018-04-27Add entity cache (#7271)Eugen Rochko
* Add entity cache Use a caching layer for mentions and custom emojis that are dynamically extracted from text. Reduce duplicate text extractions * Fix code style issue
2018-04-23Implement the ability for instances to define a list of disallowed hashtags ↵Emelia Smith
(#7176) The goal here isn't to prevent these hashtags from existing, but just to strongly curtail their usage; The hashtags may still exist in the database via federated status, or from being created prior to this feature.
2018-04-23Prevent suspended accounts from appearing in AccountSearchService (#7246)Emelia Smith
2018-04-23Paginate descendant statuses in public page (#7148)Akihiko Odaki
2018-04-23Update dependencies for Ruby (2018-04-23) (#7237)Yamagishi Kazutoshi
* Update annotate to version 2.7.3 * Update aws-sdk-s3 to version 1.9.2 * Update browser to version 2.5.3 * Update capistrano to version 3.10.2 * Update domain_name to version 0.5.20180417 * Update http to version 3.2.0 * Update lograge to version 0.10.0 * Update oj to version 3.5.1 * Update parallel_tests to version 2.21.3 * Update puma to version 3.11.4 * Update rubocop to version 0.55.0 * Update scss_lint to version 0.57.0 * Update simplecov to version 0.16.1 * Update tty-command to version 0.8.0 * Update tty-prompt to version 0.16.0 * Update pkg-config to version 1.3.0 * Update fog-local to version 0.5.0 * Update fog-openstack to version 0.1.25 * Update devise-two-factor to version 3.0.3 * bundle update
2018-04-23Detect and prevent image bombs, max. processable dimension 4096^2 (#7229)Eugen Rochko
2018-04-22Rescue Mastodon::LengthValidationError in Remoteable (#7228)Eugen Rochko
Fix #7198 by allowing records with optional attachments to save
2018-04-21Force convert to JPG for preview card thumbnails to avoid animations (#7109)Eugen Rochko
* Force convert to JPG for preview card thumbnails to avoid animations Fix #7093 * Conditionally convert to JPG only if original is GIF Coalesce and strip on all formats to ensure no animated APNGs
2018-04-18Direct messages column (#4514)Kaito Sinclaire
* Added a timeline for Direct statuses * Lists all Direct statuses you've sent and received * Displayed in Getting Started * Streaming server support for direct TL * Changes to match other timelines in 2.0
2018-04-17Fix warning about using SQL in order for Account#partitioned (#7159)Eugen Rochko
2018-04-14Add bio fields (#6645)Eugen Rochko
* Add bio fields - Fix #3211 - Fix #232 - Fix #121 * Display bio fields in web UI * Fix output of links and missing fields * Federate bio fields over ActivityPub as PropertyValue * Improve how the fields are stored, add to Edit profile form * Add rel=me to links in fields Fix #121
2018-04-12Upgrade Rails to version 5.2.0 (#5898)Yamagishi Kazutoshi
2018-04-11Paginate ancestor statuses in public page (#7102)Akihiko Odaki
This also limits the statuses returned by API, but pagination is not implemented in Web API yet. I still expect it brings user experience better than making a user wait to fetch all ancestor statuses and flooding the column with them.
2018-04-10Feature: Improve reports ui (#7032)Emelia Smith
* Further improvements to Reports UI - Clean up notes display - Clean up add new note form - Simplify controller - Allow reopening a report with a note - Show created at date for reports - Fix report details table formatting * Show history of report using Admin::ActionLog beneath the report * Fix incorrect log message when reopening a report * Implement fetching of all ActionLog items that could be related to the report * Ensure adding a report_note updates the report's updated_at * Limit Report History to actions that happened between the report being created and the report being resolved * Fix linting issues * Improve report history builder Thanks @gargron for the improvements
2018-04-10Change custom emoji search to `ILIKE` instead of `=` (#7099)Paul Woolcock
2018-04-10Feature: Allow staff to change user emails (#7074)Emelia Smith
* Admin: Show unconfirmed email address on account page * Admin: Allow staff to change user email addresses * ActionLog: On change_email, log current email address and new unconfirmed email address
2018-04-10Fix GIFV encoding params (#7098)MIYAGI Hikaru
- Explicitly specify video codec. When ffmpeg isn't compiled with libx264 but openh264, mpeg4 is selected as video codec. - Swap avarage bitrate and max bitrate.
2018-04-09Exclude status itself from context query (#7083)Akihiko Odaki
ancestor_statuses and descendant_statuses used to include the root status itself, but the behavior is confusing because the root status is not an ancestor nor descendant.
2018-04-02Feature: Report improvements (#6967) (#7000)Emelia Smith
* Implement Assignment of Reports (#6967) * Change translation of admin.report.comment.label to "Report Comment" for clarity As we'll soon add the ability for reports to have comments on them, this clarification makes sense. * Implement notes for Reports This enables moderators to leave comments about a report whilst they work on it * Fix display of report moderation notes * Allow reports to be reopened / marked as unresolved * Redirect to reports listing upon resolution of report * Implement "resolve with note" functionality * Add inverse relationship for report notes * Remove additional database querying when loading report notes * Fix tests for reports * Fix localisations for report notes / reports
2018-04-01[WIP] Enable custom emoji on account pages and in the sidebar (#6124)David Underwood
Federate custom emojis with accounts
2018-03-27Fix UniqueUsernameValidator comparison (#6926)Eugen Rochko
Comparison was downcasing only one side, therefore if previously existing account had a non-lowercase spelling, it would be ignored when checking for duplicates. New rake task `mastodon:maintenance:find_duplicate_usernames` will help find constraint violations that might have occured from the presence of this bug. Bump version to 2.3.3
2018-03-26Validate HTTP response length while receiving (#6891)Akihiko Odaki
to_s method of HTTP::Response keeps blocking while it receives the whole content, no matter how it is big. This means it may waste time to receive unacceptably large files. It may also consume memory and disk in the process. This solves the inefficency by checking response length while receiving.
2018-03-24Change columns in notifications nonnullable (#6764)Akihiko Odaki
2018-03-24Close http connection in perform method of Request class (#6889)Akihiko Odaki
HTTP connections must be explicitly closed in many cases, and letting perform method close connections makes its callers less redundant and prevent them from forgetting to close connections.
2018-03-22Restore username validation to disallow dots, for now (#6863)Eugen Rochko
Usernames with dots in them do not work with routes, because the dot usually separates the desired page format (e.g. json). I don't want to mess with changing route constraints for this patch release.
2018-03-22Fix MENTION_RE to not match nil usernames (#6862)ThibG
2018-03-21Permit dots in usernames with conditions (#6844)Eugen Rochko
* Permit dots in usernames with conditions - Dot cannot be the start or end of username - a.lice and al.ice are considered the same during sign-up * Fix regex mixin flags
2018-03-19bugfixes and gem update (#6831)Alexander
* update to new version of devise_pam_authenticatable2 * fix behaviour if suffix is nil, fix environment loading, fix user email creation * code cleanup/fix linter warning
2018-03-17Handle Mastodon::HostValidationError when pulling remoteable assets (#6782)Daniel Hunsaker
This will prevent, for example, `rake mastodon:redownload_avatars` from crashing when an instance is no longer responding to connection attempts, instead silently continuing as expected.
2018-03-11Fix #6715: Make catalan words with the L geminate letter work in hashtags ↵Eugen Rochko
(#6741)
2018-03-08Rescue when there's no extension in the remotable (#6358)Renato "Lond" Cerqueira
* Rescue when there's no extension in the remotable Sometimes the remotable is pointing to a directory with no file extension. Maybe it should not be expecting to identify based on extensions to begin with, but since it's the case, it should be ready for it. * Fix codeclimate issue * Check if filename is nil instead of rescueing exception Suggestion made in the PR * Avoid concatenation issue if filename is nil If filename is nil, extname was undefined * Invert condition Address PR comments
2018-03-07Remove text requirement when media attached from statuses (#6672)Eugen Rochko
2018-03-07Add additional first_name and last_name SAML attribute statement options, ↵Effy Elden
and modify Omniauthable concern to use full_name or first_name + last_name if not available (#6669)
2018-03-06Fix #3807: Increase avatars to 400x400 max (#6651)Eugen Rochko
But do not upscale when they are smaller