Commit Graph

59 Commits (588d2b27a789fee376ee0e48d2a56d272f0b4796)

Author SHA1 Message Date
Eugen Rochko edf09ec747
Add `/api/v1/accounts/familiar_followers` to REST API ()
* Add `/api/v1/accounts/familiar_followers` to REST API

* Change hide network preference to be stored consistently for local and remote accounts

* Add dummy classes to migration

* Apply suggestions from code review

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
MitarashiDango a5c24d5c4d
Fix unable to unpin follower-only posts ()
Claire d4e6774a0c
Fix Undo Announce sometimes inlining the originally Announced status ()
* Change tests to have more specific expectations on sent ActivityPub payloads

* Check that payload doesn't actually contain the contents of the boosted toot

* Fix Undo Announce sometimes inlining the originally Announced status
Eugen Rochko 07341e7aa6
Add graphs and retention metrics to admin dashboard ()
Eugen Rochko 8331fdf7e0
Add server rules ()
luigi 7ea9588520
Use Enumerable#filter_map in more places ()
luigi 087ed84367
Optimize map { ... }.compact calls ()
* Optimize map { ... }.compact

using Enumerable#filter_map, supported since Ruby 2.7

* Add poyfill for Enumerable#filter_map
Eugen Rochko 216b85b053
Fix performance on instances list in admin UI ()
- Reduce duplicate queries
- Remove n+1 queries
- Add accounts count to detailed view
- Add separate action log entry for updating existing domain blocks
ThibG 65506bac3f
Add user notes on accounts ()
* Add UserNote model

* Add UI for user notes

* Put comment in relationships entity

* Add API to create user notes

* Copy user notes to new account when receiving a Move activity

* Address some of the review remarks

* Replace modal by inline edition

* Please CodeClimate

* Button design changes

* Change design again

* Cancel note edition when pressing Escape

* Fixes

* Tweak design again

* Move “Add note” item, and allow users to add notes to themselves

* Rename UserNote into AccountNote, rename “comment” Relationship attribute to “note”
Takeshi Umeda 13f065da05
Add visibility parameter in share page ()
* Add visibility parameter in share page

* Restrict to default privacy
Eugen Rochko 5d8398c8b8
Add E2EE API ()
Eugen Rochko 07da35c17c
Fix n+1 query for bookmarks on statuses ()
ThibG dfea7368c9 Add bookmarks ()
* Add backend support for bookmarks

Bookmarks behave like favourites, except they aren't shared with other
users and do not have an associated counter.

* Add spec for bookmark endpoints

* Add front-end support for bookmarks

* Introduce OAuth scopes for bookmarks

* Add bookmarks to archive takeout

* Fix migration

* Coding style fixes

* Fix rebase issue

* Update bookmarked_statuses to latest UI changes

* Update bookmark actions to properly reflect status changes in state

* Add bookmarks item to single-column layout

* Make active bookmarks red
ThibG 514e427bd2 Fix relationship caches being broken as result of a follow request ()
Eugen Rochko e682d3aa9e
Fix active user count for different number of weeks using same cache ()
Fix 
Eugen Rochko 5f69eb89e2
Add a nodeinfo endpoint ()
* Add nodeinfo endpoint

* dont commit stuff from my local dev

* consistant naming since we implimented 2.1 schema

* Add some additional node info stuff

* Add nodeinfo endpoint

* dont commit stuff from my local dev

* consistant naming since we implimented 2.1 schema

* expanding this to include federation info

* codeclimate feedback

* CC feedback

* using activeserializers seems like a good idea...

* get rid of draft 2.1 version

* Reimplement 2.1, also fix metaData -> metadata

* Fix metaData -> metadata here too

* Fix nodeinfo 2.1 tests

* Implement cache for monthly user aggregate

* Useless

* Remove ostatus from the list of supported protocols

* Fix nodeinfo's open_registration reading obsolete setting variable

* Only serialize domain blocks with user-facing limitations

* Do not needlessly list noop severity in nodeinfo

* Only serialize domain blocks info in nodeinfo when they are set to be displayed to everyone

* Enable caching for nodeinfo endpoints

* Fix rendering nodeinfo

* CodeClimate fixes

* Please CodeClimate

