Commit Graph
100 Commits
Author SHA1 Message Date
ThibGandEugen Rochko c875f19673 Fix race condition causing shallow status with only a "favourited" attribute (#9272)
Fixes #9231
2018-11-13 14:58:14 +01:00
ThibGandEugen Rochko bbd8fdd185 Perform deep comparison for card data when receiving new props (#9270)
Fixes #9226
2018-11-12 18:17:50 +01:00
ThibGandEugen Rochko 7f5a4be580 Fix emoji update date processing (#9255) 2018-11-10 23:59:51 +01:00
ThibGandEugen Rochko 9b89c62d43 Check that twitter:player is valid before using it (#9254)
Fixes #9251
2018-11-10 20:42:04 +01:00
ThibGandEugen Rochko 08b3de4d5e Remove unused computation of reblog references from updateTimeline (#9244) 2018-11-09 17:43:25 +01:00
ThibGandEugen Rochko a03d506626 Fix Pleroma mentions being fetched as preview cards (#9158) 2018-10-30 15:02:24 +01:00
ThibGandEugen Rochko 33a71e8f7c Do not hide boost notifications from followed people with hidden boosts (#9147)
* Do not hide boost notifications from followed people with hidden boosts

Not displaying boosts from a followed user in the Home timeline and not
having notifications when they reblog your own content are two very
separate concerns, tying them together seem counter-intuitive and unwanted.

* Update specs accordingly
2018-10-30 00:47:31 +01:00
ThibGandEugen Rochko a90b569350 When searching for an emoji with multiple separators, consider the full input (#9124)
e.g., typing “blob_cat_p” used to search for “blob” and “cat”, but not
“blob_cat_p”, which means “blob_cat_patpat” is very unlikely to show up,
although it is likely what the user wanted to type in the first place.
2018-10-27 22:32:54 +02:00
ThibGandEugen Rochko 215e649391 Fix styling in /auth/edit (#9117) 2018-10-26 22:49:17 +02:00
ThibGandEugen Rochko e53cc673e7 Ignore invalid hashtags on remote statuses instead of rejecting them (#9118)
Fixes #9115
2018-10-26 22:48:35 +02:00
ThibGandEugen Rochko 82e7988afc Fix missing mention argument when processing incoming Create activities (#9114)
* Fix missing `mention` argument when processing incoming Create activities

* Fix typo (param → params)
2018-10-26 12:59:59 +02:00
ThibGandEugen Rochko 7fee968e9f Do not fetch preview card for mentioned users (#6934) 2018-10-25 18:13:19 +02:00
ThibGandEugen Rochko 84cf78da8a Fix og:url on toots' public view (#9047)
Fixes #9045
2018-10-21 22:52:10 +02:00
ThibGandEugen Rochko 007f7690fa Fix fav/boosts hotkeys not working on detailed statuses (#9006) 2018-10-18 19:52:00 +02:00
ThibGandEugen Rochko adb06baef6 Handle global hotkeys even when no element has focus (#8998)
This fixes hotkeys not working when pressing the column
“back” button, for instance.
2018-10-17 16:56:16 +02:00
ThibGandEugen Rochko 8ab081ec32 Add manifest_src to CSP, add blob to connect_src (#8967) 2018-10-12 19:07:30 +02:00
ThibGandEugen Rochko 2d27c11061 Set Content-Security-Policy rules through RoR's config (#8957)
* Set CSP rules in RoR's configuration

* Override CSP setting in the embed controller to allow frames
2018-10-11 20:35:46 +02:00
ThibGandEugen Rochko 25744d43b0 Ensure only toots from the reported users are reported (#8916) 2018-10-07 19:45:40 +02:00
ThibGandEugen Rochko 42aecb4c13 Add a confirmation dialog when hitting reply and the compose box isn't empty (#8893)
* Add a confirmation dialog when hitting reply and the compose box isn't empty

Fixes #878

* Performance improvement
2018-10-05 18:44:44 +02:00
ThibGandEugen Rochko ba444797d2 Fix handling of ActivityPub activities lacking some attributes (#8864) 2018-10-03 23:44:13 +02:00
ThibGandEugen Rochko c39183cc62 Refactor active_nav_class for use with multiple paths (#8757) 2018-09-23 20:42:13 +02:00
ThibGandYamagishi Kazutoshi 0aa9c05744 Fix Spanish locale broken due to translated variable name (#8754) 2018-09-23 09:56:28 +09:00
ThibGandEugen Rochko 05f90e3695 Adjust beforeUnload conditions (#8746)
Fixes #8701
2018-09-21 18:54:17 +02:00
ThibGandEugen Rochko c946ba3fae Add rel=me to moved accounts' link (#8742) 2018-09-20 22:53:30 +02:00
ThibGandEugen Rochko f8b54d229f Fix “Toots” tab highlighting for replies and media timelines (#8715) 2018-09-18 03:57:13 +02:00
ThibGandEugen Rochko 9b32898e3c Unconditionally re-encode locally-uploaded images to strip metadata (#8714)
This strips metadata on file upload by re-encoding the files, at the cost
of possible slight image quality decrease and processing resources.
2018-09-17 20:24:46 +02:00
ThibGandEugen Rochko 4959ead07c Fix media description in various media modals (#8678) 2018-09-13 20:31:59 +02:00
ThibGandEugen Rochko f8160b68b3 Only focus first element of dropdown menus if using keyboard (#8679)
* Only focus first item of dropdown if it was opened via keyboard

* Improve keyboard VS mouse navigation of dropdown menus
2018-09-13 20:31:33 +02:00
ThibGandEugen Rochko 09a87b2cdb Auto-focus emoji picker's search field (#8688)
Fixes #6056
2018-09-13 20:31:11 +02:00
ThibGandEugen Rochko 661a89ea74 Autofocus comment textarea in report modal (#8689) 2018-09-13 15:27:29 +02:00
ThibGandEugen Rochko 7fa4144d48 Fix building assets in test environment (#8691)
Webpacker (Ruby wrapper to webpack) uses RAILS_ENV-based environments while
the javascript configuration for webpack re-reads this configuration file using
the NODE_ENV environment variable. This means that when RAILS_ENV=test, running
“assets:precompile” compiled the production packs in “public/packs” while
webpacker expects them in “public/packs-test”. This causes Ruby to recompile
them on-the-fly, possibly leading to race conditions in parallel_tests.

This changes:
- Disables on-the-fly compilation in test environment
- Changes the javascript part to read the correct environment
2018-09-13 15:18:47 +02:00
ThibGandEugen Rochko bda0f7ac73 Add a few black emojis that are to have a white outline (#8597) 2018-09-10 18:26:47 +02:00
ThibGandEugen Rochko bd9e47e9be Handle relative URLs when fetching OEmbed/OpenGraph cards (#8669) 2018-09-10 18:26:28 +02:00
ThibGandEugen Rochko 0c5db3163a Fix dropdown arrow position (#8637) 2018-09-07 01:18:46 +02:00
ThibGandEugen Rochko fdda332e4d Update docker config and move some workers to different queues (#8345)
* Reorder docker-compose's sidekiq queues to match config/sidekiq.yml

* Make the ̀“mailers” queue higher priority than “pull”
2018-09-02 16:13:06 +02:00
ThibGandEugen Rochko 45c0f5433c Do not show follow button on moved or memorial accounts (#8546)
This restores the logic from before the public profile redesign. Fixes #8503
2018-08-31 20:33:01 +02:00
ThibGandEugen Rochko 0b62585748 Self-notify on accepting follow requests (#8541) 2018-08-31 15:17:31 +02:00
ThibGandEugen Rochko 7786e1357b Only display web push notifications after API call (fixes #7902) (#8396)
* Only display web push notifications after API call (fixes #7902)

* Decode then truncate instead of truncating then decoding in webpush serializer
2018-08-23 21:44:27 +02:00
ThibGandEugen Rochko 43b8df3228 Update state when opened dropdown is unmounted (fixes #8397) (#8398) 2018-08-23 20:43:27 +02:00
ThibGandEugen Rochko 63484ee17a Do not check for file existence when serializing ActivityPub actor (#8386)
When serializing an ActivityPub actor, Mastodon checks for the existence
of the avatar/header files. This is not necessary, only check if avatar/header
is set.

https://github.com/thoughtbot/paperclip/blob/fd8bf49d3895de2904b43f95d11af0736fbd0f5b/README.md#checking-a-file-exists
2018-08-23 16:39:22 +02:00
ThibGandEugen Rochko 42573b76f1 Do not crash if remote custom emoji does not define updated date (fixes #8376) (#8377) 2018-08-23 00:27:58 +02:00
ThibGandEugen Rochko 56f882aed6 Avoid deleted attributes when building a Status from action log (fixes #8371) (#8373) 2018-08-22 20:55:50 +02:00
ThibGandEugen Rochko f06fa09962 Revert to using Paperclip's filesystem storage, and fix dangling records in remove_remote (#8339)
* Fix uncaching worker

* Revert to using Paperclip's filesystem backend instead of fog-local

fog-local has lots of concurrency issues, causing failure to delete files,
dangling file records, and spurious errors UncacheMediaWorker
2018-08-21 17:53:01 +02:00
ThibGandEugen Rochko 8ac5e651e1 Upgrade doorkeeper to 4.4.2 (#8321) 2018-08-20 22:42:02 +02:00
ThibGandEugen Rochko b34d6238cb Add API endpoint to list featured accounts (fixes #8315) (#8317) 2018-08-20 18:46:04 +02:00
ThibGandEugen Rochko 5fbf12bbb8 Skip pagination logic entirely for pinned toots (fixes #8302) (#8310) 2018-08-20 13:32:43 +02:00
ThibGandEugen Rochko 28163528e5 Don't filter own toots (fixes #8289) (#8298) 2018-08-19 18:44:18 +02:00
ThibGandEugen Rochko abc5548cca Do not process outgoing mentions to suspended accounts (#8272) 2018-08-18 19:42:13 +02:00
ThibGandEugen Rochko 5059989cc7 Use CircleCI workflows for ruby dependencies (#8228)
* Add “bundle clean” suggestion from CircleCI doc

Cf. https://circleci.com/docs/2.0/caching/#bundler-ruby

* Use workspaces instead of caches for ruby gems

Cache are not guaranteed to be available, while the test jobs *require* their
depencies to run. Workspaces are thus more suitable.

One downside is that the order of workspace layer additions need to be
deterministic, which is why install-ruby{2.3,2.4} now depend on
install-ruby2.5.
2018-08-18 04:05:42 +02:00
ThibGandEugen Rochko 59f7f4c923 Implement Undo { Accept { Follow } } (fixes #8234) (#8245)
* Add Follow#revoke_request!

* Implement Undo { Accept { Follow } } (fixes #8234)
2018-08-17 16:24:56 +02:00
ThibGandEugen Rochko 1ee675d68b Use correct activity id in Accept when receiving duplicate Follow (fixes #8218) (#8244) 2018-08-17 14:08:17 +02:00
ThibGandEugen Rochko 4601a58ac2 Defer scrollIntoView after DOM is drawn (fixes #8239) (#8242) 2018-08-17 14:07:38 +02:00
ThibGandEugen Rochko 106fa28a00 Prevent actions log from crashing when displaying deleted status (fixes #8133) (#8219) 2018-08-16 20:05:26 +02:00
ThibGandEugen Rochko c98681c358 Do not error out when performing admin actions on no statuses (#8220)
Fixes the other issue with #8168
2018-08-16 20:02:52 +02:00
ThibGandEugen Rochko be0b372a22 Fix admin.js starting rails-ujs twice (fixes #8168) (#8213) 2018-08-15 23:38:31 +02:00
ThibGandEugen Rochko 4f24dc31dc Fix FixAccountsUniqueIndex migration (#8212) 2018-08-15 20:23:12 +02:00
ThibGandEugen Rochko 625b5a567b Get rid of the Content Warning rainbows (#8129)
* Disable the animated rainbow text when the “Reduce motion” setting is set

* Get rid of the Content Warning rainbows

* Revert to default color for CWs in admin view

Since that colorscheme is apparently broken for some colorblind people.

* Use HTML5's details and summary for statuses with CWs in admin interface
2018-08-15 19:38:56 +02:00
ThibGandEugen Rochko af912fb308 Allow accessing local private/DM messages by URL (#8196)
* Allow accessing local private/DM messages by URL

(Provided the user pasting the URL is authorized to see the toot, obviously)

* Fix SearchServiceSpec tests
2018-08-15 19:33:36 +02:00
ThibGandEugen Rochko ec2c516ab8 Various fixes regarding the video position slider (#8201)
* Prevent default event handling when clicking on the video position slider

This prevents accidental text selection when clicking on the position slider.

* Fix bug when clicking on video position slider before starting the video

* Slightly more aggressive video preloading

- Preload video metadata if the video is loaded in detailed view, as it is
  likely to get played, and metadata is useful for seeking in the video.
- Preload video data if it's fullscreen as it is extremely likely to get
  played right after being put in fullscreen (although those are two steps).
- Preload video data if the user has clicked the position slider, as the video
  will play as soon as the mouse button is released, and video metadata is
  needed to properly seek into the video.
2018-08-14 21:51:17 +02:00
ThibGandEugen Rochko 110b3f6335 Add some feedback to maintenance rake tasks (#8173) 2018-08-11 22:02:55 +02:00
ThibGandEugen Rochko cbc2e6bd40 Make some migration script more robust (fixes #8007) (#8170)
Include a dummy Account class in the migration script containing only the
attributes relevant to the migration in order to not rely as much on the
codebase being in sync with the database schema.
2018-08-11 18:00:41 +02:00
ThibGandEugen Rochko 44680c46ed Ensure single user is a local user (fixes #8154) (#8157) 2018-08-11 11:53:10 +02:00
ThibGandEugen Rochko 1ab8b4b8ea Scroll to linked status in public status view (fixes #7884) (#8130)
When there is a single detailed status on a public page, scroll to it and
replace the history state to not scroll back on refresh (simulates # anchors).
2018-08-06 15:16:02 +02:00
ThibGandEugen Rochko c52bcc0331 Serialize text-less statuses as '.' over OStatus (fixes #7856) (#8126) 2018-08-05 12:22:23 +02:00
ThibGandEugen Rochko dad8a1baf2 Render custom emoji in display name on public profile (#8115) 2018-08-02 15:08:29 +02:00
ThibGandEugen Rochko d425d30804 Use workspace instead of caching for built assets (#8103)
Tests cannot run without built assets, and we want
exactly the matching assets. This is not a cache.
2018-07-30 22:22:55 +02:00
ThibGandEugen Rochko 3c35b34b61 Improve keyboard shortcuts descriptions (#8066)
* Add hotkey variants to keyboard shortcuts description

* Add documentation for “p” hotkey

* yarn manage:translations
2018-07-26 04:51:25 +02:00
ThibGandEugen Rochko d199806969 Prevent scrolling main frame when navigating in image gallery with arrow keys (#8073) 2018-07-26 04:50:50 +02:00
ThibGandEugen Rochko 955d5d36e8 Use LoadingBar instead of blur to indicate that an image is loading (fixes #4060) (#7562) 2018-07-15 01:18:09 +02:00
ThibGandEugen Rochko d0d23b8f0a Do not cause an error if domain_lists.blocks.next is undefined (#8021)
A valid URL is always truthy, so we can simplify this check
2018-07-14 23:28:29 +02:00
ThibGandEugen Rochko 1ca4e51eb3 Add option to not consider word boundaries when processing keyword filtering (#7975)
* Add option to not consider word boundaries when filtering phrases

* Add a few tests for keyword/phrase filtering
2018-07-09 02:22:09 +02:00
ThibGandEugen Rochko ef2bcf51d7 Fix french translation of “Keyword or phrase” (#7980) 2018-07-07 20:45:04 +02:00
ThibGandEugen Rochko 50a2854f92 Fix jpeg files sometimes being returned with a .jpe extension (#7881)
While this isn't exactly *wrong*, files uploaded with a “.jpe” extension will
keep that extension, which will often cause them to be served with an
incorrect mimetype.
2018-06-24 13:33:06 +02:00
ThibGandEugen Rochko 0345cd5a0f Fix error when unmuting a domain without listing muted domains first (#7670) 2018-05-29 16:25:05 +02:00
ThibGandEugen Rochko cdbdf7f98b Ignore multiple occurrences of a hashtag within a status (fixes #7585) (#7606) 2018-05-25 14:26:45 +02:00
ThibGandYamagishi Kazutoshi 2587fcdd27 Use .star-icon instead of hardcoding color in detailed statuses (fixes #7610) (#7613) 2018-05-25 10:03:22 +09:00
ThibGandEugen Rochko d8864b9e9d Fix caret position after selected suggestion and media upload (#7595)
* Fix media upload reseting caret position to last inserted emoji

* Fix caret position after inserting suggestions (fixes #6089)
2018-05-23 15:20:15 +02:00
ThibGandEugen Rochko 39d70f375f Remove unneeded code now that attachment URL isn't appended to toots (#7593) 2018-05-22 19:32:02 +02:00
ThibGandEugen Rochko 0f2fbf7d05 Improvements to toots display in admin view (#7452)
* Distinguish boosts from original statuses in the admin panel (fixes #7449)

* Show the “show more” button in admin view to make CWs clearer (fixes #7451)

* Make content warnings swag
2018-05-12 17:44:15 +02:00
ThibGandEugen Rochko 7467361d70 Fetch boosted statuses on behalf of a follower (fixes #7426) (#7459)
When an ActivityPub Announce is processed and the boosted toot is not known,
fetch it on behalf of one of the booster's followers. This is to allow
fetching self-boosts of previously-unknown private toots.

If fetching on behalf of a user fails, try fetching it anonymously: the
selected follower of a boosting user may be banned by the boosted toot's
author.
2018-05-12 16:48:32 +02:00
ThibGandEugen Rochko 352bae8c3e Update session activation time (fixes #5605) (#7408) 2018-05-11 13:20:58 +02:00
ThibGandEugen Rochko b241cb2704 Change wording of the “undo” media upload button (fixes #6857) (#7417) 2018-05-11 13:20:31 +02:00
ThibGandEugen Rochko be7eeb7856 Catch Paperclip processing failures (fixes #6378) (#7439) 2018-05-11 13:14:50 +02:00
ThibGandEugen Rochko b1938d7853 Do not crash in getStatusIds when there is a gap in the timeline (fixes #7400) (#7415)
Fixes a crash occurring when the “gap” disconnection indicator is to be
displayed in a filtered timeline.
2018-05-08 13:28:55 +02:00
ThibGandEugen Rochko 993e68a7dd Fix hashtags not being federated on mentions (fixes #6900) (#7406) 2018-05-08 03:36:59 +02:00
ThibGandEugen Rochko e06fbc4fcf Fixes/rollback scroll changes (#7387)
* Revert "Do not re-position scroll when loading more (inserting items from below) (#7344)"

This reverts commit 8c601b54cc.

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

This reverts commit 58852695c8.
2018-05-06 22:26:39 +02:00
ThibGandEugen Rochko 5c7bed6bbc Various improvements to the report UI (#7342)
* Also display replies in report modal

* Allow report modal to be up to 80% of viewport height

* Use narrow no-break space where needed in the French translation
2018-05-06 20:38:17 +02:00
ThibGandEugen Rochko ef7d64c801 Dropdowns accessibility (#7318)
* Mark currently selected privacy setting in privacy dropdown

* Prevent Enter keypresses from triggering dropdown display toggle twice

* Give focus to first/selected item of dropdown menus

* Implement keyboard navigation in privacy dropdown

* Implement keyboard navigation in generic dropdown menus
2018-05-04 22:13:26 +02:00
ThibGandEugen Rochko d1aef17f9a Do not render first page of following and followers collections unless explicitly asked to (#7357) 2018-05-04 20:17:01 +02:00
ThibGandEugen Rochko a24605961a Fixes/do not override timestamps (#7336)
* Revert "Fixes/do not override timestamps (#7331)"

This reverts commit 581a5c9d29.

* 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-03 23:02:46 +02:00
ThibGandEugen Rochko 8c601b54cc Do not re-position scroll when loading more (inserting items from below) (#7344) 2018-05-03 22:32:05 +02:00
ThibGandEugen Rochko 581a5c9d29 Fixes/do not override timestamps (#7331)
* Do not override timestamps for incoming toots

* Remove every reference to override_timestamps

Statuses are now created with the announced publishing date
and are only pushed to timelines if that date is at most
6 hours earlier than the time at which it is processed.
2018-05-03 13:33:08 +02:00
ThibGandEugen Rochko 58852695c8 Prevent timeline from moving when cursor is hovering over it (fixes #7278) (#7327) 2018-05-03 12:09:11 +02:00
ThibGandEugen Rochko bd36791832 Do not override timestamps for incoming toots (#7326) 2018-05-03 11:42:52 +02:00
ThibGandEugen Rochko ad5d3134e4 Place emoji picker top if it is closer to the bottom of the viewport (fixes #7277) (#7314) 2018-05-03 10:42:18 +02:00
ThibGandEugen Rochko d0cdd5cf94 Accept actor object updates from all supported actor types (#7312) 2018-05-02 16:08:16 +02:00
ThibGandEugen Rochko 53b1d88873 Fix fullscreen video player (fixes #7244) (#7245) 2018-04-23 20:12:16 +02:00
ThibGandEugen Rochko 597948fb13 Do not set emoji as inline-block (fixes #5743) (#7207) 2018-04-22 12:10:37 +02:00
ThibGandEugen Rochko e5dd385431 Allow boosting own private toots (#6157)
* Adjust policy to allow boosting own private toots

* Add ability to reblog private toots from dropdown menu
2018-04-17 23:35:45 +02:00
ThibGandEugen Rochko 7e0aed398f Fix scrolling behavior (#7151)
* Update React.JS

* Use React's new lifecycles for scrollable lists

* Clean up dead code

* Make CodeClimate happy
2018-04-16 21:04:24 +02:00