Commit Graph
100 Commits
Author SHA1 Message Date
Eugen Rochko f64af6473f Bump version to 2.3.2rc4 2018-03-20 23:49:24 +01:00
Eugen Rochko ac49c7932d Add LDAP_TLS_NO_VERIFY option, don't require LDAP_ENABLED outside .env (#6845)
Fix #6816, fix #6790
2018-03-20 19:41:51 +01:00
Eugen Rochko 9381a7d9d5 Use username/domain to match existing accounts in ActivityPub (#6842)
See also: #6837, #6667
2018-03-20 14:57:46 +01:00
Eugen Rochko 74c39fada0 Bump version to 2.3.2rc3 2018-03-19 12:20:57 +01:00
Eugen Rochko f02411da40 Ignore media validation when attaching to status during processing (#6822)
Fix #6821
2018-03-19 01:51:19 +01:00
Eugen Rochko a568e3ca8e Revert #6479, hide sensitive text/images from OpenGraph previews (#6818)
Display summary of attachments in description, and mark up content
warning if present, e.g.:

    Attached: 3 images · Content warning: Dota 2

When text is not supposed to be hidden, it looks more like:

    Attached: 3 images

    Here is the text of the toot

With #6817, multilinguagility should be assured...
2018-03-18 20:33:07 +01:00
Eugen Rochko 3b440bd5af Fix elephant graphic being draggable and selectable (#6819) 2018-03-18 20:32:44 +01:00
Eugen Rochko 39f27b6cf3 If DEFAULT_LOCALE is set, enforce it instead of HTTP request locale (#6817)
Fix #6784
2018-03-18 16:57:04 +01:00
Eugen Rochko 092f1df9d0 Bump version to 2.3.2rc2 2018-03-17 15:28:52 +01:00
Eugen Rochko 844616e950 Re-add git and nodejs-npm to Dockerfile (#6810)
Fix #6809

I don't know why, either
2018-03-17 15:28:09 +01:00
Eugen Rochko 40871caa4b Revert "Upgrade Paperclip to version 6.0.0" (#6807)
* Revert "Bump version to 2.3.2rc1"

This reverts commit cdf8b92fea.

* Revert "Downgrade Dockerfile to Ruby 2.4.3 on Alpine 3.6 (#6806)"

This reverts commit 0074cad44f.

* Revert "Handle Mastodon::HostValidationError when pulling remoteable assets (#6782)"

This reverts commit 4a0a19fe54.

* Revert "Correct the reference to user's password in mastodon:add_user task (#6800)"

This reverts commit 338bff8b93.

* Revert "Upgrade Paperclip to version 6.0.0 (#6754)"

This reverts commit b88fcd53f7.
2018-03-17 14:20:35 +01:00
Eugen Rochko cdf8b92fea Bump version to 2.3.2rc1 2018-03-17 14:07:00 +01:00
Eugen Rochko 0074cad44f Downgrade Dockerfile to Ruby 2.4.3 on Alpine 3.6 (#6806)
Fix 6734
2018-03-17 14:06:25 +01:00
Eugen Rochko 2ef1ce1182 Bump version to 2.3.1 2018-03-13 15:50:15 +01:00
Eugen Rochko eb2425b53b Hide loading bar on status interactions (#6774) 2018-03-13 14:30:01 +01:00
Eugen Rochko 79d3a8553f Bump version to 2.3.1rc3 2018-03-13 09:21:21 +01:00
Eugen Rochko 7709556673 Merge branch 'kagucho-spoiler' 2018-03-13 09:18:27 +01:00
Eugen Rochko f0ae6b4cc5 Merge branch 'spoiler' of git://github.com/kagucho/mastodon into kagucho-spoiler 2018-03-13 09:18:11 +01:00
Eugen Rochko 9e3a6d6784 Log BackupWorker backtrace, delete Backup if retries exhausted (#6769) 2018-03-13 08:15:24 +01:00
Eugen Rochko 8bf3e750ab Fix #6757: Adjust RTL styles for landing page (#6768) 2018-03-13 08:14:08 +01:00
Eugen Rochko 386365090c Fix #6762: Do not overwrite some status attributes in reducer (#6767) 2018-03-13 07:16:43 +01:00
Eugen Rochko f89ff65ec7 Bump version to 2.3.1rc2 2018-03-12 12:48:49 +01:00
Eugen Rochko 4f7f6b3922 Fix follow relationships not loading after notifications fetch (#6746) 2018-03-12 03:20:56 +01:00
Eugen Rochko ab27dccba5 Bump version to 2.3.1rc1 2018-03-11 15:13:13 +01:00
Eugen Rochko 56eb5c3f34 Fix focal point cropping in MediaGallery, fix focal point modal (#6740)
* Use object-position with object-fit instead of JS top/left

* Fix focal point modal
2018-03-11 15:12:33 +01:00
Eugen Rochko 1aaec701bb Fix #6715: Make catalan words with the L geminate letter work in hashtags (#6741) 2018-03-11 14:55:49 +01:00
Eugen Rochko b6003afcdb Add show more/less toggle for entire threads in web UI (#6733)
Fix #1258
2018-03-11 09:52:59 +01:00
Eugen Rochko 4476a45444 Fix #6717: Do not double html-encode page titles (#6720) 2018-03-10 11:43:20 +01:00
Eugen Rochko 6e309f5e45 Bump version to 2.3.0 2018-03-09 12:59:58 +01:00
Eugen Rochko e5f18ace2a When inside Docker, output saved configuration during mastodon:setup (#6711) 2018-03-09 11:52:18 +01:00
Eugen Rochko 11697d6894 Fix thumbnail not filling entire space sometimes (#6709) 2018-03-09 11:33:05 +01:00
Eugen Rochko 675b8fea53 Adjust suggested ES host in .env sample for docker-compose config (#6710) 2018-03-09 11:32:55 +01:00
Eugen Rochko ff44b2e92d Add missing meta description to profiles, some other SEO stuff (#6706)
- Add missing meta description to profiles
- Add canonical rel link to landing page
- Remove linebreaks from title tags
- Add username to profile title
- Add toots/following/followers to profile description tags
- Add next/prev rel links to profiles
- Do not index follower/following variants of profiles
2018-03-09 00:35:07 +01:00
Eugen Rochko bd077ad7d9 Bump version to 2.3.0rc3 2018-03-08 11:19:02 +01:00
Eugen Rochko a29d409e20 If login redirects to omniauth, redirect logout to root_path (#6694)
Fix #6670
2018-03-08 11:18:26 +01:00
Eugen Rochko 5acd5315f2 Improve styling of closed registrations message, rename button (#6695)
* Improve styling of closed registrations message, rename button

"Sign up on another server"

Fix #6683

* Adjust styling of closed registrations message
2018-03-08 11:10:37 +01:00
Eugen Rochko b79ab15859 When enabled, always display media in gallery. Also: click to reveal (#6692)
Fix #6677
2018-03-08 08:57:21 +01:00
Eugen Rochko 77406d3a09 Display AttachmentList in notifications (#6693) 2018-03-08 08:22:04 +01:00
Eugen Rochko 510c9049c7 For now, put a "." into no-text statuses with media for backcompat (#6691) 2018-03-08 08:20:49 +01:00
Eugen Rochko 64db9ed5f6 After blocking domain with reject_media, invalidate cache (#6679)
Media attachments are part of the association cache of statuses,
since they are presumed to be immutable. Unless this cache is
cleared manually, the statuses will continue to look like they
have media embedded.
2018-03-08 06:59:42 +01:00
Eugen Rochko 86a9de6753 Display AttachmentList in timelines in compact style when media missing (#6680) 2018-03-08 04:54:26 +01:00
Eugen Rochko 4ca60c665e Bump version to 2.3.0rc2 2018-03-07 12:06:23 +01:00
Eugen Rochko b170627ceb Fix cover behaviour of thumbnails that are wider than taller (#6678) 2018-03-07 12:02:05 +01:00
Eugen Rochko a1b065700a Fix focal point modals broken by #5956 (#6676) 2018-03-07 12:01:53 +01:00
Eugen Rochko 8de048fcdb In wide layout, columnize Mastodon features on landing page (#6674) 2018-03-07 08:59:27 +01:00
Eugen Rochko cfa9b6e13a Remove text requirement when media attached from statuses (#6672) 2018-03-07 08:28:52 +01:00
Eugen Rochko 89a52d6280 Fix wrong target URIs in ActivityPub Add/Remove (#6668) 2018-03-07 05:58:24 +01:00
Eugen Rochko e6520c0270 Fix #6657 - Use target instead of origin in Remove activity (#6664) 2018-03-07 03:54:46 +01:00
Eugen Rochko 4847149b6e Always install LDAP, CAS and SAML gems, because they don't require deps (#6663)
Fix #6534

PAM requires a system dependency so...
2018-03-07 02:25:17 +01:00
Eugen Rochko d7573fe584 Separate chown command in Dockerfile. Use tootsuite/mastodon image (#6662)
Fix #6605
2018-03-07 01:57:31 +01:00
Eugen Rochko 78d772af86 Fix #3807: Increase avatars to 400x400 max (#6651)
But do not upscale when they are smaller
2018-03-06 06:29:01 +01:00
Eugen Rochko 20d1be18af Fix accounts' display name/bio not being set from initial state (#6644) 2018-03-06 00:08:35 +01:00
Eugen Rochko b66ec3bf95 Fix #6611: Typo in change password template (#6616) 2018-03-04 10:00:24 +01:00
Eugen Rochko 9110db41c5 Federate pinned statuses over ActivityPub (#6610)
* Federate pinned statuses over ActivityPub

* Display pinned toots in web UI

Fix #6117

* Fix migration

* Fix tests

* Update outbox_serializer.rb

* Update remove_serializer.rb

* Update add_serializer.rb

* Update fetch_featured_collection_service.rb
2018-03-04 09:19:11 +01:00
Eugen Rochko 44829d8216 Fix missing focalPoint in ActivityPub JSON (#6609) 2018-03-04 07:21:41 +01:00
Eugen Rochko b4f8e87358 Add LDAP options to .env.production.sample (#6592) 2018-03-02 08:14:34 +01:00
Eugen Rochko e72db6d9dd Move "compose" on mobile to floating action button (#6594)
* Move "compose" on mobile to floating action button

* Fix contrast on floating action button
2018-03-02 07:12:40 +01:00
Eugen Rochko 036dd98abb Responsively enforce 16:9 ratio on all media thumbnails in web UI (#6590)
* Responsively enforce 16:9 ratio on all media thumbnails in web UI

Also change video player behaviour to "contain" rather than
"cover" videos that don't fit the ratio, unlike images and GIFs,
it's expected that a video is shown fully.

* Fix spacing issues and remove floor

* Remove floor
2018-03-02 07:00:04 +01:00
Eugen Rochko 7901f9f63e When search enabled, display hint in search popout (#6593)
* When advanced search is enabled, show different hint in search popout

* Change "getting started" icon in tabs bar from asterisk to hamburger
2018-03-02 06:02:42 +01:00
Eugen Rochko 379cdfaac5 Fix #6586: Add close modal icon to report dialog (#6591) 2018-03-02 04:36:00 +01:00
Eugen Rochko 38b9af76a2 Improve style of web UI account tabs (#6589) 2018-03-02 04:35:49 +01:00
Eugen Rochko 64f2ada5d4 Bump version to 2.3.0rc1 2018-03-01 20:50:23 +01:00
Eugen Rochko a3c4138197 Add contact_account and languages to instance API (#6574) 2018-03-01 20:48:11 +01:00
Eugen Rochko 68218d97c8 Add only_media param to public and hashtag timelines API (#6576) 2018-03-01 03:21:21 +01:00
Eugen Rochko 5131012505 Add "Toots/Toots with replies/Media" tab below profile header (#6572)
* Add "Toots/Toots with replies/Media" tab below profile header

* Add focal point display to account gallery timeline

* Fix visual glitch of standalone GIFV
2018-03-01 02:48:44 +01:00
Eugen Rochko 473a69ab18 Fix margin on top action button, fix width of counters on frontpage (#6573) 2018-03-01 02:48:08 +01:00
Eugen Rochko fce8464077 Ensure that boolean params in the API are parsed for truthiness (#6575)
Use Rails smart boolean cast to account for values such as "f",
"0", "false", etc. Previously, if a param was present in the request,
it would count as true.
2018-03-01 02:47:59 +01:00
Eugen Rochko 47bdb9b33b Fix #942: Seamless LDAP login (#6556) 2018-02-28 19:04:53 +01:00
Eugen Rochko e852872846 Fix #5708: Reject->Follow will remove the follow if it exists (#6571) 2018-02-28 06:55:06 +01:00
Eugen Rochko 41a01bec23 Federated reports (#6570)
* Fix #2176: Federated reports

* UI for federated reports

* Add spec for ActivityPub Flag handler

* Add spec for ReportService
2018-02-28 06:54:55 +01:00
Eugen Rochko 18513a978a Improve public account cards (#6559)
- Add follow/unfollow/remote follow buttons
- Format the bio properly
- Always show username@domain, even for local accounts
2018-02-26 16:18:41 +01:00
Eugen Rochko 5cc716688a Ensure the app does not even start if OTP_SECRET is not set (#6557)
* Ensure the app does not even start if OTP_SECRET is not set

* Remove PAPERCLIP_SECRET (it's not used by anything, actually)

Imports are for internal consumption and the url option isn't even
used correctly, so we can remove the hash stuff from them
2018-02-26 01:31:44 +01:00
Eugen Rochko f0a1b1a152 Fix #6536 (#6558) 2018-02-26 00:24:55 +01:00
Eugen Rochko b8535ad4df Fix nil error in focal_point? (#6537) 2018-02-22 17:42:33 +01:00
Eugen Rochko 5f3bee345d Fix container regression (#6531)
* Update public.html.haml

* Update auth.html.haml

* Update modal.html.haml
2018-02-22 03:04:27 +01:00
Eugen Rochko c71aa468b5 Redesign landing page (again) (#6486)
* Redesign landing page (again)

* Move login form in small version to the right column

* Display closed registrations message

* Add site setting for the hero image

* Fix test

* Increase spacing, maximum width, change call to action section
2018-02-22 01:03:48 +01:00
Eugen Rochko d8bc64bb09 Fix #6526: Only store redirect location if not in JSON format (#6528) 2018-02-22 00:51:30 +01:00
Eugen Rochko 90f12f2e5a Focal points (#6520)
* Add focus param to media API, center thumbnails on focus point

* Add UI for setting a focal point

* Improve focal point icon on upload item

* Use focal point in upload preview

* Add focalPoint property to ActivityPub

* Don't show focal point button for non-image attachments
2018-02-22 00:35:46 +01:00
Eugen Rochko d3a62d2637 Fix #6525: Make sure file is opened in LazyThumbnail processor (#6529) 2018-02-22 00:28:19 +01:00
Eugen Rochko 4bc625166e Fix bug in relationships API introduced by #6482 (#6527)
It was merge when it needed to be deep_merge. And added some tests
2018-02-21 23:22:12 +01:00
Eugen Rochko 61ed133fea Account archive download (#6460)
* Fix #201: Account archive download

* Export actor and private key in the archive

* Optimize BackupService

- Add conversation to cached associations of status, because
  somehow it was forgotten and is source of N+1 queries
- Explicitly call GC between batches of records being fetched
  (Model class allocations are the worst offender)
- Stream media files into the tar in 1MB chunks
  (Do not allocate media file (up to 8MB) as string into memory)
- Use #bytesize instead of #size to calculate file size for JSON
  (Fix FileOverflow error)
- Segment media into subfolders by status ID because apparently
  GIF-to-MP4 media are all named "media.mp4" for some reason

* Keep uniquely generated filename in Paperclip::GifTranscoder

* Ensure dumped files do not overwrite each other by maintaing directory partitions

* Give tar archives a good name

* Add scheduler to remove week-old backups

* Fix code style issue
2018-02-21 23:21:32 +01:00
Eugen Rochko a7171af0a3 Fix avatar and header issues by using custom geometry detector (#6515)
* Fix avatar and header issues by using custom geometry detector

Revert a part of #6508. The file passed to dynamic styles method
was not actually a file, but an instance of Paperclip::Attachment,
which broke all styles by always returning {} from the method.

One problem with GIF avatars was that Paperclip::GeometryDetector
reported wrong dimensions for them, e.g. 120x120 GIF avatar would
for some reason be detected as 120x53. By writing our own geometry
parser, we can use FastImage, which also happens to be faster than
ImageMagick, to detect image dimensions, which are also correct.

Unfortunately, this PR does not implement skipping a `convert`
entirely if the dimensions are already correct, as I found no easy
way to write that behaviour into Paperclip without rewriting the
Paperclip::Thumbnail class.

* Only invoke convert if dimension or format needs to be changed
2018-02-21 03:40:12 +01:00
Eugen Rochko 02856073f7 Fix #6509: Use pull queue for chewy jobs (#6513) 2018-02-20 17:25:16 +01:00
Eugen Rochko be9bab171d Set Docker permissions during the build process (#6514)
* Set Docker permissions during the build process

* Remove docker_entrypoint.sh and use COPY with chown
2018-02-20 17:25:01 +01:00
Eugen Rochko 66105929e0 Don't resize avatars/headers if their dimensions are already right (#6508)
Also don't apply "-quality 80" option which is probably the reason
for slight color differences between original and remote image
(because it would apply it twice, once on original instance, and
again on the receiving instance)
2018-02-19 16:06:12 +01:00
Eugen Rochko cbb69d41f6 Fix media spoiler design (#6507)
- 4px rounded corners on media attachments
- Better colors/contrast for CW/media spoiler on public pages
- Fix vertical alignment of "Show more" button
- Fix layout jump when unhiding standalone media
2018-02-19 02:39:18 +01:00
Eugen Rochko cba2897108 Cache relationships in API (#6482)
* Cache relationships in API

* Fetch relationships for search results in UI

* Only save one account's maps in each cache item
2018-02-18 03:14:46 +01:00
Eugen Rochko a71af98401 Push discovered status through streaming API within a time window (#6484)
Time window of 6 hours
2018-02-17 14:28:48 +01:00
Eugen Rochko 9dbae6e8a1 Save video metadata and improve video OpenGraph tags (#6481)
* Save metadata from video attachments, put correct dimensions into OG tags

* Add twitter:player for videos

* Fix code style and test
2018-02-16 07:22:20 +01:00
Eugen Rochko 1122579216 Do not hide NSFW media/CW'd text in OpenGraph tags (#6479)
Reasoning: HTML title tag affects everyone. But OpenGraph only affects
when somebody is deliberately sharing the content, usually in an
environment where such content is expected. Hiding the content in
OpenGraph tags results in deceitful previews which inhibit the
shareability of the post.

Example: Somebody writes a clever post about politics but kindly
puts a "uspol" content warning on it. Mastodon users are thankful,
but sharing this post on another platform results in non-Mastodon
users believing the entire contents of the post is "uspol" and not
clicking through/reading and re-sharing.
2018-02-16 04:40:53 +01:00
Eugen Rochko 478ca39e5e After click to embed video, autoplay it (#6480) 2018-02-15 23:05:12 +01:00
Eugen Rochko f7765acf9d Fix #5173: Click card to embed external content (#6471) 2018-02-15 07:04:28 +01:00
Eugen Rochko e20700fe8f Fix Chewy trying to update index with the wrong strategy (#6464) 2018-02-11 22:59:44 +01:00
Eugen Rochko cf36d184f4 Interactive rake mastodon:setup task (#6451)
* Add better CLI prompt

* Add rake mastodon:setup interactive wizard

* Test db/redis/smtp configurations and add admin user at the end

* Test database connection even when database does not exist yet
2018-02-11 18:40:57 +01:00
Eugen Rochko 3ebc0ad4d3 Full-text search for authorized statuses (#6423)
* Add full-text search for authorized statuses

- Search API will return statuses that match the query
- Only for logged in users
- Only if you are author of the status,
- Or you were mentioned in it
- Or you favourited or reblogged it
- Configuration over `ES_ENABLED`, `ES_HOST`, `ES_PORT`, `ES_PREFIX`
- Run `rails chewy:deploy` to create & populate index

Fix #5880
Fix #4293
Fix #1152

* Add commented out docker-compose configuration for ES container

* Optimize index import, filter search results

* Add basic normalization to the index

* Add better stemming and normalization to the index

* Skip webfinger request if search query includes both @ and a space

* Fix code style

* Visually separate search result sections

* Fix code style issues
2018-02-09 23:04:47 +01:00
Eugen Rochko 2ef9d0e101 Change web UI "posts" to "toots" on profile for consistency (#6447) 2018-02-09 00:27:18 +01:00
Eugen Rochko 76f3d5d16b Add preference to always display sensitive media (#6448) 2018-02-09 00:26:57 +01:00
Eugen Rochko 38e0133e1b Make PAM gem optional, allow configuration over environment (#6415) 2018-02-04 15:05:53 +01:00
Eugen Rochko 26f21fd5a0 CAS + SAML authentication feature (#6425)
* Cas authentication feature

* Config

* Remove class_eval + Omniauth initializer

* Codeclimate review

* Codeclimate review 2

* Codeclimate review 3

* Remove uid/email reconciliation

* SAML authentication

* Clean up code

* Improve login form

* Fix code style issues

* Add locales
2018-02-04 05:42:13 +01:00
Eugen Rochko e14c20582f Bump version to 2.2.0 2018-01-29 01:12:36 +01:00