* Change InstancePresenter#active_user_count_months for clarity

* Refactor NodeInfoSerializer#metadata

* Remove nodeinfo 2.1 support as the schema doesn't exist

* Clean-up
mayaeh 0e5b9e3ba0 Fix the sample account icon of Profile directory to local only ()
Eugen Rochko 67b3b62b98
Improve blocked view of profiles ()
* Revert "Fix filtering of favourited_by, reblogged_by, followers and following ()"

This reverts commit 120544067f.

* Revert "Hide blocking accounts from blocked users ()"

This reverts commit 62bafa20a1.

* Improve blocked view of profiles

- Change "You are blocked" to "Profile unavailable"
- Hide following/followers in API when blocked
- Disable follow button and show "Profile unavailable" on public profile as well
Eugen Rochko 2c63e0292a
Fix admin validation being too strict about usernames ()
* Fix admin validation being too strict about usernames

Fix 

* Strip Setting.site_contact_username consistently throughout the codebase
ThibG 62bafa20a1 Hide blocking accounts from blocked users ()
* Revert "Add indication that you have been blocked in web UI ()"

This reverts commit bd02ec6daa.

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

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
Eugen Rochko 9745de883b
Add `blocked_by` relationship to the REST API ()
Eugen Rochko 55a9658ad8
Add custom closed registrations message to landing page when set ()
Eugen Rochko 51e154f5e8
Admission-based registrations mode ()
Fix 
Fix 
mayaeh d4ef90eae3 Fix to limit to discoverable accounts. ()
Eugen Rochko 65fffeac3f
Redesign landing page ()
ThibG 9d3c6f1849 Improved remote thread fetching ()
* 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
Eugen Rochko 81f96c973a
Don't count suspended users in user count ()
Fix 
Eugen Rochko 0c666ae5e6
Cast status_count to integer ()
It is returned as a double because the sum is now over bigint columns

Fix 
Eugen Rochko d6b9a62e0a
Extract counters from accounts table to account_stats table ()
ashleyhull-versent 2dba313100 Replace SVG asset with Custom mascot ()
Eugen Rochko a2cabf3f4a
Add admin custom CSS setting ()
Fix 
Eugen Rochko f2404de871
Public profile endorsements (accounts picked by profile owner) ()
Eugen Rochko cc56f2230a
Add separate setting for sidebar text (site_short_description) ()
* Add separate setting for sidebar text (site_short_description)

* Fix tests
Eugen Rochko 2c1f7b2ece
Better pagination for ActivityPub outbox ()
Eugen Rochko c71aa468b5
Redesign landing page (again) ()
* 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
Eugen Rochko 4bc625166e
Fix bug in relationships API introduced by ()
It was merge when it needed to be deep_merge. And added some tests
Eugen Rochko cba2897108
Cache relationships in API ()
* Cache relationships in API

* Fetch relationships for search results in UI

* Only save one account's maps in each cache item
Yamagishi Kazutoshi b21db9bbde Using double splat operator ()
Daigo 3 Dango ab625c57ce Compact status_ids in StatusRelationshipsPresenter ()
nullkal 7d16bb379d Use OrderedCollectionPage to return followers/following list ()
Akihiko Odaki 9619b7f727 Use Account.local.sum(statuses_count) instead of Status.local.count ()
It is faster.
Eugen Rochko 9239e4ce4d Uploads for admin site settings ()
* Improve OpenGraph tags for about pages

* Add thumbnail admin setting

* Fix error

* Fix up
Eugen Rochko 9b994c4aee Fix - Fake instant follow in API response when account is believed unlocked ()
Eugen Rochko 9caa90025f Pinned statuses ()
* Pinned statuses

* yarn manage:translations
Daigo 3 Dango 696c2c6f2f Add Mastodon::Source.url ()
* Add Mastodon::Source.url

* Update spec

* Refactor

Move things frmo Mastodon::Source to Mastodon::Version
Eugen Rochko 3c6503038e Add protocol handler. Handle follow intents ()
* Add protocol handler. Handle follow intents

* Add share intent

* Improve code in intents controller

