Commit Graph

203 Commits (4c99d23df8bc6580d958cfd464e0b5ee10e6bce2)

Author SHA1 Message Date
Eugen Rochko fd35d69b4f Change note length validation to ignore mention domains and URLs ()
Fix 
2019-01-05 07:16:46 +01:00
Eugen Rochko 6936271536 Improve e-mail digest ()
- Reduce time-to-digest from 20 to 7 days
- Fetch mentions starting from +1 day since last login
- Fix case when last login is more recent than last e-mail
- Do not render all mentions, only 40, but show number in subject
- Do not send digest to moved accounts
- Do send digest to silenced accounts
2019-01-02 10:47:32 +01:00
Eugen Rochko 4e3131f02f Add handler for Move activity () 2018-12-29 02:24:36 +01:00
chr v1.x b659f51c43 Add local followers page to admin account UI ()
* Add local followers page to admin account UI

For moderation, I often find myself wondering who, locally, is following
a remote user. Currently, to see this, I have to go back to the web UI,
paste in their full handle, click their profile, and go to the
"Followers" tab (plus, this information is incidental, and if mastodon
ever decides to resolve all of the follower information, there will be
no place local followers are shown). This PR adds a new page which is
accessible via the "following" count on the admin's account view
page, which shows the local followers. (It has filter parameters for
account location to indicate that only local followers are shown, and
leave room for expansion if mastodon ever decides to store the entire
remote follow list).

* Normalize en.yml
2018-12-27 13:15:39 +01:00
ysksn 75e3538da4 Create DomainNormalizable#normalize_domain () 2018-12-26 06:38:42 +01:00
Eugen Rochko 2e0d617b8b Add moderation warnings ()
* Add moderation warnings

Replace individual routes for disabling, silencing, and suspending
a user, as well as the report update route, with a unified account
action controller that allows you to select an action (none,
disable, silence, suspend) as well as whether it should generate an
e-mail notification with optional custom text. That notification,
with the optional custom text, is saved as a warning.

Additionally, there are warning presets you can configure to save
time when performing the above.

* Use Account#local_username_and_domain
2018-12-22 20:02:09 +01:00
Eugen Rochko 5573216d67 Fix regression in () 2018-12-17 04:32:36 +01:00
Eugen Rochko 32bd452b56 Remove "most popular" tab from profile directory, add responsive design ()
* Remove "most popular" tab from profile directory, add responsive design

* Remove unused translations
2018-12-17 03:14:28 +01:00
Eugen Rochko f551383e4a Cache hashtag sample accounts, and exclude ineligible ones () 2018-12-08 01:32:26 +01:00
Takeshi Umeda f2ca159c3b Fix tag mb_chars comparison of profile directory () 2018-12-07 04:18:37 +01:00
Eugen Rochko fd8ca11f19 Add profile directory ()
Fix 
2018-12-06 17:36:11 +01:00
Eugen Rochko 626a544d08 Improve account suspension speed and completeness ()
- Some associations were missing from the clean-up
- Some attributes were not reset on suspension
- Skip federation and streaming deletes when purging a dead domain
- Move account association definitions to concern
2018-12-03 01:32:08 +01:00
ThibG 80ef517747 Allow hyphens in the middle of remote user names ()
Fixes 

This only allows hyphens in the middle of a username, much like dots,
although I don't have a compelling reason to do so other than keeping
the changes minimal.
2018-11-27 12:28:01 +01:00
Eugen Rochko 305556274a Redesign admin accounts index ()
* Improve overview of accounts in admin UI

- Display suspended status, role, last activity and IP prominently
- Default to showing local accounts
- Default to not showing suspended accounts

* Remove unused strings

* Fix tests

* Allow filtering accounts by IP mask
2018-11-26 15:53:27 +01:00
Eugen Rochko 62c0e112ea Extract counters from accounts table to account_stats table () 2018-11-19 00:43:52 +01:00
Eugen Rochko 24f168e58e Fix link verification for remote accounts () 2018-10-04 15:47:03 +02:00
Eugen Rochko a7955d39ce Fix performance regression in Account::Field#verifiable? ()
* Fix performance regression in Account::Field#verifiable?

Regression from 

* Fix code style issue
2018-09-18 22:49:24 +02:00
Eugen Rochko d3105031f8 Redesign forms, verify link ownership with rel="me" ()
* Verify link ownership with rel="me"

* Add explanation about verification to UI

* Perform link verifications

* Add click-to-copy widget for verification HTML

* Redesign edit profile page

* Redesign forms

* Improve responsive design of settings pages

* Restore landing page sign-up form

* Fix typo

* Support <link> tags, add spec

