Commit Graph
100 Commits
Author SHA1 Message Date
Eugen Rochko 4d81809f36 Yeah, it was supposed to be #create? 2018-05-22 20:05:24 +02:00
Eugen Rochko 7745a22ec7 Bump version to 2.4.0 2018-05-22 19:39:35 +02:00
Eugen Rochko f8cf85db3b Remove pointer to light theme until it is more polished (#7594) 2018-05-22 19:38:37 +02:00
Eugen Rochko 1a564df586 Do not encode HTML entities in initial Web Push payload body (#7592) 2018-05-22 18:12:45 +02:00
Eugen Rochko 36e47a31e3 Enforce order on authorized applications page (#7587)
Fix #7586
2018-05-22 14:44:53 +02:00
Eugen Rochko 5ea643b279 Save onlyMedia prop when pinning column (#7575) 2018-05-21 17:49:10 +02:00
Eugen Rochko 40ef46dbef Display only domain of report account if remote under comment (#7574) 2018-05-21 17:33:20 +02:00
Eugen Rochko 292c987522 Bump version to 2.4.0rc5 2018-05-21 16:05:31 +02:00
Eugen Rochko 22e067bf5c Use real container width in MediaGallery srcSet (#7571)
Fix #7568
2018-05-21 16:04:01 +02:00
Eugen Rochko 32d4372381 Use #any? instead of #exists? when checking media attachments (#7570)
If media_attachments are not loaded, SQL query is the same, but
the #exists? method performs SQL query even if preloaded
2018-05-21 16:01:16 +02:00
Eugen Rochko e583f110c3 Unescape HTML entities in rich web push notifications in web UI (#7569) 2018-05-21 16:00:56 +02:00
Eugen Rochko 05f8c375a2 Remove small pagination limit from context API (#7564)
Fix #7557
2018-05-21 12:43:05 +02:00
Eugen Rochko 9ada532809 Convert rich push notifications to plaintext in webapp (#7563)
* Convert rich push notifications to plaintext in webapp

* Fix code style issues
2018-05-21 03:35:37 +02:00
Eugen Rochko 779eb07d75 Improve default background of public profile header (#7556)
Looks better when no header image is set
2018-05-20 13:09:28 +02:00
Eugen Rochko 8378b72eba Ensure push subscription is immediately removed when application is revoked (#7548)
* Ensure push subscription is immediately removed when application is revoked

* When token is revoked from app, unsubscribe too
2018-05-19 21:05:08 +02:00
Eugen Rochko bcbb6aa46f Bump version to 2.4.0rc4 2018-05-19 18:38:10 +02:00
Eugen Rochko 1bbe12254d Improve direct message warning again (#7546) 2018-05-19 18:37:33 +02:00
Eugen Rochko 93c66f0c03 In footer, replace text "Mastodon" with logo (#7545) 2018-05-19 16:10:55 +02:00
Eugen Rochko 4b94e9c65e Improve payload format of Web Push API now that it's open (#7521)
> 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-19 14:46:47 +02:00
Eugen Rochko 7871d29aff Skip pagination logic for pinned account timelines in reducer (#7540)
Fix #7516
2018-05-19 02:51:29 +02:00
Eugen Rochko 97f02f2c08 Do not raise delivery failure on 4xx errors, increase stoplight threshold (#7541)
* Do not raise delivery failure on 4xx errors, increase stoplight threshold

Stoplight failure threshold from 3 to 10
Status code 429 will raise a failure/get retried

* Oops
2018-05-19 00:23:19 +02:00
Eugen Rochko 9422b3e0d8 Fix double-encoding of display name in title and e-mails (#7534) 2018-05-18 15:56:57 +02:00
Eugen Rochko 57b503d4ef Resolve unknown status from Add activity, skip Remove if unknown (#7526)
Fix #7518
2018-05-18 11:33:56 +02:00
Eugen Rochko dafd7afc5e Use randomized setTimeout when fallback-polling and re-add since_id (#7522) 2018-05-18 02:32:35 +02:00
Eugen Rochko 1e02dc8715 Add preference to hide following/followers lists (#7532)
* 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-18 02:26:51 +02:00
Eugen Rochko 7293b9fc61 Ensure unfilled fields are shown when errors are shown (#7523)
Fix #7486
2018-05-17 13:00:56 +02:00
Eugen Rochko dfb6907e08 HTTP signatures spec no longer requires algorithms field (#7525)
Fix #7520
2018-05-17 04:03:28 +02:00
Eugen Rochko 2b97451168 Fix images resized in browser getting cropped (#7514)
Fix #7487
2018-05-16 16:24:16 +02:00
Eugen Rochko 8756fd1e82 Bump version to 2.4.0rc3 2018-05-14 17:46:44 +02:00
Eugen Rochko d75b63e4fb Bump version to 2.4.0rc2 2018-05-14 14:49:38 +02:00
Eugen Rochko 416f644505 Fix 404 for GET /api/v1/push/subscription (#7472)
My bad...
2018-05-13 21:45:18 +02:00
Eugen Rochko 97e43ec5f0 Add GET /api/v1/push/subscription REST API (#7471)
* Add Api::V1::Push::SubscriptionsController#show

* Add to routes
2018-05-13 21:07:31 +02:00
Eugen Rochko f31e58af9e Fix nil error in StatusFilter (#7470)
Fix #7462
2018-05-13 20:26:30 +02:00
Eugen Rochko b4fb766b23 Add REST API for Web Push Notifications subscriptions (#7445)
- 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-11 11:49:12 +02:00
Eugen Rochko 6208ea5a53 If an OStatus message contains nsfw hashtag, mark it as sensitive (#7398)
* If an OStatus message contains nsfw hashtag, mark it as sensitive

Undo parts of #7048

* Put nsfw hashtag on OStatus messages if they have any media

* Fix code style issues
2018-05-07 14:49:13 +02:00
Eugen Rochko 42cd363542 Bot nameplates (#7391)
* 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-07 09:31:07 +02:00
Eugen Rochko 0f0cc3f2eb Support explicitly supplying language code for status via REST API (#7389) 2018-05-07 09:30:53 +02:00
Eugen Rochko d185f3ddaf Use plaintext value for field value tooltips in web UI (#7388)
Fix #7383
2018-05-07 09:30:38 +02:00
Eugen Rochko 95595ccd21 Add Corsican localization (#7390)
* Added Corsican localization

* Declaring Corsican localization

* Fixed activerecord locale

* Added a missing translation and switched to French-style apostrophes

* Fixed a (predictable) mistake made while bulk-replacing apostrophes

* More fixing

* i18n-tasks normalize
2018-05-07 01:34:19 +02:00
Eugen Rochko 50ed1e83ac Bump version to 2.4.0rc1 (#7283) 2018-05-06 11:50:00 +02:00
Eugen Rochko 61a9018607 Enable custom emojis in profiles (notes, field values, display names) (#7374)
Follow-up to #6124
2018-05-06 11:48:51 +02:00
Eugen Rochko 39efc6d533 Add hint about 7 day cooldown for archive takeout (#7375) 2018-05-06 10:53:10 +02:00
Eugen Rochko b611dbac79 Add contact e-mail hint to 2FA login form (#7376) 2018-05-06 10:52:36 +02:00
Eugen Rochko 2f63d52b92 Fallback to old on-the-fly URI for follows/blocks if no stored URI (#7371)
Fix #7367
2018-05-05 23:07:51 +02:00
Eugen Rochko c7d1a2e400 Improve admin UI for accounts (#7360)
* Improve design of account statuses admin UI (consistent with reports)

* Make account moderation notes look consistent with report notes

* i18n-tasks remove-unused

* Fix code style issues

* Fix tests
2018-05-05 23:06:29 +02:00
Eugen Rochko 660db468c0 Do not count search route as compose being mounted in web UI (#7372)
Fix #7144
2018-05-05 23:05:43 +02:00
Eugen Rochko 8da4bf0f90 4 profile fields max, store only 255 characters per name/value (#7348)
Fix #7303
2018-05-05 21:11:19 +02:00
Eugen Rochko c947e2e4c5 Fix handling of malformed ActivityPub payloads when URIs are nil (#7370)
* Fix handling of malformed ActivityPub payloads when URIs are nil

* Gracefully handle JSON-LD canonicalization failures
2018-05-05 18:22:34 +02:00
Eugen Rochko 2ef9d65052 Improve rendering of bio fields (#7353)
Fix #7335
2018-05-05 00:55:09 +02:00
Eugen Rochko c73ce7b695 Store home feeds for 7 days instead of 14 (#7354)
* 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-05 00:54:24 +02:00
Eugen Rochko 6793bec4c6 Store URIs of follows, follow requests and blocks for ActivityPub (#7160)
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-04 21:14:34 +02:00
Eugen Rochko 2c1f7b2ece Better pagination for ActivityPub outbox (#7356) 2018-05-04 19:19:11 +02:00
Eugen Rochko 251bbf9728 Show remote reports in admin UI as coming from domain rather than user (#7347)
Fix #6994
2018-05-04 13:26:25 +02:00
Eugen Rochko a78b27c7cc Marginally improve convert/ffmpeg calls performance with posix-spawn (#7346) 2018-05-04 13:22:23 +02:00
Eugen Rochko d5fa4fbcd2 Revert "Do not override timestamps for incoming toots" (#7330)
* Revert "Weblate translations 20180503 (#7325)"

This reverts commit dfa6bccb64.

* Revert "Prevent timeline from moving when cursor is hovering over it (fixes #7278) (#7327)"

This reverts commit 58852695c8.

* Revert "Add pry-byebug (#7307)"

This reverts commit ab773e4d5f.

* Revert "Do not override timestamps for incoming toots (#7326)"

This reverts commit bd36791832.
2018-05-03 12:32:33 +02:00
Eugen Rochko a5293fdf61 Fix n+1 queries in StatusThreadingConcern (#7321) 2018-05-03 10:41:58 +02:00
Eugen Rochko a3d84e705a Fix cache_associated no longer working (#7320) 2018-05-03 10:41:41 +02:00
Eugen Rochko 28bd4b9800 Serialize webfinger XML with Ox instead of Nokogiri (#7319)
25ms -> 0.5ms
2018-05-02 22:28:46 +02:00
Eugen Rochko 658cbc9425 Improve PostStatusService performance (#7317)
Offload creation of local notifications to a worker. Remove two
redundant SQL queries from ProcessMentionsService, remove n+1
XML/JSON serialization via memoization
2018-05-02 22:10:57 +02:00
Eugen Rochko cb5b5cb5f7 Slightly reduce RAM usage (#7301)
* No need to re-require sidekiq plugins, they are required via Gemfile

* Add derailed_benchmarks tool, no need to require TTY gems in Gemfile

* Replace ruby-oembed with FetchOEmbedService

Reduce startup by 45382 allocated objects

* Remove preloaded JSON-LD in favour of caching HTTP responses

Reduce boot RAM by about 6 MiB

* Fix tests

* Fix test suite by stubbing out JSON-LD contexts
2018-05-02 18:58:48 +02:00
Eugen Rochko cae933510c Allow updating bio fields via PUT /api/v1/accounts/update_credentials (#7288)
Add raw bio fields to the source attribute on GET /api/v1/accounts/verify_credentials
2018-05-02 15:57:37 +02:00
Eugen Rochko f62539ce5c Remove most behaviour disparities between blocks and mutes (#7231)
* Remove most behaviour disparities between blocks and mutes

The only differences between block and mute should be:

- Mutes can optionally NOT affect notifications
- Mutes should not be visible to the muted

Fix #7230
Fix #5713

* Do not allow boosting someone you blocked

Fix #7248

* Do not allow favouriting someone you blocked

* Fix nil error in StatusPolicy
2018-05-02 15:50:20 +02:00
Eugen Rochko c5dcd7d836 Speed up test suite by not generating RSA keys in test environment (#7296)
One RSA keypair for all fabricated test accounts is enough
2018-05-02 15:45:24 +02:00
Eugen Rochko 965345316f Guard against nil URLs in Request class (#7284)
Fix #7265
2018-05-02 15:44:22 +02:00
Eugen Rochko 705f1d7bf1 Fix missing updated_at attribute on emoji EntityCache (#7297)
Just don't try to save space by only selecting few attributes. If
anyone is wondering, this is needed because the emoji entity cache
is not really only used for entities, it's accessed again to
generate Emoji tags in ActivityPub/OStatus, so a lot more properties
are used than what is needed in HTML alone...
2018-04-30 22:49:33 +02:00
Eugen Rochko f62ee1ddb0 Disable API access when login is disabled (#7289) 2018-04-30 09:13:14 +02:00
Eugen Rochko 295e3ef02b Fix missing domain attribute in EntityCache for emoji (#7290) 2018-04-30 09:12:55 +02:00
Eugen Rochko 54f34d3f2a Return HTTP 410 for suspended accounts in GET /api/v1/accounts/:id (#7287)
Fix #7243
2018-04-30 09:12:36 +02:00
Eugen Rochko da61352fab Fix "Show more" URL on paginated threads for remote statuses (#7285)
* Fix URL of "Show more" link in paginated threads (ancestors side)

Increase item limits in threads

Fix #7268

* Fix "Show more" link in paginated threads (descendants side)
2018-04-30 01:59:42 +02:00
Eugen Rochko a872392cd9 Add entity cache (#7271)
* 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-27 01:38:10 +02:00
Eugen Rochko 63553c6b5c Add support for separate Redis for cache (#7272)
* Add support for separate Redis for cache

CACHE_REDIS_URL to allow using a different Redis server for cache
purposes, with cache-specific configuration such as key eviction

* Fix code style issues
2018-04-27 01:37:59 +02:00
Eugen Rochko 9d4710ed00 Add RSS feeds for end-users (#7259)
* Add RSS feed for accounts

* Add RSS feeds for hashtags

* Fix code style issues

* Fix code style issues
2018-04-25 02:10:02 +02:00
Eugen Rochko 7db7d68136 Detect and prevent image bombs, max. processable dimension 4096^2 (#7229) 2018-04-23 09:16:38 +02:00
Eugen Rochko 660cb058e1 Improve relative timestamps in web UI (#7233)
Use short instead of numeric month, display year when different year

E.g.: "Apr 4" instead of "4/4", "Apr 4, 2017" if different year
2018-04-23 00:43:53 +02:00
Eugen Rochko 05fb6f096d Resize images before upload in web UI to reduce bandwidth (#7223)
* Resize images before upload in web UI to reduce bandwidth

Fix #7218

* Fix issues

* Do not resize GIFs in JS
2018-04-23 00:43:36 +02:00
Eugen Rochko 75c4ab9d12 Remove "nsfw" category for sensitive statuses in OStatus serializer (#7048)
Fix #7011
2018-04-22 22:09:03 +02:00
Eugen Rochko 4ca2f73b12 Rescue Mastodon::LengthValidationError in Remoteable (#7228)
Fix #7198 by allowing records with optional attachments to save
2018-04-22 15:42:00 +02:00
Eugen Rochko bfe26ef67b Force convert to JPG for preview card thumbnails to avoid animations (#7109)
* 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-21 21:34:36 +02:00
Eugen Rochko a9c440637c Improve report layout (#7188)
* Use table for statuses in report

* Display reported account and reporter in the same table

* Split accounts and general report info into two tables again

* Redesign report statuses table, notes, merge notes and action log

* Remove unused translations

* Fix code style issue

* Fix code style issue

* Fix code style issue
2018-04-20 02:28:48 +02:00
Eugen Rochko ba917e15f6 Fix text color in "show more" link inside boost confirmation modal (#7183) 2018-04-19 02:36:31 +02:00
Eugen Rochko ff87d1bc3e Rescue SSL errors when processing mentions, remove useless line (#7184) 2018-04-19 00:53:31 +02:00
Eugen Rochko 07a7d5959c Fix missing "Administered by" when timeline preview disabled (#7161) 2018-04-17 13:51:14 +02:00
Eugen Rochko aab5581c43 Set Referrer-Policy to origin in web UI and public pages of private toots (#7162)
Fix #7115
2018-04-17 13:51:01 +02:00
Eugen Rochko bb58fc003b Fix warning about using SQL in order for Account#partitioned (#7159) 2018-04-17 13:50:48 +02:00
Eugen Rochko 78ed4ab75f Add bio fields (#6645)
* 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-14 12:41:08 +02:00
Eugen Rochko 778562c223 Ensure SynchronizeFeaturedCollectionWorker is unique and clean up (#7043)
* Ensure SynchronizeFeaturedCollectionWorker is unique and clean up

Fix #7041

* Fix code style issue
2018-04-13 01:27:22 +02:00
Eugen Rochko 9e45b051cf When notification type filtered, ignore live updates for it (#7101)
Fix #5625
2018-04-13 01:20:04 +02:00
Eugen Rochko 45c9f16f71 Improve load gap styling in web UI (#7100) 2018-04-10 17:12:10 +02:00
Eugen Rochko 49bbef1202 Use RAILS_LOG_LEVEL to set log level of Sidekiq, too (#7079)
Fix #3565 (oops)
2018-04-10 16:08:28 +02:00
Eugen Rochko 80a944c882 Log rate limit hits (#7096)
Fix #7095
2018-04-10 01:20:18 +02:00
Eugen Rochko d4de2239b0 Add a circuit breaker for ActivityPub deliveries (#7053) 2018-04-07 21:36:58 +02:00
Eugen Rochko b5726def55 Forward deletes on the same path as reply forwarding (#7058)
* Forward deletes on the same path as reply forwarding

* Remove trailing whitespace
2018-04-07 18:54:46 +02:00
Eugen Rochko f1867a7388 Adjust privacy policy (#6666)
* Adjust privacy policy to be more specific to Mastodon

Fix #6613

* Change data retention of IP addresses from 5 years to 1 year

* Add even more information

* Remove all (now invalid) translations of the privacy policy

* Add information about archive takeout, remove pointless consent section

* Emphasis on DM privacy

* Improve wording

* Add line about data use for moderation purposes
2018-04-04 21:47:39 +02:00
Eugen Rochko 07176fed37 Add contact account to landing page ("Administered by") (#6984) 2018-04-04 01:11:26 +02:00
Eugen Rochko 36eac8ba90 Do not default SMTP verify mode to "peer", default to "none" (#6996) 2018-04-02 19:19:51 +02:00
Eugen Rochko f890d2a766 Support all ActivityPub actor types (#6997)
Fix #6973
2018-04-02 02:10:53 +02:00
Eugen Rochko 33513753b9 Fix unpermitted parameters warning when generating pagination URLs (#6995) 2018-04-02 02:09:50 +02:00
Eugen Rochko 2a90da1837 Fix UniqueUsernameValidator comparison (#6926)
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-27 04:33:57 +02:00
Eugen Rochko 6cc432bbc4 Bump version to 2.3.2 2018-03-22 14:13:46 +01:00
Eugen Rochko dafae9818d Bump version to 2.3.2rc5 2018-03-22 11:31:52 +01:00