* Adjust share form CSS
Eugen Rochko a6328fc1b1 Minor ActivityPub JSON fixes ()
- Objects must have attributedTo instead of actor
- The current attribute belongs to CollectionPage, not Collection
Eugen Rochko 8c45cd0e36 Improve ActivityPub representations ()
* Improve webfinger templates and make tests more flexible

* Clean up AS2 representation of actor

* Refactor outbox

* Create activities representation

* Add representations of followers/following collections, do not redirect /users/:username route if format is empty

* Remove unused translations

* ActivityPub endpoint for single statuses, add ActivityPub::TagManager for better
URL/URI generation

* Add ActivityPub::TagManager#to

* Represent all attachments as Document instead of Image/Video specifically
(Because for remote ones we may not know for sure)

Add mentions and hashtags representation to AP notes

* Add AP-resolvable hashtag URIs

* Use ActiveModelSerializers for ActivityPub

* Clean up unused translations

* Separate route for object and activity

* Adjust cc/to matrices

* Add to/cc to activities, ensure announce activity embeds target status and
not the wrapper status, add "id" to all collections
unarist 1896a154f5 Fix response of unreblog/unfavourite APIs ()
Both APIs process asynchronously, so reblogged/favourited fields in the response should be set to `false` manually.
Sorin Davidoi 0c7c188c45 Web Push Notifications ()
* feat: Register push subscription

* feat: Notify when mentioned

* feat: Boost, favourite, reply, follow, follow request

* feat: Notification interaction

* feat: Handle change of public key

* feat: Unsubscribe if things go wrong

* feat: Do not send normal notifications if push is enabled

* feat: Focus client if open

* refactor: Move push logic to WebPushSubscription

* feat: Better title and body

* feat: Localize messages

* chore: Fix lint errors

* feat: Settings

* refactor: Lazy load

* fix: Check if push settings exist

* feat: Device-based preferences

* refactor: Simplify logic

* refactor: Pull request feedback

* refactor: Pull request feedback

* refactor: Create /api/web/push_subscriptions endpoint

* feat: Spec PushSubscriptionController

* refactor: WebPushSubscription => Web::PushSubscription

* feat: Spec Web::PushSubscription

* feat: Display first media attachment

* feat: Support direction

* fix: Stuff broken while rebasing

* refactor: Integration with session activations

* refactor: Cleanup

* refactor: Simplify implementation

* feat: Set VAPID keys via environment

* chore: Comments

* fix: Crash when no alerts

* fix: Set VAPID keys in testing environment

* fix: Follow link

* feat: Notification actions

* fix: Delete previous subscription

* chore: Temporary logs

* refactor: Move migration to a later date

* fix: Fetch the correct session activation and misc bugs

* refactor: Move migration to a later date

* fix: Remove follow request (no notifications)

* feat: Send administrator contact to push service

* feat: Set time-to-live

* fix: Do not show sensitive images

* fix: Reducer crash in error handling

* feat: Add badge

* chore: Fix lint error

* fix: Checkbox label overlap

* fix: Check for payload support

* fix: Rename action "type" (crash in latest Chrome)

* feat: Action to expand notification

* fix: Lint errors

* fix: Unescape notification body

* fix: Do not allow boosting if the status is hidden

* feat: Add VAPID keys to the production sample environment

* fix: Strip HTML tags from status

* refactor: Better error messages

* refactor: Handle browser not implementing the VAPID protocol (Samsung Internet)

* fix: Error when target_status is nil

* fix: Handle lack of image

* fix: Delete reference to invalid subscriptions

* feat: Better error handling

* fix: Unescape HTML characters after tags are striped

* refactor: Simpify code

* fix: Modify to work with 

* Sort strings alphabetically

* i18n: Updated Polish translation

it annoys me that it's not fully localized :P

* refactor: Use current_session in PushSubscriptionController

* fix: Rebase mistake

* fix: Set cacheName to mastodon

* refactor: Pull request feedback

* refactor: Remove logging statements

* chore(yarn): Fix conflicts with master

* chore(yarn): Copy latest from master

* chore(yarn): Readd offline-plugin

* refactor: Use save! and update!

* refactor: Send notifications async

* fix: Allow retry when push fails

* fix: Save track for failed pushes

* fix: Minify sw.js

* fix: Remove account_id from fabricator