* Fix links not being verified on first discovery and passive updates
2018-09-18 16:45:58 +02:00
Eugen Rochko 801b0f583f Add confirmation step to account suspensions ()
* Add confirmation page for suspensions

* Suspension confirmation closes reports, linked from report UI

* Fix tests
2018-08-22 11:53:41 +02:00
Eugen Rochko 6e3cb11f3c Public profile endorsements (accounts picked by profile owner) () 2018-08-09 09:56:53 +02:00
Eugen Rochko ebf836cc69 Enforce username format for remote users, too ()
Initially I thought there might be valid reasons for remote users to
have a different, unpredicted username format. However, I now realize
such a difference would be unusable and unexpected within Mastodon.

Fix 
2018-07-30 22:29:52 +02:00
Eugen Rochko aa4e75166b Re-add follow recommendations API ()
* Re-add follow recommendations API

    GET /api/v1/suggestions

Removed in 30f9e9e624 due to Neo4J
dependency. The algorithm uses triadic closures, takes into account
suspensions, blocks, mutes, domain blocks, excludes locked and moved
accounts, and prefers more recently updated accounts.

* Track interactions with people you don't follow

Replying to, favouriting and reblogging someone you're not following
will make them show up in follow recommendations. The interactions
have different weights:

- Replying is 1
- Favouriting is 10 (decidedly positive interaction, but private)
- Reblogging is 20

Following them, muting or blocking will remove them from the list,
obviously.

* Remove triadic closures, ensure potential friendships are trimmed
2018-07-03 01:47:56 +02:00
Eugen Rochko d878e3e945 Keyword/phrase filtering ()
* Add keyword filtering

    GET|POST       /api/v1/filters
    GET|PUT|DELETE /api/v1/filters/:id

- Irreversible filters can drop toots from home or notifications
- Other filters can hide toots through the client app
- Filters use a phrase valid in particular contexts, expiration

* Make sure expired filters don't get applied client-side

* Add missing API methods

* Remove "regex filter" from column settings

* Add tests

* Add test for FeedManager

* Add CustomFilter test

* Add UI for managing filters

* Add streaming API event to allow syncing filters

* Fix tests
2018-06-29 15:34:36 +02:00
Eugen Rochko 499a9f5f11 Change language opt-out to language opt-in ()
* Switch filtered_languages to chosen_languages

* Adjust interface

* Remove unused translations
2018-06-17 13:54:02 +02:00
Eugen Rochko aeceb63275 Add preference to hide following/followers lists ()
* 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 

* Add preference

* Add delegation

* Fix issue

* Fix issue
2018-05-18 02:26:51 +02:00
Eugen Rochko 7ff3c849d1 Bot nameplates ()
* Store actor type in database

* Add bot nameplate to web UI, add setting to preferences, API, AP
Fix 

* Fix code style issues
2018-05-07 09:31:07 +02:00
Eugen Rochko 4055ce490c Enable custom emojis in profiles (notes, field values, display names) ()
Follow-up to 
2018-05-06 11:48:51 +02:00
Eugen Rochko 0de45574e0 4 profile fields max, store only 255 characters per name/value ()
Fix 
2018-05-05 21:11:19 +02:00
Eugen Rochko 4258e304c5 Allow updating bio fields via PUT /api/v1/accounts/update_credentials ()
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 d6a2530d73 Speed up test suite by not generating RSA keys in test environment ()
One RSA keypair for all fabricated test accounts is enough
2018-05-02 15:45:24 +02:00
Eugen Rochko 1a653fff95 Add entity cache ()
* 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
Emelia Smith 1071ecfebc Prevent suspended accounts from appearing in AccountSearchService () 2018-04-23 21:27:18 +02:00
Yamagishi Kazutoshi e83e74f36d Update dependencies for Ruby (2018-04-23) ()
* Update annotate to version 2.7.3

* Update aws-sdk-s3 to version 1.9.2

* Update browser to version 2.5.3

* Update capistrano to version 3.10.2

* Update domain_name to version 0.5.20180417

* Update http to version 3.2.0

* Update lograge to version 0.10.0

* Update oj to version 3.5.1

* Update parallel_tests to version 2.21.3

* Update puma to version 3.11.4

* Update rubocop to version 0.55.0

* Update scss_lint to version 0.57.0

* Update simplecov to version 0.16.1

* Update tty-command to version 0.8.0

* Update tty-prompt to version 0.16.0

* Update pkg-config to version 1.3.0

* Update fog-local to version 0.5.0

* Update fog-openstack to version 0.1.25

* Update devise-two-factor to version 3.0.3

