Commit Graph
100 Commits
Author SHA1 Message Date
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
ThibGandEugen Rochko 79b00d294d Increase DNS timeouts (#10238) 2019-03-11 13:27:57 +01:00
ThibGandEugen Rochko 5506b9406d Avoid race conditions when creating backups (#10234)
Under load, multiple backups for a single user could be planned, which
is very expensive.
2019-03-11 00:50:31 +01:00
ThibGandEugen Rochko 3a92885a86 Support pushing and receiving updates to poll tallies (#10209)
* Process incoming poll tallies update

* Send Update on poll vote

* Do not send Updates for a poll more often than once every 3 minutes

* Include voters in people to notify of results update

* Schedule closing poll worker on poll creation

* Add new notification type for ending polls

* Add front-end support for ended poll notifications

* Fix UpdatePollSerializer

* Fix Updates not being triggered by local votes

* Fix tests failure

* Fix web push notifications for closing polls

* Minor cleanup

* Notify voters of both remote and local polls when those close

* Fix delivery of poll updates to mentioned accounts and voters
2019-03-11 00:49:31 +01:00
ThibGandEugen Rochko c11dff5049 Reject existing Follows when suspending a remote account (#10230)
* Reject existing Follows when suspending a remote account

Partial fix to #10229

* Add tests
2019-03-10 16:18:58 +01:00
ThibGandEugen Rochko 3f4a6d44fe Fix setting up fields of a previously suspended account (#10222)
Fix #10177 for real
2019-03-08 19:59:08 +01:00
ThibGandEugen Rochko 3aaac4f134 Do not allow adding votes to expired polls (#10214)
* Do not allow adding votes to expired polls

* Only validate expires_at on create
2019-03-08 00:54:50 +01:00
ThibGandEugen Rochko 09c042aa10 Handle StaleObjectError when retrieving polls (#10208) 2019-03-07 15:52:38 +01:00
ThibGandEugen Rochko 34f261e6af Avoid unnecessarily fetching the replies collection when it is empty (#10201) 2019-03-07 01:50:37 +01:00
ThibGandEugen Rochko dfb45374d2 Fix AddLockVersionToPolls migration (#10200) 2019-03-07 01:50:06 +01:00
ThibGandEugen Rochko 96f905f409 Add optimistic lock to avoid race conditions when handling votes (#10196)
* Add optimistic lock to avoid race conditions when handling votes

* Force-reload polls when getting `ActiveRecord::StaleObjectError`
2019-03-06 19:53:57 +01:00
ThibGandEugen Rochko b3668a79ec Disable the underlying button element when an ItemButton is disabled (#10194)
Fixes #10191
2019-03-06 15:10:32 +01:00
ThibGandEugen Rochko cb217444b8 Disable file upload when there is a poll (#10195) 2019-03-06 15:09:18 +01:00
ThibGandEugen Rochko efd0fb8088 Fix newlines in OStatus and RSS serializations (#10183) 2019-03-05 23:58:58 +01:00
ThibGandEugen Rochko 636db1f54f When serializing polls over OStatus, serialize poll options to text (#10160)
* When serializing polls over OStatus, serialize poll options to text

* Do the same for RSS feeds

* Use “[ ] ” as a prefix for poll options instead of “- ”
2019-03-05 21:09:18 +01:00
ThibGandEugen Rochko df5924a1db Do not error out on unsalvageable errors in FetchRepliesService (#10175)
* Do not error out on unsalvageable errors in FetchRepliesService

Fixes #10152

* Fix FetchRepliesWorker erroring out on deleted statuses
2019-03-05 15:21:14 +01:00
ThibGandEugen Rochko d785497ba5 Fix suspended account's fields being set as empty dict instead of list (#10178)
Fixes #10177
2019-03-05 15:19:54 +01:00
ThibGandEugen Rochko cda6ece760 Display closed polls as such (#10156) 2019-03-04 22:52:41 +01:00
ThibGandEugen Rochko 833ffce2df Store remote votes URI (#10158)
* Store remote votes URI

* Add spec for accepting remote votes

* Make poll vote id generation work the same way as follows
2019-03-04 22:51:23 +01:00
ThibGandEugen Rochko 7a25bb858a Ensure only people allowed to see the poll can actually vote (#10161) 2019-03-04 22:47:47 +01:00
ThibGandEugen Rochko f2a1b8b96b Widen allowed time windows for polls (#10162) 2019-03-04 22:46:38 +01:00
ThibGandEugen Rochko 3de71887d8 Add non-JS fallback for polls on public pages (#10155) 2019-03-04 18:03:12 +01:00
ThibGandEugen Rochko 4ced609497 Fixes to the polls UI (#10150)
* Allow unselecting choices in multiple choice polls

* Properly disable checkboxes/radio buttons for polls in public pages

* Visually differentiate checkboxes and radio buttons
2019-03-04 01:54:14 +01:00
ThibGandEugen Rochko f821eca3b3 Correctly make polls and media mutually exclusive (#10141) 2019-03-04 00:40:21 +01:00
ThibGandEugen Rochko e13d3792f3 Make sure the poll is created before storing its id (#10142)
* Make sure the poll is created before storing its id

* Fix updating poll results

* Support fetching Question activities from the search bar
2019-03-04 00:39:06 +01:00
ThibGandEugen Rochko 26c56d0c10 Insert polls in redux stores before statuses so it avoids crashes (#10140) 2019-03-03 23:44:52 +01:00
ThibGandEugen Rochko 99dc212ae5 Fix lists export (#10136) 2019-03-03 15:38:47 +01:00
ThibGandEugen Rochko ee7d79c0ce Fix serialization of boosts (#10129)
The condition introduced by #9998 was wrong, serializing boosts
that weren't self-boosts, and not serializing self-boosts.
2019-02-28 21:35:16 +01:00
ThibGandEugen Rochko d8498b3983 Give the replies collection an identifier and enable pagination (#10128) 2019-02-28 18:16:34 +01:00
ThibGandEugen Rochko 9d3c6f1849 Improved remote thread fetching (#10106)
* Fetch up to 5 replies when discovering a new remote status

This is used for resolving threads downwards. The originating
server must add a “replies” attributes with such replies for it to
be useful.

* Add some tests for ActivityPub::FetchRepliesWorker

* Add specs for ActivityPub::FetchRepliesService

* Serialize up to 5 public self-replies for ActivityPub notes

* Add specs for ActivityPub::NoteSerializer

* Move exponential backoff logic to a worker concern

* Fetch first page of paginated collections when fetching thread replies

* Add specs for paginated collections in replies

* Move Note replies serialization to a first CollectionPage

The collection isn't actually paginable yet as it has no id nor
a `next` field. This may come in another PR.

* Use pluck(:uri) instead of map(&:uri) to improve performances

* Fix fetching replies when they are in a CollectionPage
2019-02-28 15:22:21 +01:00
ThibGandEugen Rochko 6e8743d17a Fix direct timeline pagination in the WebUI (#10126)
The `hasMore` property of timelines in redux store was set whenever an API
request returned only one page of results, *even* if the query only requested
newer conversations (using `since_id`), causing `hasMore` to be incorrectly set to
false whenever fetching new toots in the direct timeline, which happens each time
the direct message column is opened.

(Basically #9516 for direct messages)
2019-02-27 19:13:16 +01:00
ThibGandEugen Rochko 9edab46368 Fix mention processing for unknwon accounts on incoming ActivityPub Notes (#10125)
`::FetchRemoteAccountService` is not `ActivityPub::FetchRemoteAccountService`,
its second argument is the pre-fetched body. Passing `id: false` actually passed
a `Hash` as the prefetched body, instead of properly resolving unknown remote
accounts.
2019-02-27 14:57:14 +01:00
ThibGandEugen Rochko 9dd54ffb1c Avoid redundant HTTP request on some error cases (#10115) 2019-02-25 15:54:17 +01:00
ThibGandEugen Rochko 738c034213 Do not error out when performing admin actions on no statuses (#10094)
Same as #8220 but for reports
2019-02-21 19:36:48 +01:00
ThibGandEugen Rochko 8e7fc7ec73 Fix crash when conversations have no valid participants (#10078)
* Never return empty participants for conversations

Fixes #10068

* Fix client-side crash when conversations have no participants
2019-02-19 20:00:41 +01:00
ThibGandEugen Rochko 359d26a053 Fix “reset” button of instance filter switching to custom emoji admin panel (#10076) 2019-02-19 14:01:22 +01:00
ThibGandEugen Rochko 3a8cb6c737 Add quick link from admin account view to block/unblock instance (#10073) 2019-02-18 14:59:46 +01:00
ThibGandEugen Rochko 6840a77711 Add domain search/filter to the "Federation" (/admin/instances) page (#10071) 2019-02-18 14:59:19 +01:00
ThibGandEugen Rochko 2f7f6af26a Hide domain filter in admin page when “local” filter is active (#10074)
Since the “domain” field is ignored in this case.
2019-02-18 13:37:13 +01:00
ThibGandEugen Rochko d1d7d14f77 Fix video player width not being updated to fit container width (#10069) 2019-02-18 00:10:21 +01:00
ThibGandEugen Rochko 041ff5fa9a Fix crash on public hashtag pages when streaming fails (#10061) 2019-02-16 14:53:27 +01:00
ThibGandEugen Rochko 188f1c7c89 Add list title editing (#9748)
* Add list title editing

Port changes made by ash for glitch-soc

* Code style fixes
2019-02-13 18:52:02 +01:00
ThibGandEugen Rochko 6a5307a573 Alternative handling of private self-boosts (#9998)
* When self-boosting, embed original toot into Announce serialization

* Process unknown self-boosts from Announce object if it is more than an URI

* Add some self-boost specs

* Only serialize private toots in self-Announces
2019-02-13 18:36:23 +01:00
ThibGandEugen Rochko 98d1a1f117 Disable box shadows for featured hashtags in light theme (#10034)
Fixes #9990
2019-02-13 18:33:03 +01:00
ThibGandEugen Rochko 67215692fc Save IP address used for sign-up, not only sign-in (#10026)
Fixes #9995
2019-02-12 22:24:14 +01:00
ThibGandEugen Rochko 99c4b5b75a Move sending account Delete to anyone but the account's followers to the pull̀ queue (#10016) 2019-02-12 05:10:43 +01:00
ThibGandEugen Rochko aee93bfc9c Fix timeline jumps (#10001)
* Avoid two-step rendering of statuses as much as possible

Cache width shared by Video player, MediaGallery and Cards at the
ScrollableList level, pass it down through StatusList and Notifications.

* Adjust scroll when new preview cards appear

* Adjust scroll when statuses above the current scroll position are deleted
2019-02-11 13:19:59 +01:00
ThibGandEugen Rochko d09ce6d81b Fix IntersectionObserverArticle not hiding some out-of-view items (#9982)
IntersectionObserverArticle is made to save on RAM by avoiding fully rendering
items that are far out of view. However, it did not work for items spawned
outside the intersection observer.
2019-02-06 23:36:43 +01:00
ThibGandEugen Rochko 1ac9a3f4bb Hide misleading “You will be sent a confirmation e-mail” hint from admin view (#9973)
Thanks @wryk for noticing this issue.
2019-02-05 15:11:35 +01:00
ThibGandEugen Rochko ed30110618 Make displaying application used to toot opt-in (#9897)
* Make storing and displaying application used to toot opt-in

* Revert to storing application info, and display it to the author via API
2019-02-02 19:18:15 +01:00
ThibGandEugen Rochko a53dcaa298 Fix initial value of volume slider in video player and handle volume changes (#9929)
* Fix initial value of volume slider in video player and handle volume changes

* Clean up dead/incorrect code
2019-01-27 21:18:15 +01:00
ThibGandEugen Rochko ec5bd8b8bb Implement missing hotkeys for notifications (#9927) 2019-01-27 17:54:54 +01:00
ThibGandEugen Rochko e2a5be6e9a Prevent posting toots with media attachments from someone else (#9921) 2019-01-26 23:59:39 +01:00
ThibGandEugen Rochko 061feb63ed Fix scheduled toot with media immediately creating a toot (#9894)
* Add test for not persisting status when attaching media to scheduled toot

* Prevent status used for validation from being persisted to the database

Fixes #9893

Thanks to tateisu for the help investigating this.
2019-01-21 20:03:04 +01:00
ThibGandEugen Rochko aeb124491d Reject existing Follow in addition to sending a Block (#9811)
Mastodon expects remote servers to remove follow relationships upon receiving
a Block. However, the spec only evokes Block activities in a C2S context, never
in a S2S context.

This PR, in addition to federating the Block, explicitly sends a Reject for any
affected follow relationship, which makes a bit more sense with regards to the
spec.
2019-01-18 15:57:19 +01:00
ThibGandEugen Rochko 75b1488cf4 Add tombstones for remote statuses (#9830)
* Add Tombstone model to remember object deletion

* Do not recreate a status if it has been deleted

* Record Tombstone for remote deleted items

Also, only record deleted items from same-host actors

* Clear an user's tombstones when their key change
2019-01-18 15:56:55 +01:00
ThibGandEugen Rochko 3b3a4d8a17 Fix public hashtag timeline width on mobile, fix scrollbar width compensation (#9824)
* Fix hashtag timeline width being potentially larger than window width

* Add automatic computation of scrollbar width
2019-01-16 20:36:10 +01:00
ThibGandEugen Rochko a4f07bad95 Reduce chances of race conditions when processing deleted toots (#9815)
* Reduce chances of race conditions when processing deleted toots

* Prevent race condition when processing deleted toots
2019-01-16 15:42:00 +01:00
ThibGandEugen Rochko 6cfb357940 Make hashtag search results link to the hashtag URL (#9810)
Currently, middle-clicking on a hashtag search result will open a new
instance of the WebUI, which is inconsistent with middle-clicking on
an account result, or a hashtag in a toot.
2019-01-14 23:29:21 +01:00
ThibGandEugen Rochko c5b8824a3e Fix hashtag timeline on mobile (#9806)
Instead of forcing 90vh for the scrollable part of the timeline's height as
in #9781 (which may be off), use `display: flex`, exactly like on desktop.
2019-01-14 17:30:31 +01:00
ThibGandEugen Rochko 2648645d05 Display a double reply arrow on public pages for toots that are replies (#9808) 2019-01-14 17:29:04 +01:00
ThibGandEugen Rochko 4fb94c758e Add attachment list fallback to public pages (#9780)
* Add attachment list fallback to public pages

Fixes #6714

* Refactor attachments lists
2019-01-13 09:23:54 +00:00
ThibGandEugen Rochko c3a657223f Hide CWed content in notifications and fix sensitive images without CWs (#9778)
Fixes #9634
2019-01-11 07:29:17 +00:00
ThibGandEugen Rochko 70801b850c Postpone scroll-to-detailed status after react components are loaded (#9773) 2019-01-10 15:13:30 +01:00
ThibGandEugen Rochko 5104b61b6b Downgrade react-redux-loading-bar to 4.0.8 to fix media modal (#9771) 2019-01-10 15:13:00 +01:00
ThibGandEugen Rochko 28b482874a Improvements to signature verification (#9667)
* Refactor signature verification a bit

* Rescue signature verification if recorded public key is invalid

Fixes #8822

* Always re-fetch AP signing key when HTTP Signature verification fails

But when the account is not marked as stale, avoid fetching collections and
media, and avoid webfinger round-trip.

* Apply stoplight to key/account update as well as initial key retrieval
2019-01-07 21:45:13 +01:00
ThibGandEugen Rochko 6f9a7bd02c Add quick links to the admin interface in the WebUI (#8545)
* Allow to show a specific status in the admin interface

* Let the front-end know the current account is a moderator

* Add admin links to status and account menus

If the current logged-in user is an admin, add quick links to the admin
interface in account and toot dropdown menu. Suggestion by @ashkitten

* Use @statuses.first instead of @statuses[0]
2019-01-04 13:10:43 +01:00
ThibGandEugen Rochko eb3b9e22bd Fix CircleCI (#9695) 2019-01-02 20:48:22 +01:00
ThibGandEugen Rochko 70be301d69 Ensure blocked user unfollows blocker if Block/Undo Block are processed out of order (#9687)
* Ensure blocked user unfollows blocker if Block/Undo Block are processed out of order

* Add specs for Block causing unfollow and for out-of-order Block + Undo
2019-01-02 01:12:02 +01:00
ThibGandEugen Rochko f04f3ee436 Fix icon alignment in onboarding interaction screen (#9686) 2019-01-01 16:19:51 +01:00
ThibGandEugen Rochko 1d4215be77 Restore ReplyDistributionWorker to allow existing jobs to be processed (#9676) 2019-01-01 13:43:11 +01:00
ThibGandEugen Rochko 6fb6a53938 Avoid duplicate work by merging ReplyDistributionWorker into DistributionWorker (#9660) 2018-12-30 19:00:04 +01:00