Commit Graph
100 Commits
Author SHA1 Message Date
ThibGandEugen Rochko 39741fa2cd Scroll to compose form rather than reply indicator on focus (#11182) 2019-08-06 21:52:25 +02:00
ThibGandEugen Rochko 5b3d70ffa7 Display FTS warning based on actual search term, not the one being typed (#11202)
Follow-up to #11112
2019-08-06 21:52:00 +02:00
ThibGandEugen Rochko 011909262a Add message telling FTS is disabled when no toot can be found because of this (#11112)
* Add message telling FTS is disabled when no toot can be found because of this

Fixes #11082

* Remove info icon and reword message
2019-08-06 21:52:00 +02:00
ThibGandEugen Rochko 6e28da2139 Apply filters to poll options (#11174)
* Apply filters to poll options in WebUI

Fixes #11128

* Apply filters to poll options server-side

* Add poll options to searchable text
2019-08-06 21:52:00 +02:00
ThibGandEugen Rochko c83c87fbe2 Fix boosting & unboosting preventing a boost from appearing in the TL (#11405)
* Fix boosting & unboosting preventing a boost from appearing in the TL

* Add tests

* Avoids side effects when aggregate_reblogs isn't true
2019-08-06 21:51:29 +02:00
ThibGandEugen Rochko 363afe5e05 Memoize ancestorIds and descendantIds in detailed status view (#11234) 2019-08-06 21:51:02 +02:00
ThibGandEugen Rochko d588173ab3 Optimize makeGetStatus (#11211)
* Optimize makeGetStatus

Because `ImmutableList.filter` always returns a new object and `createSelector`
memoizes based on object identity, the selector returned by `makeGetStatus`
would *always* execute.

To avoid that, we wrap `getFilters` into a new memoizer that memoizes based on
deep equality, thus returning the same object as long as the filters haven't
changed, allowing the memoization of `makeGetStatus` to work.

Furthermore, we memoize the compiled regexs instead of recomputing them each
time the selector is called.

* Fix memoized result being cleared too often

* Make notifications use memoized getFiltersRegex
2019-08-06 21:51:02 +02:00
ThibGandEugen Rochko 6a3876bdaa Fix some flash notices/alerts staying on unrelated pages (#11364) 2019-08-06 21:50:45 +02:00
ThibGandEugen Rochko 5d79df0273 Fix expiration date of filters being set to “Never” when editing them (#11204)
When editing a custom filter, select the shortest preset duration that
still covers the remaining time of that filter.

Fixes #9506
2019-08-06 21:50:45 +02:00
ThibGandEugen Rochko 8904487324 Fix invites not being disabled upon account suspension (#11412)
* Disable invite links from disabled/suspended users

* Add has_many invites relationship to users

* Destroy unused invites when suspending an account
2019-08-06 21:50:06 +02:00
ThibGandEugen Rochko 6782922584 Fix BlockService trying to reject incorrect follow request (#11288)
Fixes #11148
2019-08-06 21:50:05 +02:00
ThibGandEugen Rochko 8066717558 Fix Status.remote scope matching *all* statuses (#11265) 2019-08-06 21:50:05 +02:00
ThibGandEugen Rochko 5a06f68f0e Fix BackupService crashing when an attachment is missing (#11241)
* Fix BackupService crashing when an attachment is missing

For various reasons such as admin error or out-of-sync media and
database backups, it might be possible for local attachments to be lost.

This commit allows the BackupService to continue its work even if some media
file is missing.

* Change error message
2019-08-06 21:50:05 +02:00
ThibGandEugen Rochko de747948a1 Fix swiping columns on mobile sometimes failing (#11200)
Fixes #9779
2019-08-06 21:50:05 +02:00
ThibGandEugen Rochko c95ce1f3ac Fix account URI in UpdatePollSerializer (#11194)
* Fix account URI in UpdatePollSerializer

Fixes #11185

* Add specs
2019-08-06 21:50:05 +02:00
ThibGandEugen Rochko c8fae508cf Completely hide toots matched by “irreversible” filters even if they got to the client (#11113)
Fixes #11090
2019-06-18 18:23:08 +02:00
ThibGandEugen Rochko 17747e2cd7 Fix User#active scope only returning suspended users (#11111)
Fix a regression from #10660
2019-06-18 18:22:02 +02:00
ThibGandEugen Rochko 01e362316c Do not scroll in the compose panel on single-column (#11093) 2019-06-16 18:46:55 +02:00
ThibGandEugen Rochko b4d67fe57a Fix ordering of keyboard access between CW field, textarea and emoji picker (#11066) 2019-06-13 17:07:43 +02:00
ThibGandEugen Rochko dd45c63921 List attachments in reply indicator and boost modal (#10997)
* Add media attachments list to boost modal

* Add attachment list to reply indicator
2019-06-13 17:04:52 +02:00
ThibGandEugen Rochko a4a502e85c Do not expand toot when clicking on a poll option (#11067)
Fixes regression introduced by e9ddd5a159
2019-06-13 00:16:46 +02:00
ThibGandEugen Rochko 1b4dcc3f78 Only show profile directory link when it's enabled (#11064) 2019-06-13 00:16:27 +02:00
ThibGandEugen Rochko c98573fdf9 Add button to conveniently copy OAuth code (#11065) 2019-06-13 00:14:42 +02:00
ThibGandEugen Rochko faafc3ae25 Fix border-bottom of active tab bars (#11068) 2019-06-13 00:14:27 +02:00
ThibGandEugen Rochko 5bcd98172c Fix clicking on the left side of a conversation not marking it as read (#11041) 2019-06-10 19:27:10 +02:00
ThibGandEugen Rochko e428e320b6 Fix old migrations failing because of new version of strong_migrations (#11018) 2019-06-09 22:55:28 +02:00
ThibGandEugen Rochko e9ddd5a159 Put poll options behind content warnings (#10983)
* Put poll options behind CWs in WebUI

* Put polls behind CWs on public pages

* Add poll icon to public pages CWs

* Revert to not showing an icon in the CW button
2019-06-08 17:40:59 +02:00
ThibGandEugen Rochko cdb420862e Fix display of alt-text when a media attachment is not available (#10981) 2019-06-07 12:41:08 +02:00
ThibGandEugen Rochko 2657765d2a Fix “mark as sensitive” not being used in delete & redraft (#10980) 2019-06-06 13:04:34 +02:00
ThibGandEugen Rochko cac9110533 Cleanup various controllers (#10972)
* Remove skip_session! as it is not supported in Rails 5

* Minor cleanup in StreamEntriesController

* Remove redundant mark_cacheable! calls
2019-06-05 14:02:59 +02:00
ThibGandEugen Rochko 7fa23ec697 Fix potential private status leak (#10969) 2019-06-05 13:40:20 +02:00
ThibGandEugen Rochko d34a3a2cc7 Fix refreshing featured toots when the new collection is empty (#10971)
Fixes #10945
2019-06-05 13:39:59 +02:00
ThibGandEugen Rochko 6c464cd424 Do not misattribute inlined boosts if attributedTo isn't present (#10967)
* Do not misattribute inlined boosts if `attributedTo` isn't present

Fixes #10950

* Fix tests
2019-06-04 23:24:31 +02:00
ThibGandEugen Rochko 3a84bacf86 Handle blank poll options more gracefully (#10946)
Pleroma currently allows (erroneously imho) empty poll options, that is,
options with an empty (but existing) `name`.
2019-06-03 20:04:00 +02:00
ThibGandEugen Rochko a353dc6030 Fix NotifyService test with regards to reblogs (#10928)
Fixes #10890
2019-06-02 18:08:26 +02:00
ThibGandEugen Rochko 1c78d600d3 Fix old migrations failing because of new version of strong_migrations (#10904) 2019-05-30 22:35:29 +03:00
ThibGandEugen Rochko 3333250ede Fix React warning about legacy lifecycle calls and sensitive status resetting (#10872) 2019-05-29 17:33:15 +03:00
ThibGandEugen Rochko fe3b863926 Fix web push notifications for polls (#10864)
Fixes #10861
2019-05-28 00:26:08 +02:00
ThibGandEugen Rochko 0e9b8be18a Improve rate limiting (#10860)
* Rate limit based on remote address IP, not on potential reverse proxy

* Limit rate of unauthenticated API requests further

* Rate-limit paging requests to one every 3 seconds
2019-05-27 21:57:49 +02:00
ThibGandEugen Rochko a472190729 Add a keyboard shortcut to hide/show media (#10647)
* Move control of media visibility to parent component

* Add keyboard shortcut to toggle media visibility
2019-05-25 23:20:51 +02:00
ThibGandEugen Rochko d63c3c0cef Improve streaming server security (#10818)
* Check OAuth token scopes in the streaming API

* Use Sec-WebSocket-Protocol instead of query string to pass WebSocket token

Inspired by https://github.com/kubevirt/kubevirt/issues/1242
2019-05-24 15:21:42 +02:00
ThibGandEugen Rochko 9a5561a5b8 Fix possible race condition when processing statuses (#10815) 2019-05-23 20:00:39 +02:00
ThibGandEugen Rochko 89d600bedb Move signature verification stoplight to the requests themselves (#10813)
* Move signature verification stoplight to the requests themselves

This avoids blocking messages from known keys for 5 minutes when only one fails…

* Put the stoplight on the actual client IP, not a potential reverse proxy
2019-05-23 15:22:39 +02:00
ThibGandEugen Rochko 9efcca3c54 Retry ActivityPub inbox delivery on HTTP 401 and 408 errors (#10812)
HTTP 401 responses returned by Mastodon's inbox controller may
be temporary if, for instance, the requesting user's actor/key json
could not be retrieved in a timely fashion. This changes allow retries
instead of dropping the message entirely.

Also added HTTP 408 as that error is by nature temporary.
2019-05-23 15:00:30 +02:00
ThibGandEugen Rochko ae18386558 Fix “invited by” not showing up for invited accounts in admin interface (#10791) 2019-05-19 21:40:36 +02:00
ThibGandEugen Rochko 4edf5213dc Add post-deployment migration script to delete public-boosts-of-private-toots (#10783) 2019-05-19 13:49:31 +02:00
ThibGandEugen Rochko a1519a8ef5 Prevent from publicly boosting one's own private toots (#10775) 2019-05-18 00:28:51 +02:00
ThibGandEugen Rochko c1c8c7b2c8 Minor performance improvements and cleanup in formatter (#10765) 2019-05-15 06:54:06 +02:00
ThibGandEugen Rochko 14f6ce2885 Record account suspend/silence time and keep track of domain blocks (#10660)
* Record account suspend/silence time and keep track of domain blocks

* Also unblock users who were suspended/silenced before dates were recorded

* Add tests

* Keep track of suspending date for users suspended through the CLI

* Show accurate number of accounts that would be affected by unsuspending an instance

* Change migration to set silenced_at and suspended_at

* Revert "Also unblock users who were suspended/silenced before dates were recorded"

This reverts commit a015c65d2d1e28c7b7cfab8b3f8cd5fb48b8b71c.

* Switch from using suspended and silenced to suspended_at and silenced_at

* Add post-deployment migration script to remove `suspended` and `silenced` columns

* Use Account#silence! and Account#suspend! instead of updating the underlying property

* Add silenced_at and suspended_at migration to post-migration

* Change account fabricator to translate suspended and silenced attributes

* Minor fixes

* Make unblocking domains always retroactive
2019-05-14 19:05:02 +02:00
ThibGandEugen Rochko dd118449c2 Fix incorrect reference to raw_content (it is raw_text instead) (#10753) 2019-05-11 23:56:07 +02:00
ThibGandEugen Rochko 6d44f2441b Add toot source to delete result to ease Delete & Redraft (#10669)
* Return Status with raw text in raw_content when deleting a status

* Use raw content if available on delete & redraft

* Rename raw_content to text; do not serialize formatted content when source is requested
2019-05-11 06:46:43 +02:00
ThibGandEugen Rochko 6dc9baad2a Change icon and label depending on whether media is marked as sensitive (#10748)
* Change icon and label depending on whether media is marked as sensitive

* WiP use a checkbox
2019-05-10 17:59:57 +02:00
ThibGandEugen Rochko f2be71c293 Add emoji suggestions to CW and poll option fields (#10555)
* Refactor selectComposeSuggestion so that different paths can be updated

* Add suggestions in CW field

* Add emoji suggestion to poll options

* Attempt to fix CSS

* Hide suggestions by default

They will be enabled if the input has focus
2019-05-09 22:10:27 +02:00
ThibGandEugen Rochko 62f5235b6f Prevent silenced local users from notifying remote users not following them (#10575)
* Prevent silenced local users from notifying remote users not following them

This is an attempt to extend the local restrictions of silenced users to the
federation.

* Add tests

* Add tests for making sure private status don't get sent over OStatus
2019-05-09 22:05:43 +02:00
ThibGandEugen Rochko 26fc21c188 Add some caching for HTML versions of statuses pages (#10701) 2019-05-09 22:03:44 +02:00
ThibGandEugen Rochko b2f5b1045f Add description on hover in media gallery (#10713) 2019-05-06 05:33:56 +02:00
ThibGandEugen Rochko 7aa749ab46 Fix transition: all (#10699) 2019-05-04 17:39:53 +02:00
ThibGandEugen Rochko 4f73cde4e1 Minor account media gallery fixes (#10695)
* Make the cursor icon consistant across media types in account media gallery

* Fix the video player modal causing scroll position to reset
2019-05-04 17:36:43 +02:00
ThibGandEugen Rochko b85f216cbc Do not retry processing ActivityPub jobs raising validation errors (#10614)
* Do not retry processing ActivityPub jobs raising validation errors

Jobs yielding validation errors most probably won't ever be accepted,
so it makes sense not to clutter the queues with retries.

* Lower RecordInvalid error reporting to debug log level

* Remove trailing whitespace
2019-05-03 23:45:37 +02:00
ThibGandEugen Rochko 91634947f8 Explicitly disable storage of REST API results (#10655)
Fixes #10652
2019-05-03 20:39:19 +02:00
ThibGandEugen Rochko 011b032300 Provide a link to existing domain block when trying to block an already-blocked domain (#10663)
* When trying to block an already-blocked domain, provide a link to the block

* Fix styling for links in flash messages

* Allow blocks to be upgraded but not downgraded
2019-05-03 20:36:36 +02:00
ThibGandEugen Rochko 5121d9c12f When selecting a toot via keyboard, ensure it is scrolled into view (#10593) 2019-05-03 06:20:35 +02:00
ThibGandEugen Rochko 21a73c52a7 Check that an invite link is valid before bypassing approval mode (#10657)
* Check that an invite link is valid before bypassing approval mode

Fixes #10656

* Add tests

* Only consider valid invite links in registration controller

* fixup
2019-05-02 04:30:12 +02:00
ThibGandEugen Rochko c4f2433300 Disallow robots from indexing /interact/ (#10666)
This does not provide any new information and may just triple the number
of crawled pages
2019-05-02 00:10:19 +02:00
ThibGandYamagishi Kazutoshi 0db269f3dc Minor fixes to the French translation (#10662) 2019-05-01 22:19:55 +09:00
ThibGandEugen Rochko 852ccea676 Fix upload progressbar when image resizing is involved (#10632) 2019-04-25 02:48:54 +02:00
ThibGandEugen Rochko b1a0322a06 Reject follow requests of blocked users (#10633) 2019-04-25 02:47:33 +02:00
ThibGandEugen Rochko 0e78862b61 Allow switching between singe-option and multiple-option polls (#10603) 2019-04-22 14:56:14 +02:00
ThibGandEugen Rochko bdec58b514 Minor code cleanup (#10613) 2019-04-22 14:55:24 +02:00
ThibGandEugen Rochko 6e620dcab1 Use correct local names for fonts (#10594) 2019-04-21 04:42:02 +02:00
ThibGandYamagishi Kazutoshi 7f75792bf3 Allow modal secondary button to shrink and allow wider confirmation modals (#10586)
Fixes #10531
2019-04-16 08:23:07 +09:00
ThibGandEugen Rochko 5247ea4efd Fix batch actions not working on pending accounts (#10508) 2019-04-08 18:35:41 +02:00
ThibGandEugen Rochko cb71c95e22 Export and import show_reblogs together with following list (#10495)
* Refactor imports

* Export show_reblogs when exporting list of followed users

* Add support for importing show_reblogs with following collection

* Fix tests
2019-04-08 07:28:27 +02:00
ThibGandEugen Rochko cc6e3c3900 Cache featured collections, as well as outbox, followers and following (#10467) 2019-04-04 01:30:44 +02:00
ThibGandEugen Rochko d4882aa64a Export and import hide_notifications alongside user mutes (#10335)
* Export hide_notifications along with user mutes

* Import hide_notifications along with muted users list

* Add headers for CSV exports
2019-04-03 18:17:43 +02:00
ThibGandEugen Rochko daab45d4ae Update poll remaining time just like with status timestamps (#10466) 2019-04-03 18:16:55 +02:00
ThibGandEugen Rochko d07b0c038f Hopefully fix input text selection quirks on iOS (#10463)
Fix #10448 (hopefully)
2019-04-03 17:54:54 +02:00
ThibGandEugen Rochko 120544067f Fix filtering of favourited_by, reblogged_by, followers and following (#10447) 2019-04-01 21:24:28 +02:00
ThibGandEugen Rochko 62bafa20a1 Hide blocking accounts from blocked users (#10442)
* Revert "Add indication that you have been blocked in web UI (#10420)"

This reverts commit bd02ec6daa.

* Revert "Add `blocked_by` relationship to the REST API (#10373)"

This reverts commit 9745de883b.

* Hide blocking accounts from search results

* Filter blocking accouts from account followers

* Filter blocking accouts from account's following accounts

* Filter blocking accounts from “reblogged by” and “favourited by” lists

* Remove blocking account from URL search

* Return 410 on trying to fetch user data from a user who blocked us

* Return 410 in /api/v1/account/statuses for suspended or blocking accounts

* Fix status filtering when performing URL search

* Restore some React improvements

Restore some cleanup from bd02ec6daa

* Refactor by adding `without_blocking` scope
2019-04-01 20:06:13 +02:00
ThibGandEugen Rochko 2acd8940de Fix more keybase-related test failures (#10443) 2019-04-01 19:10:44 +02:00
ThibGandEugen Rochko 68c797bece Ensure request.body isn't emptied out before signature verification (#10432)
Fixes #10429
2019-03-31 17:27:24 +02:00
ThibGandEugen Rochko abecaba317 Fix failing keybase-related test (#10428) 2019-03-30 18:15:23 +01:00
ThibGandEugen Rochko 58667072d9 Fix opacity of relationship tags (#10411) 2019-03-28 18:33:26 +01:00
ThibGandEugen Rochko a91acf79b5 Move the account dropdown menubar to the right, make sure it doesn't move (#10390)
* Move the account dropdown menubar to the right, make sure it doesn't move

* Fix margin
2019-03-26 23:05:21 +01:00
ThibGandEugen Rochko 6df4a82969 Add a “Block & Report” button to the block confirmation dialog (#10360) 2019-03-26 17:34:02 +01:00
ThibGandEugen Rochko 0c46bd11aa Fix HTML validation (#10354)
* Fix HTML validation

* Report first HTML error instead on validation error
2019-03-26 17:33:26 +01:00
ThibGandEugen Rochko 94aceb85ad Do not empty timeline of blocked users on block (#10359)
Fixes #10226
2019-03-24 19:15:58 +01:00
ThibGandEugen Rochko 2361917944 Mark the 410 gone response for suspended accounts as cachable (#10339)
This will help a great deal with #9377 when a caching reverse proxy is
configured.
2019-03-21 23:33:18 +01:00
ThibGandEugen Rochko 62dd0b7f9c Fix processing poll Updates (#10333)
ActivityPub::ProcessPollService was checking the JSON-LD context although
it was passed only the `Question` object embedded in the `Update` activity.
2019-03-21 14:24:09 +01:00
ThibGandEugen Rochko 80f0910e21 Add support for custom emojis in poll options (#10322)
* Backend changes for custom emoji support in poll options

* Serialize poll emojis in REST API

* Render custom emojis in poll options

* Render custom emoji in poll options on public pages
2019-03-20 17:29:12 +01:00
ThibGandEugen Rochko 66d9452092 Do not try fetching keys of unknown accounts on a Delete from them (#10326) 2019-03-20 17:20:16 +01:00
ThibGandEugen Rochko 158c31b9df Reduce padding around logo on landing page (#10291) 2019-03-19 23:47:10 +01:00
ThibGandEugen Rochko 1217185cfa Do not distribute Delete when rejecting unapproved accounts (#10321) 2019-03-19 16:33:30 +01:00
ThibGandEugen Rochko d041b7a1e7 Do not show timeline preview or directory widgets if they are disabled (#10284) 2019-03-19 05:48:17 +01:00
ThibGandEugen Rochko a20354a20b Set and store report URIs (#10303)
Fixes #10271
2019-03-17 15:34:56 +01:00
ThibGandEugen Rochko 5e38ef87a7 Fix reblogs privacy (#10302)
* Fix reblogs privacy

* Fix Announce processing specs
2019-03-17 14:54:09 +01:00
ThibGandEugen Rochko 7477db7268 Save quick filter settings when selecting a different filter (#10296)
The active filter is stored in the web app's settings, but no save
is explicitly triggered, meaning that it is only saved when a different
setting is changed.
2019-03-17 03:13:29 +01:00
ThibGandEugen Rochko 6b0eda14a1 Avoid race condition when streaming deleted statuses (#10280)
* Avoid race condition when streaming deleted statuses

* Move redis lock to DistributionWorker to avoid extra Redis value
2019-03-16 20:18:47 +01:00
ThibGandEugen Rochko 9915777a17 Migrate existing open_registrations setting to the new registrations_mode (#10269)
* Migrate existing `open_registrations` setting to the new `registrations_mode`

Fixes #10263

* Remove unrelated db changes that have creeped in
2019-03-14 20:10:43 +01:00
ThibGandEugen Rochko 65d9004ac9 Add UI for enabling/disabling poll notifications (#10255)
* Add UI for enabling/disabling poll notifications

* Add poll notifications to the (advanced) quick filter bar

* Update poll notification message

“Your poll has ended” → “A poll you have voted in has ended”

* Clear up associated notifications when a poll is deleted
2019-03-13 19:29:54 +01:00