* bundle update
2018-04-23 11:29:17 +02:00
Eugen Rochko 4f460eba18 Fix warning about using SQL in order for Account#partitioned () 2018-04-17 13:50:48 +02:00
Eugen Rochko 466442b764 Add bio fields ()
* Add bio fields

- Fix 
- Fix 
- Fix 

* 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 
2018-04-14 12:41:08 +02:00
Yamagishi Kazutoshi 9761b940ac Upgrade Rails to version 5.2.0 () 2018-04-12 14:45:17 +02:00
Emelia Smith 765bfd0cf5 Feature: Allow staff to change user emails ()
* Admin: Show unconfirmed email address on account page

* Admin: Allow staff to change user email addresses

* ActionLog: On change_email, log current email address and new unconfirmed email address
2018-04-10 09:16:06 +02:00
Emelia Smith 5373b138e8 Feature: Report improvements () ()
* Implement Assignment of Reports ()

* Change translation of admin.report.comment.label to "Report Comment" for clarity

As we'll soon add the ability for reports to have comments on them, this clarification makes sense.

* Implement notes for Reports

This enables moderators to leave comments about a report whilst they work on it

* Fix display of report moderation notes

* Allow reports to be reopened / marked as unresolved

* Redirect to reports listing upon resolution of report

* Implement "resolve with note" functionality

* Add inverse relationship for report notes

* Remove additional database querying when loading report notes

* Fix tests for reports

* Fix localisations for report notes / reports
2018-04-02 22:04:14 +02:00
David Underwood 44274257de [WIP] Enable custom emoji on account pages and in the sidebar ()
Federate custom emojis with accounts
2018-04-01 23:55:42 +02:00
Akihiko Odaki acece7a2e6 Validate HTTP response length while receiving ()
to_s method of HTTP::Response keeps blocking while it receives the whole
content, no matter how it is big. This means it may waste time to receive
unacceptably large files. It may also consume memory and disk in the
process. This solves the inefficency by checking response length while
receiving.
2018-03-26 14:02:10 +02:00
Eugen Rochko f4e8e39c99 Restore username validation to disallow dots, for now ()
Usernames with dots in them do not work with routes, because the dot usually separates the desired page format (e.g. json). I don't want to mess with changing route constraints for this patch release.
2018-03-22 11:30:22 +01:00
ThibG 7d7a725e82 Fix MENTION_RE to not match nil usernames () 2018-03-22 10:45:48 +01:00
Eugen Rochko 53b1100144 Permit dots in usernames with conditions ()
* Permit dots in usernames with conditions

- Dot cannot be the start or end of username
- a.lice and al.ice are considered the same during sign-up

* Fix regex mixin flags
2018-03-21 10:26:53 +01:00
Eugen Rochko b1f8dfd3cf Federate pinned statuses over ActivityPub ()
* Federate pinned statuses over ActivityPub

* Display pinned toots in web UI

Fix 

* 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
Akihiko Odaki b5162e2aff Rename ResolveRemoteAccountService to ResolveAccountService ()
The service used to be named ResolveRemoteAccountService resolves local
accounts as well.
2018-01-22 14:25:09 +01:00
Yamagishi Kazutoshi 49b76b3025 Change belongs_to_required_by_default to true () 2018-01-19 20:56:47 +01:00
Eugen Rochko 3b69e9b99c Exclude moved accounts from search results () 2017-12-12 02:14:33 +01:00
Eugen Rochko b037fbf9f4 Remove rabl dependency ()
* Remove rabl dependency

* Replicate old Oj configuration
2017-12-06 15:04:49 +09:00
Eugen Rochko 1e7f022fa2 Add list of lists component to web UI ()
* Add list of lists component to web UI

* Add list adding

* Add list removing

* List editor modal

* Add API account search limited by following=true relation

* Rework list editor modal

* Remove mandatory pagination of GET /api/v1/lists/:id/accounts

* Adjust search input placeholder

* Fix rspec ()

* i18n: (zh-CN) Add missing translations for  ()

* i18n: (zh-CN) yarn manage:translations -- zh-CN

* i18n: (zh-CN) Add missing translations for 

* Fix some issues

- Display loading/missing state for list timelines
- Order lists alphabetically in overview
- Fix async list editor reset
- Redirect to /lists after deleting unpinned list
- Redirect to / after pinning a list

* Remove dead list columns when a list is deleted or fetch returns 404
2017-12-05 23:02:27 +01:00
Eugen Rochko 2421fd745a Fix too many forwards ()
* Avoid sending explicit Undo->Announce when original deleted

* Do not forward a reply back to the server that sent it

* Deduplicate inboxes of rebloggers' followers for delete forwarding

* Adjust test

* Fix wrong class, bad SQL, wrong variable, outdated comment
2017-11-30 03:50:05 +01:00