Merge branch 'master' into patch-1

This commit is contained in:
Andy Piper 2023-08-21 15:37:44 +01:00 committed by GitHub
commit 2aa5056fc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
124 changed files with 1627 additions and 717 deletions

64
.github/workflows/deploy.yml vendored Normal file
View File

@ -0,0 +1,64 @@
name: Deploy on Github Pages
on:
push:
branches:
- master
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
# Default to bash
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Pages
id: pages
uses: actions/configure-pages@v2
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.105.0"
extended: true
- name: Build
run: hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./public
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

View File

@ -1,31 +0,0 @@
name: Pages
on:
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.105.0'
extended: true
- name: Build
run: hugo --minify
- name: Deploy
uses: easingthemes/ssh-deploy@v2.0.7
env:
SSH_PRIVATE_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
ARGS: "-rltgoDzvO"
SOURCE: ./public/
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: ${{ secrets.REMOTE_TARGET }}

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ public/
static/.sass-cache
resources/
.hugo_build.lock
.vercel

View File

@ -1,4 +1,6 @@
![Mastodon](https://i.imgur.com/NhZc40l.png)
====
The documentation currently uses Hugo to generate a static site from Markdown.
View the documentation at <https://docs.joinmastodon.org>

View File

@ -4,6 +4,10 @@ description:
menu:
docs:
parent: entities
aliases: [
"/api/entities/SOMETHING",
"/api/entities/something",
]
---
## Example

View File

@ -4,6 +4,10 @@ description:
menu:
docs:
parent: methods
aliases: [
"/api/methods/SOMETHING",
"/api/methods/something",
]
---
## What the method does {#anchor}

File diff suppressed because one or more lines are too long

View File

@ -2,10 +2,10 @@
font-family: 'Roboto Mono';
src:
local('Roboto Mono'),
url('../webfonts/roboto-mono/robotomono-regular-webfont.woff2') format('woff2'),
url('../webfonts/roboto-mono/robotomono-regular-webfont.woff') format('woff'),
url('../webfonts/roboto-mono/robotomono-regular-webfont.ttf') format('truetype'),
url('../webfonts/roboto-mono/robotomono-regular-webfont.svg#roboto_monoregular') format('svg');
url('./webfonts/roboto-mono/robotomono-regular-webfont.woff2') format('woff2'),
url('./webfonts/roboto-mono/robotomono-regular-webfont.woff') format('woff'),
url('./webfonts/roboto-mono/robotomono-regular-webfont.ttf') format('truetype'),
url('./webfonts/roboto-mono/robotomono-regular-webfont.svg#roboto_monoregular') format('svg');
font-weight: 400;
font-display: swap;
font-style: normal;

View File

@ -2,10 +2,10 @@
font-family: 'Roboto';
src:
local('Roboto Italic'),
url('../webfonts/roboto/roboto-italic-webfont.woff2') format('woff2'),
url('../webfonts/roboto/roboto-italic-webfont.woff') format('woff'),
url('../webfonts/roboto/roboto-italic-webfont.ttf') format('truetype'),
url('../webfonts/roboto/roboto-italic-webfont.svg#roboto-italic-webfont') format('svg');
url('./webfonts/roboto/roboto-italic-webfont.woff2') format('woff2'),
url('./webfonts/roboto/roboto-italic-webfont.woff') format('woff'),
url('./webfonts/roboto/roboto-italic-webfont.ttf') format('truetype'),
url('./webfonts/roboto/roboto-italic-webfont.svg#roboto-italic-webfont') format('svg');
font-weight: normal;
font-display: swap;
font-style: italic;
@ -15,10 +15,10 @@
font-family: 'Roboto';
src:
local('Roboto Bold'),
url('../webfonts/roboto/roboto-bold-webfont.woff2') format('woff2'),
url('../webfonts/roboto/roboto-bold-webfont.woff') format('woff'),
url('../webfonts/roboto/roboto-bold-webfont.ttf') format('truetype'),
url('../webfonts/roboto/roboto-bold-webfont.svg#roboto-bold-webfont') format('svg');
url('./webfonts/roboto/roboto-bold-webfont.woff2') format('woff2'),
url('./webfonts/roboto/roboto-bold-webfont.woff') format('woff'),
url('./webfonts/roboto/roboto-bold-webfont.ttf') format('truetype'),
url('./webfonts/roboto/roboto-bold-webfont.svg#roboto-bold-webfont') format('svg');
font-weight: bold;
font-display: swap;
font-style: normal;
@ -28,10 +28,10 @@
font-family: 'Roboto';
src:
local('Roboto Medium'),
url('../webfonts/roboto/roboto-medium-webfont.woff2') format('woff2'),
url('../webfonts/roboto/roboto-medium-webfont.woff') format('woff'),
url('../webfonts/roboto/roboto-medium-webfont.ttf') format('truetype'),
url('../webfonts/roboto/roboto-medium-webfont.svg#roboto-medium-webfont') format('svg');
url('./webfonts/roboto/roboto-medium-webfont.woff2') format('woff2'),
url('./webfonts/roboto/roboto-medium-webfont.woff') format('woff'),
url('./webfonts/roboto/roboto-medium-webfont.ttf') format('truetype'),
url('./webfonts/roboto/roboto-medium-webfont.svg#roboto-medium-webfont') format('svg');
font-weight: 500;
font-display: swap;
font-style: normal;
@ -41,10 +41,10 @@
font-family: 'Roboto';
src:
local('Roboto'),
url('../webfonts/roboto/roboto-regular-webfont.woff2') format('woff2'),
url('../webfonts/roboto/roboto-regular-webfont.woff') format('woff'),
url('../webfonts/roboto/roboto-regular-webfont.ttf') format('truetype'),
url('../webfonts/roboto/roboto-regular-webfont.svg#roboto-regular-webfont') format('svg');
url('./webfonts/roboto/roboto-regular-webfont.woff2') format('woff2'),
url('./webfonts/roboto/roboto-regular-webfont.woff') format('woff'),
url('./webfonts/roboto/roboto-regular-webfont.ttf') format('truetype'),
url('./webfonts/roboto/roboto-regular-webfont.svg#roboto-regular-webfont') format('svg');
font-weight: normal;
font-display: swap;
font-style: normal;

View File

@ -22,7 +22,7 @@ Similar to how blogging is the act of publishing updates to a website, **microbl
A Mastodon website can operate alone. Just like a traditional website, people sign up on it, post messages, upload pictures and talk to each other. _Unlike_ a traditional website, Mastodon websites can interoperate, letting their users communicate with each other; just like you can send an email from your Gmail account to someone from Outlook, Fastmail, Protonmail, or any other email provider, as long as you know their email address, **you can mention or message anyone on any website using their address**.
{{< figure src="/assets/network-models.jpg" caption="From left to right: Centralized, Federated, Distributed" >}}
{{< figure src="assets/network-models.jpg" caption="From left to right: Centralized, Federated, Distributed" >}}
@ -104,6 +104,3 @@ Learn how to write an app for Mastodon:
Learn about the Mastodon backend and how to contribute:
{{< page-ref page="dev/overview" >}}

View File

@ -202,7 +202,18 @@ Determines the amount of logs generated by Mastodon. Defaults to `info`, which g
#### `TRUSTED_PROXY_IP`
If your Mastodon web process is on the same machine as your reverse proxy (e.g. nginx), then you don't need this setting. Otherwise, you need to set it to the IP from which your reverse proxy sends requests to Mastodon's web process, otherwise Mastodon will record the reverse proxy's own IP as the IP of all requests, which would be bad because IP addresses are used for important rate limits and security functions.
Tells the Mastodon web and streaming processes which IPs act as your trusted reverse proxy (e.g. nginx, Cloudflare). It affects how Mastodon determines the source IP of each request, which is used for important rate limits and security functions. If the value is set incorrectly then Mastodon could use the IP of the reverse proxy instead of the actual source.
By default the loopback and private network address ranges are trusted. Specifically:
- `127.0.0.1/8`
- `::1/128`
- `10.0.0.0/8`
- `172.16.0.0/12`
- `192.168.0.0/16`
- `fc00::/7`
If you're using a single reverse proxy and it runs on the same machine or is in the same private network as your Mastodon web and streaming processes then you most likely don't need to modify this setting and can use the default. Or if you're using multiple reverse proxy servers and they're all in the same private network as your Mastodon web and streaming processes then, again, the default should be fine. However, if you're using a reverse proxy server that reaches your Mastodon web and streaming servers via a public IP address (for example if you're using Cloudflare or a similar proxy) then you'll need to set this variable. It should be the IPs of all reverse proxies in use, as a comma-separated list of IPs or IP ranges using [CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation). Note that when this variable is set the default ranges (mentioned above) will no longer be trusted, so if you have both an external reverse proxy _and_ a proxy on localhost then you must include the IPs (or IP ranges) of both.
#### `SOCKET`
@ -240,6 +251,10 @@ This variable cannot be defined in dotenv (`.env`) files as it's used before the
{{< page-ref page="admin/scaling" >}}
#### `SIDEKIQ_CONCURRENCY`
Added in 4.1. Specific to Sidekiq, this variable determines how many different processes Sidekiq forks into. Defaults to `5`.
#### `WEB_CONCURRENCY`
Specific to Puma, this variable determines how many different processes Puma forks into. Defaults to `2`.
@ -262,7 +277,11 @@ The streaming API can be deployed to a different domain/subdomain. This may impr
Example value: `wss://streaming.example.com`
#### `STREAMING_CLUSTER_NUM`
#### `STREAMING_CLUSTER_NUM` (deprecated) {#streaming_cluster_num}
{{< hint style="danger" >}}
Deprecated: The streaming server process now only uses a single node.js process, to scale it further, you'll need to follow the documentation in the [scaling guide](/admin/scaling#streaming)
{{< /hint >}}
Specific to the streaming API, this variable determines how many different processes the streaming API forks into. Defaults to the number of CPU cores minus one.
@ -346,21 +365,21 @@ Defaults to value of `REDIS_NAMESPACE`.
#### `SIDEKIQ_REDIS_URL`
### ElasticSearch {#elasticsearch}
### Elasticsearch {#elasticsearch}
{{< page-ref page="admin/optional/elasticsearch" >}}
#### `ES_ENABLED`
If set to `true`, Mastodon will use ElasticSearch for its search functions.
If set to `true`, Mastodon will use Elasticsearch for its search functions.
#### `ES_HOST`
Host of the ElasticSearch server. Defaults to `localhost`
Host of the Elasticsearch server. Defaults to `localhost`
#### `ES_PORT`
Port of the ElasticSearch server. Defaults to `9200`
Port of the Elasticsearch server. Defaults to `9200`
#### `ES_USER`
@ -372,7 +391,7 @@ Used for optionally authenticating with ElasticSearch
#### `ES_PREFIX`
Useful if the ElasticSearch server is shared between multiple projects or different Mastodon servers. Defaults to value of `REDIS_NAMESPACE`.
Useful if the Elasticsearch server is shared between multiple projects or different Mastodon servers. Defaults to value of `REDIS_NAMESPACE`.
### StatsD {#statsd}
@ -389,16 +408,27 @@ If set, all StatsD keys will be prefixed with this. Defaults to `Mastodon.produc
### SMTP email delivery {#smtp}
#### `SMTP_SERVER`
#### `SMTP_PORT`
#### `SMTP_LOGIN`
#### `SMTP_PASSWORD`
#### `SMTP_FROM_ADDRESS`
#### `SMTP_DOMAIN`
#### `SMTP_DELIVERY_METHOD`
#### `SMTP_AUTH_METHOD`
#### `SMTP_CA_FILE`
#### `SMTP_OPENSSL_VERIFY_MODE`
#### `SMTP_ENABLE_STARTTLS_AUTO`
#### `SMTP_ENABLE_STARTTLS`
Set to `auto` (default), `always`, or `never`.
@ -407,11 +437,12 @@ Set to `auto` (default), `always`, or `never`.
4.0.0 - added
#### `SMTP_TLS`
#### `SMTP_SSL`
## File storage {#files}
### CDN {cdn}
### CDN {#cdn}
#### `CDN_HOST`
@ -425,9 +456,9 @@ You must serve the files with CORS headers, otherwise some functions of Mastodon
#### `S3_ALIAS_HOST`
Similar to `CDN_HOST`, you may serve *user-uploaded* files from a separate host. In fact, if you are using external storage like Amazon S3, Minio or Google Cloud, you will by default be serving files from those services' URLs.
Similar to `CDN_HOST`, you may serve _user-uploaded_ files from a separate host. In fact, if you are using external storage like Amazon S3, Minio or Google Cloud, you will by default be serving files from those services' URLs.
It is *extremely recommended* to use your own host instead, for a few reasons:
It is _extremely recommended_ to use your own host instead, for a few reasons:
1. Bandwidth on external storage providers is metered and expensive
2. You may want to switch to a different provider later without breaking old links
@ -443,36 +474,59 @@ You must serve the files with CORS headers, otherwise some functions of Mastodon
### Local file storage {#paperclip}
#### `PAPERCLIP_ROOT_PATH`
#### `PAPERCLIP_ROOT_URL`
### Amazon S3 and compatible {#s3}
#### `S3_ENABLED`
#### `S3_BUCKET`
#### `AWS_ACCESS_KEY_ID`
#### `AWS_SECRET_ACCESS_KEY`
#### `S3_REGION`
#### `S3_PROTOCOL`
#### `S3_HOSTNAME`
#### `S3_ENDPOINT`
#### `S3_SIGNATURE_VERSION`
#### `S3_OVERRIDE_PATH_STYLE`
#### `S3_OPEN_TIMEOUT`
#### `S3_READ_TIMEOUT`
#### `S3_FORCE_SINGLE_REQUEST`
### Swift {#swift}
#### `SWIFT_ENABLED`
#### `SWIFT_USERNAME`
#### `SWIFT_TENANT`
#### `SWIFT_PASSWORD`
#### `SWIFT_PROJECT_ID`
#### `SWIFT_AUTH_URL`
#### `SWIFT_CONTAINER`
#### `SWIFT_OBJECT_URL`
#### `SWIFT_REGION`
#### `SWIFT_DOMAIN_NAME`
#### `SWIFT_CACHE_TTL`
## External authentication {#external-authentication}
@ -484,71 +538,125 @@ You must serve the files with CORS headers, otherwise some functions of Mastodon
### LDAP {#ldap}
#### `LDAP_ENABLED`
#### `LDAP_HOST`
#### `LDAP_PORT`
#### `LDAP_METHOD`
#### `LDAP_BASE`
#### `LDAP_BIND_DN`
#### `LDAP_PASSWORD`
#### `LDAP_UID`
#### `LDAP_SEARCH_FILTER`
#### `LDAP_MAIL`
#### `LDAP_UID_CONVERSTION_ENABLED`
#### `LDAP_UID_CONVERSION_ENABLED`
### PAM {#pam}
#### `PAM_ENABLED`
#### `PAM_EMAIL_DOMAIN`
#### `PAM_DEFAULT_SERVICE`
#### `PAM_CONTROLLED_SERVICE`
### CAS {#cas}
#### `CAS_ENABLED`
#### `CAS_DISPLAY_NAME`
#### `CAS_URL`
#### `CAS_HOST`
#### `CAS_PORT`
#### `CAS_SSL`
#### `CAS_VALIDATE_URL`
#### `CAS_CALLBACK_URL`
#### `CAS_LOGOUT_URL`
#### `CAS_LOGIN_URL`
#### `CAS_UID_FIELD`
#### `CAS_CA_PATH`
#### `CAS_DISABLE_SSL_VERIFICATION`
#### `CAS_UID_KEY`
#### `CAS_NAME_KEY`
#### `CAS_EMAIL_KEY`
#### `CAS_NICKNAME_KEY`
#### `CAS_FIRST_NAME_KEY`
#### `CAS_LAST_NAME_KEY`
#### `CAS_LOCATION_KEY`
#### `CAS_IMAGE_KEY`
#### `CAS_PHONE_KEY`
#### `CAS_SECURITY_ASSUME_EMAIL_IS_VERIFIED`
### SAML {#saml}
#### `SAML_ENABLED`
#### `SAML_ACS_URL`
#### `SAML_ISSUER`
#### `SAML_IDP_SSO_TARGET_URL`
#### `SAML_IDP_CERT`
#### `SAML_IDP_CERT_FINGERPRINT`
#### `SAML_NAME_IDENTIFIER_FORMAT`
#### `SAML_CERT`
#### `SAML_PRIVATE_KEY`
#### `SAML_SECURITY_WANT_ASSERTION_SIGNED`
#### `SAML_SECURITY_WANT_ASSERTION_ENCRYPTED`
#### `SAML_SECURITY_ASSUME_EMAIL_IS_VERIFIED`
#### `SAML_ATTRIBUTES_STATEMENTS_UID`
#### `SAML_ATTRIBUTES_STATEMENTS_EMAIL`
#### `SAML_ATTRIBUTES_STATEMENTS_FULL_NAME`
#### `SAML_ATTRIBUTES_STATEMENTS_FIRST_NAME`
#### `SAML_ATTRIBUTES_STATEMENTS_LAST_NAME`
#### `SAML_UID_ATTRIBUTE`
#### `SAML_ATTRIBUTES_STATEMENTS_VERIFIED`
#### `SAML_ATTRIBUTES_STATEMENTS_VERIFIED_EMAIL`
## Hidden services {#hidden-services}
@ -558,7 +666,9 @@ You must serve the files with CORS headers, otherwise some functions of Mastodon
{{< page-ref page="admin/optional/tor" >}}
#### `http_proxy`
#### `http_hidden_proxy`
#### `ALLOW_ACCESS_TO_HIDDEN_SERVICE`
## Limits {#limits}
@ -606,13 +716,21 @@ This variable only has any effect when running `rake db:migrate` and it is extre
### Uncategorized or unsorted
#### `BUNDLE_GEMFILE`
#### `DEEPL_API_KEY`
#### `DEEPL_PLAN`
#### `LIBRE_TRANSLATE_ENDPOINT`
#### `LIBRE_TRANSLATE_API_KEY`
#### `CACHE_BUSTER_ENABLED`
#### `CACHE_BUSTER_SECRET_HEADER`
#### `CACHE_BUSTER_SECRET`
#### `GITHUB_REPOSITORY`
Defaults to `mastodon/mastodon`
@ -622,8 +740,11 @@ Defaults to `mastodon/mastodon`
Defaults to `https://github.com/$GITHUB_REPOSITORY`
#### `FFMPEG_BINARY`
#### `LOCAL_HTTPS`
#### `PATH`
#### `MAX_FOLLOWS_THRESHOLD`
Defaults to `7500`
@ -656,4 +777,4 @@ Defaults to `512`.
#### `GITHUB_API_TOKEN`
Used in a rake task for generating AUTHORS.md from Github commit history.
Used in a rake task for generating AUTHORS.md from Github commit history.

View File

@ -84,8 +84,8 @@ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
Once this is done, we can install the correct Ruby version:
```bash
RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 3.0.4
rbenv global 3.0.4
RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 3.0.6
rbenv global 3.0.6
```
Well also need to install bundler:

View File

@ -41,6 +41,8 @@ If the account is reinstated within the 30 day period, all data is once again ac
Once the data has been deleted, whether that is after the 30 day period, or if an admin has force deleted it, the account can still be un-suspended. However, the account will have no data (statuses, profile information, avatar or header image) associated with it.
For remote accounts, suspending will make them unfollow any local account. Those relationships are not restored in case the remote account is un-suspended, even within the 30-day time window.
## Moderating entire websites {#server-wide-moderation}
Because individually moderating a large volume of users from a misbehaving server can be exhausting, it is possible to pre-emptively moderate against all users from that particular server using a so-called **domain block**, which comes with several different levels of severity.
@ -57,6 +59,8 @@ Equivalent to [limiting](#limit-user) all past and future accounts from the serv
Equivalent to [suspending](#suspend-user) all past and future accounts from the server. No content from the server will be stored locally except for usernames.
Suspending a server will remove all existing follow relationships between local accounts and accounts on the suspended server. They will not be restored in case the remote server is un-suspended later.
## Spam-fighting measures {#spam-fighting-measures}
There are a few baseline measures for preventing spam in Mastodon:

View File

@ -10,5 +10,6 @@ menu:
Mastodon offers a few optional features that can be used if needed.
- [Full-text search](./elasticsearch/)
- [Object storage](./object-storage/)
- [Hidden services](./tor/)
- [Single Sign On](./sso/)

View File

@ -1,30 +1,30 @@
---
title: Full-text search
description: Setting up ElasticSearch to search for statuses authored, favourited, or mentioned in.
description: Setting up Elasticsearch to search for statuses authored, favourited, or mentioned in.
menu:
docs:
weight: 10
parent: admin-optional
---
Mastodon supports full-text search when ElasticSearch is available. Mastodons full-text search allows logged in users to find results from their own statuses, their mentions, their favourites, and their bookmarks. It deliberately does not allow searching for arbitrary strings in the entire database.
Mastodon supports full-text search when Elasticsearch is available. Mastodons full-text search allows logged in users to find results from their own statuses, their mentions, their favourites, and their bookmarks. It deliberately does not allow searching for arbitrary strings in the entire database.
## Installing ElasticSearch {#install}
## Installing Elasticsearch {#install}
ElasticSearch requires a Java runtime. If you dont have Java already installed, do it now. Assuming you are logged in as `root`:
Elasticsearch requires a Java runtime. If you dont have Java already installed, do it now. Assuming you are logged in as `root`:
```bash
apt install openjdk-17-jre-headless
```
Add the official ElasticSearch repository to apt:
Add the official Elasticsearch repository to apt:
```bash
wget -O /usr/share/keyrings/elasticsearch.asc https://artifacts.elastic.co/GPG-KEY-elasticsearch
echo "deb [signed-by=/usr/share/keyrings/elasticsearch.asc] https://artifacts.elastic.co/packages/7.x/apt stable main" > /etc/apt/sources.list.d/elastic-7.x.list
```
Now you can install ElasticSearch:
Now you can install Elasticsearch:
```bash
apt update
@ -32,14 +32,14 @@ apt install elasticsearch
```
{{< hint style="warning" >}}
**Security warning:** By default, ElasticSearch is supposed to bind to localhost only, i.e. be inaccessible from the outside network. You can check which address ElasticSearch binds to by looking at `network.host` within `/etc/elasticsearch/elasticsearch.yml`. Consider that anyone who can access ElasticSearch can access and modify any data within it, as there is no authentication layer. So its really important that the access is secured. Having a firewall that only exposes the 22, 80 and 443 ports is advisable, as outlined in the [main installation instructions](../../prerequisites/#install-a-firewall-and-only-whitelist-ssh-http-and-https-ports). If you have a multi-host setup, you must know how to secure internal traffic.
**Security warning:** By default, Elasticsearch is supposed to bind to localhost only, i.e. be inaccessible from the outside network. You can check which address Elasticsearch binds to by looking at `network.host` within `/etc/elasticsearch/elasticsearch.yml`. Consider that anyone who can access Elasticsearch can access and modify any data within it, as there is no authentication layer. So its really important that the access is secured. Having a firewall that only exposes the 22, 80 and 443 ports is advisable, as outlined in the [main installation instructions](../../prerequisites/#install-a-firewall-and-only-whitelist-ssh-http-and-https-ports). If you have a multi-host setup, you must know how to secure internal traffic.
{{< /hint >}}
{{< hint style="danger" >}}
**Security warning:** ElasticSearch versions between `2.0` and `2.14.1` are affected by an [exploit](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228) in the `log4j` library. If affected, please refer to the [temporary mitigation](https://github.com/elastic/elasticsearch/issues/81618#issuecomment-991000240) from the ElasticSearch issue tracker.
**Security warning:** Elasticsearch versions between `2.0` and `2.14.1` are affected by an [exploit](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228) in the `log4j` library. If affected, please refer to the [temporary mitigation](https://github.com/elastic/elasticsearch/issues/81618#issuecomment-991000240) from the Elasticsearch issue tracker.
{{< /hint >}}
To start ElasticSearch:
To start Elasticsearch:
```bash
systemctl daemon-reload
@ -56,7 +56,7 @@ ES_HOST=localhost
ES_PORT=9200
```
If you have multiple Mastodon servers on the same machine, and you are planning to use the same ElasticSearch installation for all of them, make sure that all of them have unique `REDIS_NAMESPACE` in their configurations, to differentiate the indices. If you need to override the prefix of the ElasticSearch indices, you can set `ES_PREFIX` directly.
If you have multiple Mastodon servers on the same machine, and you are planning to use the same Elasticsearch installation for all of them, make sure that all of them have unique `REDIS_NAMESPACE` in their configurations, to differentiate the indices. If you need to override the prefix of the Elasticsearch indices, you can set `ES_PREFIX` directly.
After saving the new configuration, restart Mastodon processes for it to take effect:
@ -65,7 +65,7 @@ systemctl restart mastodon-sidekiq
systemctl reload mastodon-web
```
Now it's time to create the ElasticSearch indices and fill them with data:
Now it's time to create the Elasticsearch indices and fill them with data:
```bash
su - mastodon
@ -76,7 +76,7 @@ RAILS_ENV=production bin/tootctl search deploy
## Search optimization for other languages
### Chinese search optimization {#chinese-search-optimization}
The default analyzer of the ElasticSearch is the standard analyzer, which may not be the best especially for Chinese. To improve search experience, you can install a language specific analyzer. Before creating the indices in ElasticSearch, install the following ElasticSearch extensions:
The default analyzer of the Elasticsearch is the standard analyzer, which may not be the best especially for Chinese. To improve search experience, you can install a language specific analyzer. Before creating the indices in Elasticsearch, install the following Elasticsearch extensions:
- [elasticsearch-analysis-ik](https://github.com/medcl/elasticsearch-analysis-ik)
- [elasticsearch-analysis-stconvert](https://github.com/medcl/elasticsearch-analysis-stconvert)

View File

@ -37,7 +37,7 @@ server {
}
resolver 8.8.8.8;
proxy_set_header Host YOUR_S3_HOSTNAME;
proxy_set_header Host YOUR_BUCKET_NAME.YOUR_S3_HOSTNAME;
proxy_set_header Connection '';
proxy_set_header Authorization '';
proxy_hide_header Set-Cookie;
@ -63,6 +63,8 @@ server {
add_header Cache-Control public;
add_header 'Access-Control-Allow-Origin' '*';
add_header X-Cache-Status $upstream_cache_status;
add_header X-Content-Type-Options nosniff;
add_header Content-Security-Policy "default-src 'none'; form-action 'none'";
}
}
```

View File

@ -0,0 +1,232 @@
---
title: Configuring object storage
description: Serving user-uploaded files in Mastodon using external object storage
menu:
docs:
weight: 15
parent: admin-optional
---
User-uploaded files can be stored on the main server's file system, or using an external object storage server, which can be required for scaling.
## Using the filesystem {#FS}
The simplest way to store user uploads is by using the server's file system. This is how it works by default and is suitable for small servers.
By default, Mastodon will store file uploads under `public/system` in its installation directory, but that can be overridden using the `PAPERCLIP_ROOT_PATH` environment variable.
By default, the files are served at `https://your-domain/system`, which can be overridden using `PAPERCLIP_ROOT_URL` and `CDN_HOST`.
{{< hint style="info" >}}
While using the server's file system is perfectly serviceable for small servers, using external object storage is more scalable.
{{</ hint >}}
{{< hint style="danger" >}}
The web server must be configured to serve those files but not allow listing them (that is, `https://your-domain/system/` should not return a file list). This should be the case if you use the configuration files distributed with Mastodon, but it is worth double-checking.
{{</ hint >}}
## S3-compatible object storage backends {#S3}
Mastodon can use S3-compatible object storage backends. ACL support is recommended as it allows Mastodon to quickly make the content of temporarily suspended users unavailable, or marginally improve security of private data.
On Mastodon's end, you need to configure the following environment variables:
- `S3_ENABLED=true`
- `S3_BUCKET=mastodata` (replacing `mastodata` with the name of your bucket)
- `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` need to be set to your credentials
- `S3_ALIAS_HOST` is optional but highly recommended in order to set up a caching proxy and not lock you to a specific provider
- `S3_REGION`
- `S3_HOSTNAME` (optional if you use Amazon AWS)
- `S3_PERMISSION` (optional, if you use a provider that does not support ACLs or want to use custom ACLs)
- `S3_FORCE_SINGLE_REQUEST=true` (optional, if you run in trouble processing large files)
{{< page-ref page="admin/optional/object-storage-proxy.md" >}}
{{< hint style="info" >}}
You must serve the files with CORS headers, otherwise some functions of Mastodon's web UI will not work. For example, `Access-Control-Allow-Origin: *`
{{</ hint >}}
{{< hint style="danger" >}}
In any case, your S3 bucket must be configured so that -- ACL configuration nonwithstanding -- all objects are publicly readable but neither writable or listable, while Mastodon itself can write to it. The configuration should be similar for all S3 providers, but common ones have been highlighted below.
{{</ hint >}}
### MinIO
MinIO is an open source implementation of an S3 object provider. This section does not cover how to install it, but how to configure a bucket for use in Mastodon.
You need to set a policy for anonymous access that allows read-only access to objects contained by the bucket without allowing listing them.
To do this, you need to set a custom policy (replace `mastodata` by the actual name of your S3 bucket):
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::mastodata/*"
}
]
}
```
Mastodon itself needs to be able to write to the bucket, so either use your admin MinIO account (discouraged) or an account specific to Mastodon (recommended) with the following policy attached (replace `mastodata` by the actual name of your S3 bucket):
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:*",
"Resource": "arn:aws:s3:::mastodata/*"
}
]
}
```
You can set those policies from the MinIO Console (web-based user interface) or the command-line client (`mcli` / `mc`).
#### Using the MinIO Console
Connect to the MinIO Console web interface and create a new bucket (or navigate to your existing bucket):
![](/assets/object-storage/minio-bucket.png)
Then, configure the “Access Policy” to a custom one that allows read access (`s3:GetObject`) without write access or ability to list objects (see above):
![](/assets/object-storage/minio-access-policy.png)
{{< hint style="info" >}}
If the MinIO Console does not allow you to set a “Custom” policy, you will likely need to update MinIO. If you are using MinIO in *standalone* or *filesystem* mode, [`RELEASE.2022-10-24T18-35-07Z`](https://github.com/minio/minio/releases/tag/RELEASE.2022-10-24T18-35-07Z) should be a safe version to update to that does not require [an involved migration procedure](https://min.io/docs/minio/linux/operations/install-deploy-manage/migrate-fs-gateway.html#migrate-from-gateway-or-filesystem-mode).
{{< /hint >}}
Create a new `mastodon-readwrite` policy (see above):
![](/assets/object-storage/minio-mastodon-readwrite.png)
Finally, create a new `mastodon` user with the `mastodon-readwrite` policy:
![](/assets/object-storage/minio-mastodon-user.png)
#### Using the command-line utility
The same can be achieved using the [MinIO Client](https://min.io/docs/minio/linux/reference/minio-mc.html) command-line utility (can be called `mc` or `mcli` depending on where it is installed from).
Create a new bucket:
`mc mb myminio/mastodata`
Save the anonymous access policy from above as `anonymous-readonly-policy.json` and the Mastodon user access policy as `mastodon-readwrite.json` (make sure to replace `mastodata` with the name of your newly-created bucket).
Set the anonymous access policy for your bucket:
`mc anonymous set-json anonymous-readonly-policy.json myminio/mastodata`
Add a `mastodon-readwrite` policy:
`mc admin policy add myminio mastodon-readwrite mastodon-readwrite.json`
Add the `mastodon` user (replace the password):
`mc admin user add myminio mastodon SECRET_PASSWORD`
Apply the `mastodon-readwrite` policy to the `mastodon` user:
`mc admin policy set myminio mastodon-readwrite user=mastodon`
### Wasabi Object Storage
Create a new bucket and define its policy to allow objects to be anonymously readable but not listable:
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::mastodata/*"
}
]
}
```
![](/assets/object-storage/wasabi-access-policy.png)
{{< hint style="info" >}}
If you are using an old bucket, ensure you are not giving “Everyone” read access to objects through Wasabi's legacy Access Control settings, as that allows listing objects and take precedence over the IAM policy defined above.
![](/assets/object-storage/wasabi-access-control.png)
{{< /hint >}}
Then, create a `mastodon-readwrite` policy to grant read and write access to your bucket:
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:*",
"Resource": "arn:aws:s3:::mastodata/*"
}
]
}
```
![](/assets/object-storage/wasabi-mastodon-readwrite.png)
Finally, create a new `mastodon` user and don't forget to enable the `mastodon-readwrite` policy:
![](/assets/object-storage/wasabi-mastodon-user.png)
On Mastodon's side, you need to set `S3_FORCE_SINGLE_REQUEST=true` to properly handle large uploads.
### DigitalOcean Spaces
In your DigitalOcean Spaces Bucket, make sure that “File Listing” is “Restricted” to users with access keys.
![](/assets/object-storage/do-spaces.png)
### Scaleway
If you want to use Scaleway Object Storage, we strongly recommend you to create a Scaleway project dedicaced to your Mastodon instance assets and to use a custom IAM policy.
First, create a new Scaleway project, in which you create your object storage bucket. You need to set your bucket visibility to "Private" to not allow objects to be listed.
![](/assets/object-storage/scaleway-bucket.png)
Now that your bucket is created, you need to create API keys to be used in your Mastodon instance configuration.
Head to the IAM settings (in your organisation menu, top right of the screen), and create a new IAM policy (eg `mastodon-media-access`)
![](/assets/object-storage/scaleway-policy.jpg)
This policy needs to have one rule, allowing it to read, write and delete objects in the Scaleway project you created above (the scope).
![](/assets/object-storage/scaleway-policy-rules.jpg)
Then head to the IAM Applications page, and a create a new one (eg `my-mastodon-instance`) and select the policy you created above.
Finally, click on the application you just created, then "API Keys", and create a new API key to use in your instance configuration. You should use the "Yes, set up preferred Project" option and select the project you created above as the default project for this key.
![](/assets/object-storage/scaleway-api-key.png)
Copy the Access Key ID and Secret, and use them for your `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` Mastodon config variables.
### Exoscale
In Exoscale, your bucket should not have any read ACLs (Mastodon will set the ACLs on the object themselves as appropriate).
You need to create an API Key for the Mastodon app, restricted to the Object Storage (`sos`) service, restricted to your bucket, and with unrestricted operations.
![](/assets/object-storage/exoscale.png)
On Mastodon's side, you need to set `S3_FORCE_SINGLE_REQUEST=true` to properly handle large uploads.
### Cloudflare R2
Cloudflare R2 does not support ACLs, so Mastodon needs to be instructed not to try setting them. To do that, set the `S3_PERMISSION` environment variable to an empty string.
{{< hint style="warning" >}}
Without support for ACLs, media files from temporarily-suspended users will remain accessible.
{{< /hint >}}
To get credentials for use in Mastodon, selecte “Manage R2 API Tokens” and create a new API token with “Edit” permissions.
{{< hint style="warning" >}}
This section is currently under construction.
{{< /hint >}}

View File

@ -1,6 +1,6 @@
---
title: Hidden services
description: Serving Mastodon through TOR hidden services.
title: Onion services
description: Serving Mastodon through Tor onion services.
menu:
docs:
weight: 20
@ -36,7 +36,7 @@ apt install tor deb.torproject.org-keyring
Edit the file at `/etc/tor/torrc` and add the following configuration.
```text
HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServiceDir /var/lib/tor/onion_service/
HiddenServiceVersion 3
HiddenServicePort 80 127.0.0.1:80
```
@ -47,7 +47,7 @@ Restart tor.
sudo service tor restart
```
Your tor hostname can now be found at `/var/lib/tor/hidden_service/hostname`.
Your tor hostname can now be found at `/var/lib/tor/onion_service/hostname`.
## Move your Mastodon configuration {#nginx}
@ -134,7 +134,7 @@ server {
}
```
Replace the long hash provided here with your Tor domain located in the file at `/var/lib/tor/hidden_service/hostname`.
Replace the long hash provided here with your Tor domain located in the file at `/var/lib/tor/onion_service/hostname`.
Note that the onion hostname has been prefixed with “mastodon.”. Your Tor address acts a wildcard domain. All subdomains will be routed through, and you can configure Nginx to respond to any subdomain you wish. If you do not wish to host any other services on your tor address you can omit the subdomain, or choose a different subdomain.

View File

@ -11,16 +11,16 @@ menu:
Mastodon has three types of processes:
* Web (Puma)
* Streaming API
* Background processing (Sidekiq)
- Web (Puma)
- Streaming API
- Background processing (Sidekiq)
### Web (Puma) {#web}
The web process serves short-lived HTTP requests for most of the application. The following environment variables control it:
* `WEB_CONCURRENCY` controls the number of worker processes
* `MAX_THREADS` controls the number of threads per process
- `WEB_CONCURRENCY` controls the number of worker processes
- `MAX_THREADS` controls the number of threads per process
Threads share the memory of their parent process. Different processes allocate their own memory, though they share some memory via copy-on-write. A larger number of threads maxes out your CPU first, a larger number of processes maxes out your RAM first.
@ -32,10 +32,36 @@ In terms of throughput, more processes are better than more threads.
The streaming API handles long-lived HTTP and WebSockets connections, through which clients receive real-time updates. The following environment variables control it:
* `STREAMING_CLUSTER_NUM` controls the number of worker processes
* `STREAMING_API_BASE_URL` controls the base URL of the streaming API
- `STREAMING_API_BASE_URL` controls the base URL of the streaming API
- `PORT` controls the port the streaming server will listen on, by default 4000. The `BIND` and `SOCKET` environment variables are also able to be used.
- Additionally the shared [database](/admin/config#postgresql) and [redis](/admin/config#redis) environment variables are used.
One process can handle a reasonably high number of connections. The streaming API can be hosted on a different subdomain if you want to e.g. avoid the overhead of nginx proxying the connections.
The streaming API can be use a different subdomain if you want to by setting `STREAMING_API_BASE_URL`, this allows you to have one load balancer for streaming and one for web/API requests.
{{< hint style="warning" >}}
Previous versions of Mastodon had a `STREAMING_CLUSTER_NUM` environment variable that made the streaming server use clustering, which started mulitple processes (workers) and used node.js to load balance them.
This interacted with the other settings in ways which made capacity planning difficult, especially when it comes to database connections and CPU resources. By default the streaming server would consume resources on all available CPUs which could cause contention with other software running on that server. Another common issue was that misconfiguring the `STREAMING_CLUSTER_NUM` would exhaust your database connections by opening up a connection pool per cluster worker process, so a `STREAMING_CLUSTER_NUM` of `5` and `DB_POOL` of `10` would potentially consume 50 database connections.
Now a single streaming server process will only use at maximum `DB_POOL` PostgreSQL connections, and scaling is handled by running more instances of the streaming server.
{{< /hint >}}
One process can handle a reasonably high number of connections and throughput, but if you find that a single streaming server process isn't handling your instance's load, you can run multiple processes by varying the `PORT` number of each, and then using nginx to load balance traffic to each of those instances.
{{< hint style="info" >}}
The more streaming server processes that you run, the more database connections will be consumed on PostgreSQL, so you'll likely want to use PgBouncer, as documented below.
{{< /hint >}}
An example nginx configuration to route traffic to three different processes on `PORT` 4000, 4001, and 4002 is as follows:
```
upstream streaming {
least_conn;
server 127.0.0.1:4000 fail_timeout=0;
server 127.0.0.1:4001 fail_timeout=0;
server 127.0.0.1:4002 fail_timeout=0;
}
```
### Background processing (Sidekiq) {#sidekiq}
@ -57,14 +83,14 @@ Would start the sidekiq process with 15 threads. Please mind that each threads n
Sidekiq uses different queues for tasks of varying importance, where importance is defined by how much it would impact the user experience of your servers local users if the queue wasnt working, in order of descending importance:
| Queue | Significance |
| :--- | :--- |
| `default` | All tasks that affect local users |
| `push` | Delivery of payloads to other servers |
| `mailers` | Delivery of e-mails |
| `pull` | Lower priority tasks such as handling imports, backups, resolving threads, deleting users, forwarding replies |
| `scheduler` | Doing cron jobs like refreshing trending hashtags and cleaning up logs |
| `ingress` | Incoming remote activities. Lower priority than the default queue so local users still see their posts when the server is under load |
| Queue | Significance |
| :---------- | :----------------------------------------------------------------------------------------------------------------------------------- |
| `default` | All tasks that affect local users |
| `push` | Delivery of payloads to other servers |
| `mailers` | Delivery of e-mails |
| `pull` | Lower priority tasks such as handling imports, backups, resolving threads, deleting users, forwarding replies |
| `scheduler` | Doing cron jobs like refreshing trending hashtags and cleaning up logs |
| `ingress` | Incoming remote activities. Lower priority than the default queue so local users still see their posts when the server is under load |
The default queues and their priorities are stored in [config/sidekiq.yml](https://github.com/mastodon/mastodon/blob/main/config/sidekiq.yml), but can be overridden by the command-line invocation of Sidekiq, e.g.:
@ -80,7 +106,6 @@ As a solution, it is possible to start different Sidekiq processes for the queue
**Make sure you only have one `scheduler` queue running!!**
## Transaction pooling with pgBouncer {#pgbouncer}
### Why you might need PgBouncer {#pgbouncer-why}
@ -258,10 +283,14 @@ As far as configuring the Redis database goes, basically you can get rid of back
To reduce the load on your Postgresql server, you may wish to setup hot streaming replication (read replica). [See this guide for an example](https://cloud.google.com/community/tutorials/setting-up-postgres-hot-standby). You can make use of the replica in Mastodon in these ways:
* The streaming API server does not issue writes at all, so you can connect it straight to the replica. But its not querying the database very often anyway so the impact of this is little.
* Use the Makara driver in the web and sidekiq processes, so that writes go to the master database, while reads go to the replica. Lets talk about that.
- The streaming API server does not issue writes at all, so you can connect it straight to the replica. But its not querying the database very often anyway so the impact of this is little.
- Use the Makara driver in the web processes, so that writes go to the primary database, while reads go to the replica. Lets talk about that.
You will have to edit the `config/database.yml` file and replace the `production` section as follows:
{{< hint style="warning" >}}
Read replicas are currently not supported for the Sidekiq processes, and using them will lead to failing jobs and data loss.
{{< /hint >}}
You will have to use a separate `config/database.yml` file for the web processes and edit it to replace the `production` section as follows:
```yaml
production:
@ -279,9 +308,8 @@ production:
url: postgresql://db_user:db_password@db_host:db_port/db_name
```
Make sure the URLs point to wherever your PostgreSQL servers are. You can add multiple replicas. You could have a locally installed pgBouncer with configuration to connect to two different servers based on database name, e.g. “mastodon” going to master, “mastodon_replica” going to the replica, so in the file above both URLs would point to the local pgBouncer with the same user, password, host and port, but different database name. There are many possibilities how this could be setup! For more information on Makara, [see their documentation](https://github.com/taskrabbit/makara#databaseyml).
Make sure the URLs point to wherever your PostgreSQL servers are. You can add multiple replicas. You could have a locally installed pgBouncer with configuration to connect to two different servers based on database name, e.g. “mastodon” going to the primary, “mastodon_replica” going to the replica, so in the file above both URLs would point to the local pgBouncer with the same user, password, host and port, but different database name. There are many possibilities how this could be setup! For more information on Makara, [see their documentation](https://github.com/taskrabbit/makara#databaseyml).
{{< hint style="warning" >}}
Sidekiq cannot reliably use read-replicas because even the tiniest replication lag leads to failing jobs due to queued up records not being found.
Make sure the sidekiq processes run with the stock `config/database.yml` to avoid failing jobs and data loss!
{{< /hint >}}

View File

@ -22,7 +22,7 @@ RAILS_ENV=production bin/tootctl help
## Base CLI
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/cli.rb" caption="lib/cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/base.rb" caption="lib/mastodon/cli/base.rb" >}}
---
@ -61,7 +61,7 @@ Show the version of the currently running Mastodon instance.
## Accounts CLI {#accounts}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/accounts_cli.rb" caption="lib/mastodon/accounts_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/accounts.rb" caption="lib/mastodon/cli/accounts.rb" >}}
---
@ -127,6 +127,9 @@ Modify a user account's role, email, active status, approval mode, or 2FA requir
`--role ROLE`
: Define the existing account's custom role by providing the `name` of that [Role]({{< relref "entities/Role" >}}). Default roles include `Owner`, `Admin`, and `Moderator` (case-sensitive).
`--remove-role`
: Removes the current role from the user.
`--email EMAIL`
: Update the user's email address to `EMAIL`.
@ -154,7 +157,7 @@ Modify a user account's role, email, active status, approval mode, or 2FA requir
**Version history:**\
2.6.0 - added\
3.1.2 - added `--reset-password`\
4.0.0 - `--role` no longer takes hard-coded `user`, `moderator`, or `admin` roles. Specify the name of the custom Role instead (case-sensitive).
4.0.0 - `--role` no longer takes hard-coded `user`, `moderator`, or `admin` roles. Specify the name of the custom Role instead (case-sensitive). Remove the current role with `--remove-role`.
---
@ -328,7 +331,7 @@ Approve new registrations when instance is in approval mode.
: Local username.
`--number N`
: Approve the N most recent registrations.
: Approve the N earliest pending registrations.
`--all`
: Approve all pending registrations.
@ -342,7 +345,7 @@ Approve new registrations when instance is in approval mode.
## Cache CLI {#cache}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/cache_cli.rb" caption="lib/mastodon/cache_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/cache.rb" caption="lib/mastodon/cli/cache.rb" >}}
---
@ -381,7 +384,7 @@ Update hard-cached counters of TYPE by counting referenced records from scratch.
## Domains CLI {#domains}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/domains_cli.rb" caption="lib/mastodon/domains_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/domains.rb" caption="lib/mastodon/cli/domains.rb" >}}
---
@ -447,7 +450,7 @@ Crawl the known fediverse by using Mastodon REST API endpoints that expose all k
## Email domain blocks CLI {#email-domain-blocks}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/email_domain_blocks_cli.rb" caption="lib/mastodon/email_domain_blocks_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/email_domain_blocks.rb" caption="lib/mastodon/cli/email_domain_blocks.rb" >}}
---
@ -497,7 +500,7 @@ Remove entries from the e-mail domain blocklist.
## Emoji CLI {#emoji}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/emoji_cli.rb" caption="lib/mastodon/emoji_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/emoji.rb" caption="lib/mastodon/cli/emoji.rb" >}}
---
@ -569,7 +572,7 @@ Remove all custom emoji.
## Feeds CLI {#feeds}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/feeds_cli.rb" caption="lib/mastodon/feeds_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/feeds.rb" caption="lib/mastodon/cli/feeds.rb" >}}
---
@ -614,7 +617,7 @@ Remove all home and list feeds from Redis.
## Maintenance CLI {#maintenance}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/maintenance_cli.rb" caption="lib/mastodon/maintenance_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/maintenance.rb" caption="lib/mastodon/cli/maintenance.rb" >}}
---
@ -633,7 +636,7 @@ Fix corrupted database indexes that may have been caused due to changing collati
## Media CLI {#media}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/media_cli.rb" caption="lib/mastodon/media_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/media.rb" caption="lib/mastodon/cli/media.rb" >}}
---
@ -641,14 +644,23 @@ Fix corrupted database indexes that may have been caused due to changing collati
### `tootctl media remove` {#media-remove}
Remove locally cached copies of media attachments from other servers.
Removes locally cached copies of media attachments, avatars or profile headers from other servers. By default, only media attachments are removed.
`--days N`
: How old media attachments have to be before they are removed. Defaults to 7.
: How old media attachments have to be before they are removed. In case of avatars and headers, how old the last webfinger request and update to the user has to be before they are removed. Defaults to 7.
`--concurrency N`
: The number of workers to use for this task. Defaults to N=5.
`--prune-profiles`
: Instead of media attachments, remove locally cached copies of avatars and headers from other servers. Cannot be combined with `--remove-headers`.
`--remove-headers`
: Instead of media attachments, remove locally cached copies of headers from other servers. Cannot be combined with `--prune-profiles`.
`--include-follows`
: Override the default behavior of `--prune-profiles` and `--remove-headers` to remove locally cached copies of avatars (and headers) from other servers, irrespective of follow status (by default, they are only removed from accounts that are not followed by or following anyone locally). Can only be used with `--prune-profiles` or `--remove-headers`.
`--verbose`
: Print additional information while task is processing.
@ -658,6 +670,7 @@ Remove locally cached copies of media attachments from other servers.
**Version history:**\
2.5.0 - added\
2.6.2 - show freed disk space
4.1.0 - added --prune-profiles, --remove-headers, and --include-follows.
---
@ -745,7 +758,7 @@ Prompts for a media URL, then looks up the status where the media is displayed.
## Preview Cards CLI {#preview_cards}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/preview_cards_cli.rb" caption="lib/mastodon/preview_cards_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/preview_cards.rb" caption="lib/mastodon/cli/preview_cards.rb" >}}
---
@ -779,7 +792,7 @@ Remove local thumbnails for preview cards.
## Search CLI {#search}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/search_cli.rb" caption="lib/mastodon/search_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/search.rb" caption="lib/mastodon/cli/search.rb" >}}
---
@ -787,7 +800,7 @@ Remove local thumbnails for preview cards.
### `tootctl search deploy` {#search-deploy}
Create or update an ElasticSearch index and populate it. If ElasticSearch is empty, this command will create the necessary indices and then import data from the database into those indices. This command will also upgrade indices if the underlying schema has been changed since the last run.
Create or update an Elasticsearch index and populate it. If Elasticsearch is empty, this command will create the necessary indices and then import data from the database into those indices. This command will also upgrade indices if the underlying schema has been changed since the last run.
`--batch-size`
: Defaults to 1000. A lower batch size can make ElasticSearch process records more quickly.
@ -810,7 +823,7 @@ Create or update an ElasticSearch index and populate it. If ElasticSearch is emp
## Settings CLI {#settings}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/settings_cli.rb" caption="lib/mastodon/settings_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/settings.rb" caption="lib/mastodon/cli/settings.rb" >}}
---
@ -854,7 +867,7 @@ Set registration to require approval.
## Statuses CLI {#statuses}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/statuses_cli.rb" caption="lib/mastodon/statuses_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/statuses.rb" caption="lib/mastodon/cli/statuses.rb" >}}
---
@ -883,7 +896,7 @@ This is a computationally heavy procedure that creates extra database indices be
## Upgrade CLI {#upgrade}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/upgrade_cli.rb" caption="lib/mastodon/upgrade_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/upgrade.rb" caption="lib/mastodon/cli/upgrade.rb" >}}
---
@ -900,4 +913,4 @@ Upgrade the storage schema to store all non-local media resources in a top-level
: Print expected results only, without performing any actions.
**Version history:**\
3.1.4 - added
3.1.4 - added

View File

@ -30,3 +30,11 @@ Check that you are specifying the correct environment with `RAILS_ENV=production
## **I encountered a compilation error while executing `RAILS_ENV=production bundle exec rails assets:precompile`, but no more information is given. How to fix it?**
Usually it's because your server ran out of memory while compiling assets. Use a swapfile or increase the swap space to increase the memory capacity. Run `RAILS_ENV=production bundle exec rake tmp:cache:clear` to clear cache, then execute `RAILS_ENV=production bundle exec rails assets:precompile` to compile again. Make sure you clear the cache after a compilation error, or it will show "Everything's OK" but leave the assets unchanged.
## **I am getting this error: `Read-only file system @ dir_s_mkdir`. Why?**
By default, Mastodon makes use of [systemd's sandboxing capabilities](https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Sandboxing) in a way that disallows writing outside of `/home/mastodon`. If Mastodon is installed elsewhere, you may need to allow `mastodon-sidekiq` and `mastodon-web` to write to a custom directory:
1. Add parameter `ReadWritePaths` to files `/etc/systemd/system/mastodon-sidekiq.service` and `/etc/systemd/system/mastodon-web.service`. Example - `ReadWritePaths=/example/mastodon/live`.
2. run `systemctl stop mastodon-sidekiq mastodon-web`
3. run `systemctl daemon-reload`
4. run `systemctl start mastodon-sidekiq mastodon-web`

View File

@ -7,7 +7,7 @@ menu:
---
{{< hint style="info" >}}
When a new version of Mastodon comes out, it appears on the [GitHub releases page](https://github.com/mastodon/mastodon/releases). Please mind that running unreleased code from the `master` branch, while possible, is not recommended.
When a new version of Mastodon comes out, it appears on the [GitHub releases page](https://github.com/mastodon/mastodon/releases). Please mind that running unreleased code from the `main` branch, while possible, is not recommended.
{{< /hint >}}
Mastodon releases correspond to git tags. Before attempting an upgrade, look up the desired release on the [GitHub releases page](https://github.com/mastodon/mastodon/releases). The page will contain a **changelog** describing everything you need to know about what's different, as well as **specific upgrade instructions**.
@ -59,14 +59,14 @@ systemctl reload mastodon-web
The `reload` operation is a zero-downtime restart, also called "phased restart". As such, Mastodon upgrades usually do not require any advance notice to users about planned downtime. In rare cases, you can use the `restart` operation instead, but there will be a (short) felt interruption of service for your users.
{{< /hint >}}
Rarely, the **streaming API** server is also updated and requires a restart:
The **streaming API** server is also updated and requires a restart, doing so will result in all connected clients being disconnected, which can increase load on your server:
```bash
systemctl restart mastodon-streaming
```
{{< hint style="danger" >}}
The streaming API server is updated very rarely, and in most releases, does *not* require a restart. Restarting the streaming API leads to an increased load on your server as disconnected clients attempt to reconnect or poll the REST API instead, so avoid it whenever you can.
Restarting the streaming API leads to an increased load on your server as disconnected clients attempt to reconnect or poll the REST API instead, so avoid it whenever you can.
{{< /hint >}}
{{< hint style="success" >}}

View File

@ -123,12 +123,12 @@ If `whole_word` is true, the client app should do the following:
Please check `app/javascript/mastodon/selectors/index.js` and `app/lib/feed_manager.rb` in the Mastodon source code for more details.
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/app/javascript/mastodon/selectors/index.js" caption="app/javascript/mastodon/selectors/index.js" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/javascript/mastodon/selectors/index.js" caption="app/javascript/mastodon/selectors/index.js" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/app/lib/feed_manager.rb" caption="app/lib/feed_manager.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/lib/feed_manager.rb" caption="app/lib/feed_manager.rb" >}}
## Focal points for cropping media thumbnails {#focal-points}
Server-side preview images are never cropped, to support a variety of apps and user interfaces. Therefore, the cropping must be done by those apps. To crop intelligently, focal points can be used to ensure a certain section of the image is always within the cropped viewport. See this [guide on how focal points are defined](https://github.com/jonom/jquery-focuspoint#1-calculate-your-images-focus-point). In summary, floating points range from -1.0 to 1.0, left-to-right or bottom-to-top. (0,0) is the center of the image. (0.5, 0.5) would be in the center of the upper-right quadrant. (-0.5, -0.5) would be in the center of the lower-left quadrant. For reference, thumbnails in the Mastodon frontend are most commonly 16:9.
{{< figure src="/assets/focal-points.jpg" caption="A demonstration of various focal points and their coordinates." >}}
{{< figure src="assets/focal-points.jpg" caption="A demonstration of various focal points and their coordinates." >}}

View File

@ -109,7 +109,7 @@ With our OAuth token for the authorized user, we can now perform any action as t
* See [/api/v2/search]({{< relref "methods/search#v2" >}}) for querying resources.
* See [/api/v1/suggestions]({{< relref "methods/suggestions" >}}) for suggested accounts to follow.
### Use safety features {#safety}
### User safety features {#safety}
* See [/api/v1/filters]({{< relref "methods/filters" >}}) for managing filtered keywords.
* See [/api/v1/domain_blocks]({{< relref "methods/domain_blocks" >}}) for managing blocked domains.

View File

@ -1,18 +1,22 @@
---
title: Libraries and implementations
description: Interface with the Mastodon API in the programming language of your choice.
description: Code, libraries and SDKs for the Mastodon API in a range of programming languages.
menu:
docs:
weight: 60
parent: client
---
## Apex (Salesforce) {#apex-salesforce}
Thank you to our awesome developer community, for supporting the project with a wide range of implementations of the API. If you have built a library or SDK for the Mastodon API, [let us know](https://github.com/mastodon/mastodon/discussions) about it, and it may be included below in a future update.
* [apex-mastodon](https://github.com/tzmfreedom/apex-mastodon)
Remember to check how recently the library was updated, and whether it includes the API features you may want to use.
## Arduino / ESP32 / IoT {#arduino-iot}
* [lyuba](https://github.com/ringtailsoftware/lyuba)
## C# (.NET Standard) {#c-net-standard}
* [MastodonAPI](https://github.com/golf1052/MastodonAPI)
* [Mastodot](https://github.com/yamachu/Mastodot)
* [Mastonet](https://github.com/glacasa/Mastonet)
* [TootNet](https://github.com/cucmberium/TootNet)
@ -23,26 +27,36 @@ menu:
* [mastodonpp](https://schlomp.space/tastytea/mastodonpp)
## Crystal {#crystal}
* [mastodon.cr](https://github.com/decors/mastodon.cr)
## Common Lisp {#common-lisp}
* [mastodon-cl](https://github.com/compufox/mastodon-cl)
* [tooter](https://github.com/Shinmera/tooter)
## Dart
## Crystal {#crystal}
* [mastodon-api-crystal](https://github.com/renatolond/mastodon-api-crystal)
## Dart {#dart}
* [mastodon_dart](https://pub.dev/packages/mastodon_dart)
* [mastodon-api](https://github.com/mastodon-dart/mastodon-api)
* [mastodon-oauth](https://github.com/mastodon-dart/mastodon-oauth2)
* [mastodon](https://github.com/mykdavies/Mastodon)
* [dartodon](https://github.com/darkcl/dartodon)
## Elixir {#elixir}
* [hunter](https://github.com/milmazz/hunter)
## Erlang {#erlang}
* [masterldon](https://github.com/igb/masterldon)
## Go {#go}
* [go-mastodon](https://github.com/mattn/go-mastodon)
* [madon](https://github.com/McKael/madon)
* [go-mastodon-api](https://github.com/aaronland/go-mastodon-api)
## Haskell {#haskell}
@ -50,10 +64,13 @@ menu:
## Java {#java}
* [mastodon4j](https://github.com/sys1yagi/mastodon4j)
* [BigBone](https://github.com/andregasser/bigbone)
* [Mastodon4J](https://github.com/Mastodon4J/Mastodon4J)
* [mastodon-jfx](https://github.com/wakingrufus/mastodon-jfx)
## JavaScript {#javascript}
* [megalodon](https://github.com/h3poteto/megalodon)
* [masto.js](https://github.com/neet/masto.js)
* [libodonjs](https://github.com/Zatnosk/libodonjs)
@ -63,29 +80,51 @@ menu:
## JavaScript (Node.js) {#javascript-node-js}
* [node-mastodon](https://github.com/jessicahayley/node-mastodon)
* [mastodon-api](https://github.com/vanita5/mastodon-api)
## Kotlin {#kotlin}
* [BigBone](https://github.com/andregasser/bigbone)
* [mastodonk](https://github.com/outadoc/mastodonk)
## Nim {#nim}
* [Mastonim](https://github.com/matrix07012/Mastonim)
## Objective-C {#objective-c}
* [Cocotodon](https://github.com/shibafu528/Cocotodon)
## Perl {#perl}
* [Mastodon::Client](https://metacpan.org/pod/Mastodon::Client)
## PHP {#php}
* [Mastodon API for Laravel](https://github.com/kawax/laravel-mastodon-api)
* [Composer based php API wrapper](https://github.com/r-daneelolivaw/mastodon-api-php)
* [MastodonOAuthPHP](https://github.com/TheCodingCompany/MastodonOAuthPHP)
* [mastodon-api-client](https://github.com/vazaha-nl/mastodon-api-client)
* [Phediverse Mastodon REST Client](https://github.com/phediverse/mastodon-rest)
* [TootoPHP](https://framagit.org/MaxKoder/TootoPHP)
* [oauth2-mastodon](https://github.com/lrf141/oauth2-mastodon)
* [MastodonBotPHP](https://github.com/Eleirbag89/MastodonBotPHP)
* [mastodon-api-php-oauth](https://github.com/yks118/Mastodon-api-php-oauth)
* [mastodon-api-php](https://github.com/colorfield/mastodon-api-php)
* [Mastodon API for Laravel](https://github.com/kawax/laravel-mastodon-api)
* [Mastodon for Drupal](https://github.com/colorfield/mastodon)
* [Mastodon for Socialite](https://github.com/kawax/socialite-mastodon)
## PowerShell {#powershell}
* [Mastodon](https://github.com/JB405/Mastodon)
## Python {#python}
* [Mastodon.py](https://github.com/halcy/Mastodon.py)
* [mastopy](https://gitlab.com/spla/mastopy)
## R {#r}
* [mastodon](https://github.com/ThomasChln/mastodon)
* [rtoot](https://github.com/schochastics/rtoot)
## Ruby {#ruby}
@ -93,8 +132,8 @@ menu:
## Rust {#rust}
* [mammut](https://github.com/Aaronepower/mammut) (unmaintained)
* [elefren](https://github.com/DeeUnderscore/elefren) (unmaintained)
* [megalodon-rs](https://github.com/h3poteto/megalodon-rs)
* [mastodon-async](https://github.com/dscottboggs/mastodon-async)
## Scala {#scala}
@ -104,9 +143,17 @@ menu:
### Guile {#guile}
* [elefan](https://codeberg.org/WammKD/Guile-Mastodon)
* [Guile-Mastodon](https://codeberg.org/WammKD/Guile-Mastodon)
## Swift {#swift}
* [MastodonKit](https://github.com/ornithocoder/MastodonKit)
* [Mastodon.swift](https://github.com/Swiftodon/Mastodon.swift)
* [MastodonKit](https://github.com/MastodonKit/MastodonKit)
* [tootsdk](https://github.com/tootsdk/tootsdk)
* [MastodonAPI](https://github.com/li-bei/MastodonAPI)
## TypeScript {#typescript}
* [tsl-mastodon](https://github.com/typescriptlibs/tsl-mastodon-api)

View File

@ -70,5 +70,4 @@ The following overview should not be seen as complete or authoritative, but as a
All locale files are normalized to ensure consistent formatting and key order, which minimizes changesets in version control.
- Run `bundle exec i18n-tasks normalize` to normalize server-side translations
- Run `yarn run manage:translations` to normalize client-side translations
- Run `yarn run i18n:extract` to extract and normalize client-side translations into `en.json`

View File

@ -7,7 +7,7 @@ menu:
parent: dev
---
If you believe you've identified a security vulnerability in Mastodon (a bug that allows something to happen that shouldn't be possible), you should send the report to **hello@joinmastodon.org**. We will gladly reward such reports in proportion to the severity of the issue through our OpenCollective fund.
If you believe you've identified a security vulnerability in Mastodon (a bug that allows something to happen that shouldn't be possible), you should send the report to **security@joinmastodon.org**. We will gladly reward such reports in proportion to the severity of the issue through our OpenCollective fund.
You should *not* report such issues on GitHub or in other public spaces to give us time to publish a fix for the issue without exposing Mastodon's users to increased risk.

View File

@ -7,7 +7,7 @@ menu:
parent: dev
---
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/config/routes.rb" caption="config/routes.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/config/routes.rb" caption="config/routes.rb" >}}
## Explanation of routes {#routes}

View File

@ -82,6 +82,14 @@ foreman start
This will start processes defined in `Procfile.dev`, which will give you: A Rails server, a Webpack server, a streaming API server, and Sidekiq. Of course, you can run any of those things stand-alone depending on your needs.
## Working with emails in development
In development mode, Mastodon will use a gem called [Letter Opener](https://github.com/ryanb/letter_opener) for "sending" emails, which allows you to debug emails in your browser, without actually having to send emails via an SMTP server.
In order to work with emails, you'll need Sidekiq, Redis and PostgreSQL running, and then emails can be viewed by visiting: `http://localhost:3000/letter_opener/`
If you're developing in docker, you'll need to set the `REMOTE_DEV=true` environment variable.
## Useful commands for testing {#testing}
`rspec`
@ -102,4 +110,4 @@ This will start processes defined in `Procfile.dev`, which will give you: A Rail
: Update Javascript packages and install any new dependencies
`RAILS_ENV=development rails db:migrate`
: Run new database migrations for your development instance's database
: Run new database migrations for your development instance's database

View File

@ -442,8 +442,8 @@ aliases: [
{{< page-relref ref="methods/accounts" caption="accounts API methods" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/app/serializers/rest/account_serializer.rb" caption="app/serializers/rest/account_serializer.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/serializers/rest/account_serializer.rb" caption="app/serializers/rest/account_serializer.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/app/serializers/rest/credential_account_serializer.rb" caption="app/serializers/rest/credential_account_serializer.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/serializers/rest/credential_account_serializer.rb" caption="app/serializers/rest/credential_account_serializer.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/app/serializers/rest/muted_account_serializer.rb" caption="app/serializers/rest/muted_account_serializer.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/serializers/rest/muted_account_serializer.rb" caption="app/serializers/rest/muted_account_serializer.rb" >}}

View File

@ -210,4 +210,4 @@ aliases: [
{{< page-relref ref="methods/admin/accounts" caption="admin/accounts API methods" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/app/serializers/rest/admin/account_serializer.rb" caption="app/serializers/rest/admin/account_serializer.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/serializers/rest/admin/account_serializer.rb" caption="app/serializers/rest/admin/account_serializer.rb" >}}

View File

@ -170,7 +170,7 @@ aliases: [
{{< page-relref page="methods/admin/reports" caption="admin/reports API methods">}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/app/serializers/rest/admin/report_serializer.rb" caption="app/serializers/rest/admin/report_serializer.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/serializers/rest/admin/report_serializer.rb" caption="app/serializers/rest/admin/report_serializer.rb" >}}

View File

@ -66,4 +66,4 @@ aliases: [
{{< page-relref ref="entities/Status#application" caption="Status (`application` attribute)" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/app/serializers/rest/application_serializer.rb" caption="app/serializers/rest/application_serializer.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/serializers/rest/application_serializer.rb" caption="app/serializers/rest/application_serializer.rb" >}}

View File

@ -117,7 +117,7 @@ Error: There was a temporary problem serving your request, please try again. App
## See also
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/app/controllers/api/base_controller.rb" caption="app/controllers/api/base_controller.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/base_controller.rb" caption="app/controllers/api/base_controller.rb" >}}

View File

@ -32,7 +32,7 @@ aliases: [
### `status_id` {#keyword}
**Description:** The ID of the filtered Status in the database.\
**Description:** The ID of the Status that will be filtered.\
**Type:** String (cast from an integer, but not guaranteed to be a number)\
**Version history:**\
4.0.0 - added

View File

@ -134,6 +134,6 @@ aliases: [
## See also
{{< page-relref ref="methods/accounts#relationships" caption="POST /api/v1/accounts/relationships" >}}
{{< page-relref ref="methods/accounts#relationships" caption="GET /api/v1/accounts/relationships" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/serializers/rest/relationship_serializer.rb" caption="app/serializers/rest/relationship_serializer.rb" >}}

View File

@ -109,14 +109,14 @@ aliases: [
### `status_ids` {#status_ids}
**Description:** The domain name of the instance.\
**Description:** IDs of statuses that have been attached to this report for additional context.\
**Type:** {{<nullable>}} Array of String (cast from integer), or null\
**Version history:**\
4.0.0 - added
### `rule_ids` {#rule_ids}
**Description:** The domain name of the instance.\
**Description:** IDs of the rules that have been cited as a violation by this report.\
**Type:** {{<nullable>}} Array of String (cast from integer), or null\
**Version history:**\
4.0.0 - added

View File

@ -19,11 +19,8 @@ aliases: [
"id": 3,
"name": "Owner",
"color": "#ff3838",
"position": 1000,
"permissions": 1,
"highlighted": true,
"created_at": "2022-09-08T22:48:07.983Z",
"updated_at": "2022-09-08T22:48:07.983Z"
"permissions": 1048575,
"highlighted": true
},
```
@ -50,13 +47,6 @@ aliases: [
**Version history:**\
4.0.0 - added
### `position` {#position}
**Description:** An index for the role's position. The higher the position, the more priority the role has over other roles.\
**Type:** Integer\
**Version history:**\
4.0.0 - added
### `permissions` {#permissions}
**Description:** A bitmask that represents the sum of all permissions granted to the role.\
@ -71,20 +61,6 @@ aliases: [
**Version history:**\
4.0.0 - added
### `created_at` {#created_at}
**Description:** The date that the role was created.\
**Type:** String (ISO 8601 Datetime)\
**Version history:**\
4.0.0 - added
### `updated_at` {#created_at}
**Description:** The date that the role was updated.\
**Type:** String (ISO 8601 Datetime)\
**Version history:**\
4.0.0 - added
## Permission flags
To determine the permissions available to a certain role, convert the `permissions` attribute to binary and compare from the least significant bit upwards. For convenience (and to prevent the terms from growing too long), permissions will be presented below using hexadecimal values.

View File

@ -73,7 +73,7 @@ Returned from `GET /api/v1/scheduled_statuses`:
### `scheduled_at` {#scheduled_at}
**Description:** ID of the status in the database.\
**Description:** The timestamp for when the status will be posted.\
**Type:** String (ISO 8601 Datetime)\
**Version history:**\
2.7.0 - added
@ -150,8 +150,12 @@ Returned from `GET /api/v1/scheduled_statuses`:
#### `params[visibility]` {#params-visibility}
**Description:** The language that will be used for the status.\
**Type:** {{<nullable>}} String (ISO 639-1 two-letter language code)\
**Description:** The visibility that the status will have once it is posted.\
**Type:** String (Enumerable oneOf)\
`public` = Visible to everyone, shown in public timelines.\
`unlisted` = Visible to public, but not included in public timelines.\
`private` = Visible to followers only, and to any mentioned users.\
`direct` = Visible only to mentioned users.\
**Version history:**\
2.7.0 - added

View File

@ -334,7 +334,7 @@ aliases: [
### `filtered` {{%optional%}} {#filtered}
**Description:** If the current token has an authorized user: The filter and keywords that matched this status.\
**Type:** Array of [FilterResult]({{ relref "entities/FilterResult" }})\
**Type:** Array of [FilterResult]({{< relref "entities/FilterResult" >}})\
**Version history:**\
4.0.0 - added

View File

@ -0,0 +1,50 @@
---
title: Translation
description: Represents the result of machine translating some status content
menu:
docs:
parent: entities
aliases: [
"/api/entities/Translation",
"/api/entities/translation",
]
---
## Example
```json
{
"content": "<p>Hola mundo</p>",
"detected_source_language": "en",
"provider": "DeepL.com"
}
```
## Attributes
### `content` {#content}
**Description:** The translated text of the status.\
**Type:** String (HTML)\
**Version history:**\
4.0.0 - added
### `detected_source_language` {#detected_source_language}
**Description:** The language of the source text, as auto-detected by the machine translation provider.\
**Type:** String (ISO 639 language code)\
**Version history:**\
4.0.0 - added
### `provider` {#provider}
**Description:** The service that provided the machine translation.
**Type:** String\
**Version history:**\
4.0.0 - added
## See also
{{< page-relref ref="methods/statuses#translate" caption="POST /api/v1/statuses/:id/translate" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/serializers/rest/translation_serializer.rb" caption="app/serializers/rest/translation_serializer.rb" >}}

View File

@ -767,7 +767,7 @@ exclude_reblogs
: Boolean. Filter out boosts from the response.
pinned
: Boolean. Filter for pinned statuses only.
: Boolean. Filter for pinned statuses only. Defaults to false, which includes all statuses. Pinned statuses do not receive special priority in the order of the returned results.
tagged
: String. Filter for statuses using a specific hashtag.
@ -2322,4 +2322,4 @@ Token does not have an authorized user
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/accounts/statuses_controller.rb" caption="app/controllers/api/v1/accounts/statuses_controller.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/models/account_statuses_filter.rb" caption="app/models/account_statuses_filter.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/models/account_statuses_filter.rb" caption="app/models/account_statuses_filter.rb" >}}

View File

@ -505,7 +505,7 @@ Reopen a currently closed report, if it is closed.
##### Path parameters
:id
: {{<required>}} String. The ID of the SOMETHING in the database.
: {{<required>}} String. The ID of the Report in the database.
##### Headers

View File

@ -16,7 +16,7 @@ aliases: [
## Server-side (v2) methods {#v2}
Since Mastodon 3.6, filters can contain multiple keywords and are matched server-side. Clients apply the filter action based on [the status's `filtered` attribute]({{< relref "entities/Status#filtered" >}}).
Since Mastodon 4.0, filters can contain multiple keywords and are matched server-side. Clients apply the filter action based on [the status's `filtered` attribute]({{< relref "entities/Status#filtered" >}}).
---
@ -106,7 +106,7 @@ Obtain a single filter group owned by the current user.
##### Path parameters
:id
: {{<required>}} String. The ID of the SOMETHING in the database.
: {{<required>}} String. The ID of the Filter in the database.
##### Headers
@ -206,7 +206,7 @@ keywords_attributes[][keyword]
: String. A keyword to be added to the newly-created filter group.
keywords_attributes[][whole_word]
: String. Whether the keyword should consider word boundaries.
: Boolean. Whether the keyword should consider word boundaries.
<!-- TODO: Remove when https://github.com/mastodon/mastodon/issues/21727 is fixed
keywords_attributes[][id]
@ -330,7 +330,7 @@ keywords_attributes[][keyword]
: String. A keyword to be added to the newly-created filter group.
keywords_attributes[][whole_word]
: String. Whether the keyword should consider word boundaries.
: Boolean. Whether the keyword should consider word boundaries.
keywords_attributes[][id]
: String. Provide the ID of an existing keyword to modify it, instead of creating a new keyword.
@ -1012,7 +1012,7 @@ FilterStatus is not owned by you or does not exist
## Client-side (v1) methods {#v1}
Prior to Mastodon 3.6, matching filters was done client-size and filters could only contain one phrase to filter against.
Prior to Mastodon 4.0, matching filters was done client-size and filters could only contain one phrase to filter against.
---
@ -1355,7 +1355,7 @@ DELETE /api/v1/filters/:id HTTP/1.1
##### Path parameters
:id
: {{<required>}} String. The ID of the SOMETHING in the database.
: {{<required>}} String. The ID of the Filter in the database.
##### Headers
@ -1403,4 +1403,4 @@ Filter does not exist or is not owned by you
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/filters/statuses_controller.rb" caption="app/controllers/api/v1/filters/statuses_controller.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/filters_controller.rb" caption="app/controllers/api/v1/filters_controller.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/filters_controller.rb" caption="app/controllers/api/v1/filters_controller.rb" >}}

View File

@ -25,7 +25,7 @@ GET /api/v2/instance
Obtain general information about the server.
**Returns:** [V1::Instance]({{< relref "entities/instance" >}})\
**Returns:** [Instance]({{< relref "entities/Instance" >}})\
**OAuth:** Public\
**Version history:**\
4.0.0 - added
@ -466,7 +466,7 @@ The admin has chosen to show domain blocks to no one. The response body is empty
## View extended description {#extended_description}
```http
GET /api/v1/example HTTP/1.1
GET /api/v1/instance/extended_description HTTP/1.1
```
Obtain an extended description of this server
@ -496,7 +496,7 @@ GET /api/v1/instance HTTP/1.1
Obtain general information about the server.
**Returns:** [V1::Instance]({{< relref "entities/instance" >}})\
**Returns:** [V1::Instance]({{< relref "entities/V1_Instance" >}})\
**OAuth:** Public\
**Version history:**\
1.1.0 - added\
@ -650,4 +650,4 @@ Obtain general information about the server.
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/instances/peers_controller.rb" caption="app/controllers/api/v1/instances/peers_controller.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/instances/rules_controller.rb" caption="app/controllers/api/v1/instances/rules_controller.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/instances/rules_controller.rb" caption="app/controllers/api/v1/instances/rules_controller.rb" >}}

View File

@ -459,7 +459,7 @@ Add accounts to the given list. Note that the user must be following these accou
##### Path parameters
:id
: {{<required>}} String. The ID of the SOMETHING in the database.
: {{<required>}} String. The ID of the List in the database.
##### Headers
@ -528,7 +528,7 @@ Remove accounts from the given list.
##### Path parameters
:id
: {{<required>}} String. The ID of the SOMETHING in the database.
: {{<required>}} String. The ID of the List in the database.
##### Headers
@ -561,7 +561,7 @@ Invalid or missing Authorization header.
##### 404: Not found
SOMETHING is not owned by you or does not exist
List is not owned by you or does not exist
```json
{

View File

@ -44,7 +44,7 @@ timeline[]
#### Response
##### 200: OK
timeline[] = ["home", "notifications"]
A request with `?timeline[]=home&timeline[]=notifications`
```json
{

View File

@ -175,7 +175,7 @@ Invalid or missing Authorization header.
## Get a single notification {#get-one}
```http
GET /api/v1/notification/:id HTTP/1.1
GET /api/v1/notifications/:id HTTP/1.1
```
View information about a notification with a given ID.

View File

@ -102,7 +102,7 @@ client_id
: {{<required>}} String. The client ID, obtained during app registration.
client_secret
: {{<required>}} String. The client secret, obtained durign app registration.
: {{<required>}} String. The client secret, obtained during app registration.
redirect_uri
: {{<required>}} String. Set a URI to redirect the user to. If this parameter is set to urn:ietf:wg:oauth:2.0:oob then the token will be shown instead. Must match one of the `redirect_uris` declared during app registration.

View File

@ -22,7 +22,7 @@ aliases: [
## About the Web Push API {#about}
Mastodon natively supports the [Web Push API](https://developer.mozilla.org/en-US/docs/Web/API/Push_API). You can utilize the same mechanisms for your native app. It requires running a proxy server that connects to Androids and Apples proprietary notification gateways. However, the proxy server does not have access to the contents of the notifications. For a reference, see [Mozillas web push server](https://github.com/mozilla-services/autopush), or more practically, see:
Mastodon natively supports the [Web Push API](https://developer.mozilla.org/en-US/docs/Web/API/Push_API). You can utilize the same mechanisms for your native app. Mastodon doesn't connect to Androids and Apples proprietary notification gateways directly, so if you wish to use those you can use a proxy server that translates between the WebPush standard and those gateways. This can be implemented in such a way that the proxy server does not have access to the contents of the notifications. For an example, see [Mozillas reference web push server](https://github.com/mozilla-services/autopush), or one of the several relays developed by the Mastodon community specifically for this purpose:
* [toot-relay](https://github.com/DagAgren/toot-relay)
* [PushToFCM](https://github.com/tateisu/PushToFCM)
@ -43,7 +43,7 @@ Add a Web Push API subscription to receive notifications. Each access token can
**Version history:**\
2.4.0 - added\
3.3.0 - added `data[alerts][status]`\
3.4.0 - added `policy`\
3.4.0 - added `data[policy]`\
3.5.0 - added `data[alerts][update]` and `data[alerts][admin.sign_up]`\
4.0.0 - added `data[alerts][admin.report]`
@ -95,7 +95,7 @@ data[alerts][admin.sign_up]
data[alerts][admin.report]
: Boolean. Receive new report notifications? Defaults to false. Must have a role with the appropriate permissions.
policy
data[policy]
: String. Specify whether to receive push notifications from `all`, `followed`, `follower`, or `none` users.
#### Response
@ -334,4 +334,4 @@ Invalid or missing Authorization header.
## See also
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/push/subscriptions_controller.rb" caption="app/controllers/api/v1/push/subscriptions_controller.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/push/subscriptions_controller.rb" caption="app/controllers/api/v1/push/subscriptions_controller.rb" >}}

View File

@ -172,7 +172,7 @@ PUT /api/v1/scheduled_statuses/:id HTTP/1.1
##### Path parameters
:id
: {{<required>}} String. The ID of the SOMETHING in the database.
: {{<required>}} String. The ID of the ScheduledStatus in the database.
##### Headers
@ -253,7 +253,7 @@ DELETE /api/v1/scheduled_statuses/:id HTTP/1.1
##### Path parameters
:id
: {{<required>}} String. The ID of the SOMETHING in the database.
: {{<required>}} String. The ID of the ScheduledStatus in the database.
##### Headers

View File

@ -455,9 +455,10 @@ GET /api/v1/statuses/:id/context HTTP/1.1
View statuses above and below this status in the thread.
**Returns:** [Context]({{< relref "entities/context" >}})\
**OAuth:** Public for public statuses. User token + `read:statuses` for private statuses.\
**OAuth:** Public for public statuses limited to 40 ancestors and 60 descendants with a maximum depth of 20. User token + `read:statuses` for up to 4,096 ancestors, 4,096 descendants, unlimited depth, and private statuses.\
**Version history:**\
0.0.0 - added
4.0.0 - limit unauthenticated requests
#### Request
@ -523,6 +524,71 @@ Status is private or does not exist
---
## Translate a status {#translate}
```http
POST /api/v1/statuses/:id/translate HTTP/1.1
```
Translate the status content into some language.
**Returns:** [Translation]({{< relref "entities/translation" >}})\
**OAuth:** App token + `read:statuses`\
**Version history:**\
4.0.0 - added
#### Request
##### Path parameters
:id
: {{<required>}} String. The ID of the Status in the database.
##### Form data parameters
lang
: String (ISO 639 language code). The status content will be translated into this language. Defaults to the user's current locale.
##### Headers
Authorization
: {{<required>}} Provide this header with `Bearer <user token>` to gain authorized access to this API method.
#### Response
##### 200: OK
Translating the first "Hello world" post from mastodon.social into Spanish
```json
{
"content": "<p>Hola mundo</p>",
"detected_source_language": "en",
"provider": "DeepL.com"
}
```
##### 404: Not found
Status is private or does not exist
```json
{
"error": "Record not found"
}
```
##### 503: Service unavailable
The translation request failed
```json
{
"error": "Service Unavailable"
}
```
---
## See who boosted a status {#reblogged_by}
```http
@ -565,7 +631,7 @@ limit
#### Response
##### 200: OK
A list of statuses that boosted the status
A list of accounts that boosted the status
```json
[
@ -1394,7 +1460,7 @@ Edit a given status to change its text, sensitivity, media attachments, or poll.
##### Path parameters
:id
: {{<required>}} String. The ID of the SOMETHING in the database.
: {{<required>}} String. The ID of the Status in the database.
##### Headers
@ -1791,4 +1857,4 @@ Status does not exist or is private.
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/statuses/reblogs_controller.rb" caption="app/controllers/api/v1/statuses/reblogs_controller.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/statuses/sources_controller.rb" caption="app/controllers/api/v1/statuses/sources_controller.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/statuses/sources_controller.rb" caption="app/controllers/api/v1/statuses/sources_controller.rb" >}}

View File

@ -7,13 +7,9 @@ menu:
parent: spec
---
{{< hint style="warning" >}}
Sample payloads will be added at a future date.
{{< /hint >}}
## Status federation {#status}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/app/lib/activitypub/activity.rb" caption="app/lib/activitypub/activity.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/lib/activitypub/activity.rb" caption="app/lib/activitypub/activity.rb" >}}
### Supported activities for statuses
@ -29,21 +25,21 @@ Like
Announce
: Transformed into a boost on a status
Flag
: Transformed into a report to the moderation team.
Update
: Refresh vote count on polls. As of Mastodon 3.5.0: edit statuses.
: Refresh vote count on polls. As of Mastodon 3.5.0: edit statuses when the `updated` timestamp is present.
Undo
: Undo a previous Like or Announce.
Flag
: Transformed into a report to the moderation team. See the [Reports](#Flag) extension for more information.
### Payloads
The first-class Object types supported by Mastodon are `Note` and `Question`.
- Notes are transformed into regular statuses.
- Questions are transformed into a poll status.
- Questions are transformed into a poll status. See the [Polls](#Question) extension for more information.
Some other Object types are converted as best as possible:
@ -56,6 +52,64 @@ Some other Object types are converted as best as possible:
The transformer uses `content` if available, or `name` if not, in order to generate status text. The `url` will be appended. The `summary` property will be used as the CW text. The `icon` will be used as a thumbnail.
### HTML sanitization {#sanitization}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/sanitize_ext/sanitize_config.rb" caption="lib/sanitize_ext/sanitize_config.rb" >}}
Mastodon sanitizes incoming HTML in order to not break assumptions for API client developers. Supported elements will be kept as-is, and unsupported elements will be converted or removed. Supported attributes will be kept, and all other attributes will be stripped. The following elements and attributes are supported:
- `<p>`
- `<span>` (`class`)
- `<br>`
- `<a>` (`href`, `rel`, `class`)
- lists will be converted to `<p>`, and list items will be separated with `<br>`
Since Mastodon v4.2, the following elements and attributes are supported:
- `<p>`
- `<span>` (`class`)
- `<br>`
- `<a>` (`href`, `rel`, `class`)
- `<del>`
- `<pre>`
- `<code>`
- `<em>`
- `<strong>`
- `<b>`
- `<i>`
- `<u>`
- `<ul>`
- `<ol>` (`start`, `reversed`)
- `<li>` (`value`)
- `<blockquote>`
- headings will be converted to `<strong>` and then wrapped in `<p>`
The sanitizer will keep classes if they begin with microformats prefixes or are semantic classes:
- h-*
- p-*
- u-*
- dt-*
- e-*
- mention
- hashtag
- ellipsis
- invisible
Links will be kept if the protocol is supported, and converted to text otherwise. The following link protocols are supported:
- http
- https
- dat
- dweb
- ipfs
- ipns
- ssb
- gopher
- xmpp
- magnet
- gemini
### Properties used
content
@ -68,7 +122,7 @@ summary
: Used as CW text
sensitive
: Used to determine whether status media or text should be hidden by default
: Used to determine whether status media or text should be hidden by default. See the [Sensitive content](#sensitive) extension section for more information about `as:sensitive`
inReplyTo
: Used for threading a status as a reply to another status
@ -83,21 +137,16 @@ attributedTo
: Used to determine the profile which authored the status
to/cc
: Used to determine audience and visibility of a status.
- Public statuses have the `as:Public` magic collection in `to`
- Unlisted statuses have the `as:Public` magic collection in `cc`
- Followers-only statuses have an actor's follower collection in `to` or `cc`, but do not include the `as:Public` magic collection
- Private statuses have actors in `to` or `cc`, at least one of which is not `Mention`ed in `tag`
- Direct statuses have actors in `to` or `cc`, all of which are `Mention`ed in `tag`
: Used to determine audience and visibility of a status, in combination with mentions. See [Mentions for adddressing and notifications](#Mention)
tag
: Used to mark up mentions and hashtags.
tag[].type
: Either `Mention` or `Hashtag` is currently supported
: Either `Mention`, `Hashtag`, or `Emoji` is currently supported. See the [Hashtag](#Hashtag) and [Custom emoji](#Emoji) extension sections for more information
tag[].name
: The plain-text Webfinger address of a profile Mention (`@user` or `@user@domain`), or the plain-text Hashtag (`#tag`)
: The plain-text Webfinger address of a profile Mention (`@user` or `@user@domain`), or the plain-text Hashtag (`#tag`), or the custom Emoji shortcode (`:thounking:`)
tag[].href
: The URL of the actor or tag
@ -153,28 +202,28 @@ Accept/Reject
Add/Remove
: Manage pinned posts and featured collections.
Block
: Signal to a remote server that they should hide your profile from that user. Not guaranteed.
Flag
: Report user
Update
: Refresh account details
Move
: Migrate followers from one account to another. Requires alsoKnownAs to be set in both directions.
Delete
: Remove an account from the database, as well as all of their statuses.
Undo
: Undo a previous Follow, Accept Follow, or Block.
Block
: Signal to a remote server that they should hide your profile from that user. Not guaranteed. See [Remote blocking](#Block) for more information.
Flag
: Report a user to their moderation team. See the [Reports](#Flag) extension for more information.
Move
: Migrate followers from one account to another. Requires `alsoKnownAs` to be set on the new account pointing to the old account.
### Properties used
preferredUsername
: Used for Webfinger lookup. Must be unique on the domain, and must correspond to a Webfinger `acct:` URI.
: Used for Webfinger lookup. Must be unique on the domain, and must correspond to a Webfinger `acct:` URI.
name
: Used as profile display name.
@ -215,82 +264,241 @@ alsoKnownAs
published
: When the profile was created.
## JSON-LD Contexts and Extensions {#contexts}
## HTML sanitization {#sanitization}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/app/lib/sanitize_config.rb" caption="app/lib/sanitize_config.rb" >}}
Mastodon sanitizes incoming HTML in order to not break assumptions for API client developers. Supported elements include `<p>`, `<span>`, `<br>`, and `<a>`. Unsupported elements will be converted to `<p>`.The sanitizer will keep classes if they begin with microformats prefixes or are semantic classes:
- h-*
- p-*
- u-*
- dt-*
- e-*
- mention
- hashtag
- ellipsis
- invisible
## JSON-LD Namespacing {#namespaces}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/app/lib/activitypub/adapter.rb" caption="app/lib/activitypub/adapter.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/lib/activitypub/adapter.rb" caption="app/lib/activitypub/adapter.rb" >}}
### Mastodon extensions (`toot:`) {#toot}
Base URI: `http://joinmastodon.org/ns#`
Contains definitions for Mastodon features.
- toot:Emoji
- toot:IdentityProof
- toot:blurhash
- toot:focalPoint
- toot:featured
- toot:featuredTags
- toot:discoverable
- toot:suspended
- toot:votersCount
- toot:Emoji (`http://joinmastodon.org/ns#Emoji`)
- toot:IdentityProof (`http://joinmastodon.org/ns#IdentityProof`)
- toot:blurhash (`http://joinmastodon.org/ns#blurhash`)
- toot:focalPoint (`http://joinmastodon.org/ns#focalPoint`)
- toot:featured (`http://joinmastodon.org/ns#featured`)
- toot:featuredTags (`http://joinmastodon.org/ns#featuredTags`)
- toot:discoverable (`http://joinmastodon.org/ns#discoverable`)
- toot:suspended (`http://joinmastodon.org/ns#suspended`)
- toot:votersCount (`http://joinmastodon.org/ns#votersCount`)
### ActivityStreams extensions (`as:`) {#as}
Base URI: `https://www.w3.org/ns/activitystreams#`
Contains ActivityStreams extended properties that have been proposed but not officially adopted yet.
- as:Hashtag
- as:alsoKnownAs
- as:manuallyApprovesFollowers
- as:movedTo
- as:sensitive
- as:Hashtag (`https://www.w3.org/ns/activitystreams#Hashtag`)
- as:manuallyApprovesFollowers (`https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers`)
- as:movedTo (`https://www.w3.org/ns/activitystreams#movedTo`)
- as:sensitive (`https://www.w3.org/ns/activitystreams#sensitive`)
### W3ID Security Vocabulary (`sec:`) {#sec}
Contains properties used for HTTPS Signatures and Linked Data Signatures. Also used for identity proofs. See [Security]({{< relref "spec/security" >}}) for more information.
- sec:publicKey
- sec:publicKeyPem
- sec:owner
- sec:signature
- sec:signatureValue
#### W3ID Identity
Contains a collection of terms from various namespaces, used for Linked Data Signatures.
- dc:creator
- dc:created
- sec:signature
- sec:signatureValue
### schema.org extensions (`schema:`) {#schema}
### Schema.org extensions (`schema:`) {#schema}
Contains properties used for profile metadata.
- schema:PropertyValue
- schema:value
Base URI: `http://schema.org#` (incorrect; should be `https://schema.org/`)
## Extensions
- [schema:PropertyValue (`http://schema.org#PropertyValue`, should be `https://schema.org/PropertyValue`)](https://schema.org/PropertyValue)
- [schema:value (`http://schema.org#value`, should be `https://schema.org/value`)](https://schema.org/value)
### W3ID Security Vocabulary (`sec:`) {#sec}
Context: [`https://w3id.org/security/v1`](https://w3id.org/security/v1)
Used for HTTPS Signatures. Also used for identity proofs. See [Security]({{< relref "spec/security" >}}) for more information.
- [sec:publicKey (`https://w3id.org/security#publicKey`)](https://w3id.org/security#publicKey)
- [sec:publicKeyPem (`https://w3id.org/security#publicKeyPem`)](https://w3id.org/security#publicKeyPem)
- [sec:owner (`https://w3id.org/security#owner`)](https://w3id.org/security#owner)
- [sec:signature (`https://w3id.org/security#signature`)](https://w3id.org/security#signature)
- [sec:signatureValue (`https://w3id.org/security#signatureValue`)](https://w3id.org/security#signatureValue)
#### W3ID Identity
Context: [`https://w3id.org/identity/v1`](https://w3id.org/identity/v1) (offline)
Used for Linked Data Signatures. See [Security > Linked Data Signatures]({{< relref "spec/security#ld" >}}) for more information.
- [dc:creator (`http://purl.org/dc/terms/creator`)](http://purl.org/dc/terms/creator)
- [dc:created (`http://purl.org/dc/terms/created`)](http://purl.org/dc/terms/created)
- [sec:signature (`https://w3id.org/security#signature`)](https://w3id.org/security#signature)
- [sec:signatureValue (`https://w3id.org/security#signatureValue`)](https://w3id.org/security#signatureValue)
## Extensions defined using ActivityStreams vocabulary
While the Activity Vocabulary defines a wide range of types and terms, ActivityPub only defines side effects for a subset of them. The following activity types have the following side effects when received in a Mastodon inbox.
### Remote blocking (`Block`) {#Block}
ActivityPub defines the `Block` activity for client-to-server (C2S) use-cases, but not for server-to-server (S2S) -- it recommends that servers SHOULD NOT deliver Block activities to their `object`. However, Mastodon will send this activity when a local user blocks a remote user. When Mastodon receives a `Block` activity where the `object` is an actor on the local domain, it will interpret this as a signal to hide the actor's profile and posts from the local user, as well as disallowing mentions of that actor by that local user.
```json
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://mastodon.example/bd06bb61-01e0-447a-9dc8-95915db9aec8",
"type": "Block",
"actor": "https://mastodon.example/users/alice",
"object": "https://example.com/~mallory",
"to": "https://example.com/~mallory"
}
```
### Reporting profiles and posts (`Flag`) {#Flag}
To report profiles and/or posts on remote servers, Mastodon will send a `Flag` activity from the instance actor. The `object` of this activity contains the user being reported, as well as any posts attached to the report. If a comment is attached to the report, it will be used as the `content` of the activity.
```json
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://mastodon.example/ccb4f39a-506a-490e-9a8c-71831c7713a4",
"type": "Flag",
"actor": "https://mastodon.example/actor",
"content": "Please take a look at this user and their posts",
"object": [
"https://example.com/users/1",
"https://example.com/posts/380590",
"https://example.com/posts/380591"
],
"to": "https://example.com/users/1"
}
```
### Account migration (`Move`) {#Move}
Mastodon uses the Move activity to signal that an account has migrated to a different account. For the migration to be considered valid, Mastodon checks that the new account has defined an alias pointing to the old account (via the `alsoKnownAs` property).
```json
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://mastodon.example/users/alice#moves/1",
"actor": "https://mastodon.example/users/alice",
"type": "Move",
"object": "https://mastodon.example/users/alice",
"target": "https://alice.com/users/109835986274379",
"to": "https://mastodon.example/users/alice/followers"
}
```
### Polls {#Question}
{{< caption-link url="https://www.w3.org/TR/activitystreams-vocabulary/#questions" caption="Activity Vocabulary §5.4 - Representing Questions" >}}
The ActivityStreams Vocabulary specification describes loosely (non-normatively) how a question might be represented. Mastodon's implementation of polls is somewhat inspired by this section. The following implementation details can be observed:
- `Question` is used as an `Object` type instead of as an `IntransitiveActivity`; rather than being sent directly, it is wrapped in a `Create` just like any other status.
- Poll options are serialized using `oneOf` or `anyOf` as an array.
- Each item in this array has no `id`, has a `type` of `Note`, and has a `name` representing the text of the poll option.
- Each item in this array also has a `replies` property, representing the responses to this particular poll option. This node has no `id`, has a `type` of `Collection`, and has a `totalItems` property representing the total number of votes received for this option.
```json
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"votersCount": "http://joinmastodon.org/ns#votersCount"
}
],
"id": "https://mastodon.example/users/alice/statuses/1009947848598745",
"type": "Question",
"content": "What should I eat for breakfast today?",
"published": "2023-03-05T07:40:13Z",
"endTime": "2023-03-06T07:40:13Z",
"votersCount": 7,
"anyOf": [
{
"type": "Note",
"name": "apple",
"replies": {
"type": "Collection",
"totalItems": 3
}
},
{
"type": "Note",
"name": "orange",
"replies": {
"type": "Collection",
"totalItems": 7
}
},
{
"type": "Note",
"name": "banana",
"replies": {
"type": "Collection",
"totalItems": 6
}
}
]
}
```
- Poll votes are serialized as `Create` activities, where the `object` is a `Note` with a `name` that exactly matches the `name` of the poll option. The `Note.inReplyTo` points to the URI of the `Question` object.
- For multiple-choice polls, multiple activities may be sent. Votes will be counted if you have not previously voted for that option.
```json
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://mastodon.example/users/bob#votes/827163/activity",
"to": "https://mastodon.example/users/alice",
"actor": "https://mastodon.example/users/bob",
"type": "Create",
"object": {
"id": "https://mastodon.example/users/bob#votes/827163",
"type": "Note",
"name": "orange",
"attributedTo": "https://mastodon.example/users/bob",
"to": "https://mastodon.example/users/alice",
"inReplyTo": "https://mastodon.example/users/alice/statuses/1009947848598745"
}
}
```
```json
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://mastodon.example/users/bob#votes/827164/activity",
"to": "https://mastodon.example/users/alice",
"actor": "https://mastodon.example/users/bob",
"type": "Create",
"object": {
"id": "https://mastodon.example/users/bob#votes/827164",
"type": "Note",
"name": "banana",
"attributedTo": "https://mastodon.example/users/bob",
"to": "https://mastodon.example/users/alice",
"inReplyTo": "https://mastodon.example/users/alice/statuses/1009947848598745"
}
}
```
### Mentions for addressing and notifications {#Mention}
{{< caption-link url="https://www.w3.org/TR/activitystreams-vocabulary/#microsyntaxes" caption="Activity Vocabulary §5.6 - Mentions, Tags, and Other Common Social Microsyntaxes" >}}
In the ActivityStreams Vocabulary, `Mention` is a subtype of `Link` that is intended to represent the microsyntax of @mentions. The `tag` property is intended to add references to other Objects or Links. For Link tags, the `name` of the Link should be a substring of the natural language properties (`name`, `summary`, `content`) on that object. Wherever such a substring is found, it can be transformed into a hyperlink reference to the `href`.
However, Mastodon also uses `Mention` tags for addressing in some cases. Based on the presence or exclusion of Mention tags, and compared to the explicitly declared audiences in `to` and `cc`, Mastodon will calculate a visibility level for the post. Additionally, Mastodon requires Mention tags in order to generate a notification. (The mentioned actor must still be included within `to` or `cc` explicitly in order to receive the post.)
- `public`: Public statuses have the `as:Public` magic collection in `to`
- `unlisted`: Unlisted statuses have the `as:Public` magic collection in `cc`
- `private`: Followers-only statuses have an actor's follower collection in `to` or `cc`, but do not include the `as:Public` magic collection
- `limited`: Limited-audience statuses have actors in `to` or `cc`, at least one of which is not `Mention`ed in `tag`
- `direct`: Mentions-only statuses have actors in `to` or `cc`, all of which are `Mention`ed in `tag`
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/lib/activitypub/activity/create.rb" caption="app/lib/activitypub/activity/create.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/lib/activitypub/parser/status_parser.rb" caption="app/lib/activitypub/parser/status_parser.rb" >}}
## Extensions not defined by ActivityStreams
The following features are defined using properties and types that are not defined by ActivityStreams.
### Public key {#publicKey}
Public keys are used for HTTPS Signatures and Linked Data Signatures. This is implemented using an extra property `publicKey` on actor objects. See [Security]({{< relref "spec/security" >}}) for more information. Example:
Public keys are used for HTTP Signatures and Linked Data Signatures. This is implemented using an extra property `publicKey` on actor objects. See [Security]({{< relref "spec/security" >}}) for more information.
```json
{
@ -310,16 +518,15 @@ Public keys are used for HTTPS Signatures and Linked Data Signatures. This is im
### Featured collection {#featured}
What is known in Mastodon as “pinned statuses”, or statuses that are always featured at the top of peoples profiles, is implemented using an extra property `featured` on the actor object that points to a `Collection` of objects. Example:
What is known in Mastodon as “pinned statuses”, or statuses that are always featured at the top of peoples profiles, is implemented using an extra property `featured` on the actor object that points to a `Collection` of objects.
```json
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"toot": "http://joinmastodon.org/ns#",
"featured": {
"@id": "toot:featured",
"@id": "http://joinmastodon.org/ns#featured",
"@type": "@id"
}
}
@ -340,9 +547,8 @@ Mastodon allows users to feature specific hashtags on their profile for easy bro
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"toot": "http://joinmastodon.org/ns#",
"featuredTags": {
"@id": "toot:featuredTags",
"@id": "http://joinmastodon.org/ns#featuredTags",
"@type": "@id"
}
}
@ -354,113 +560,20 @@ Mastodon allows users to feature specific hashtags on their profile for easy bro
}
```
### Custom emojis {#emoji}
Mastodon supports arbitrary emojis, that is, small images uploaded by admins and invokable via shortcodes. For this, an `Emoji` type is used. These emojis are listed in the `tag` property just like `Mention` and `Hashtag` objects, since they are entities that affect how the text is rendered. Example:
```json
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"toot": "http://joinmastodon.org/ns#",
"Emoji": "toot:Emoji"
}
],
"id": "https://example.com/@alice/hello-world",
"type": "Note",
"content": "Hello world :kappa:",
"tag": [
{
"id": "https://example.com/emoji/123",
"type": "Emoji",
"name": ":kappa:",
"icon": {
"type": "Image",
"mediaType": "image/png",
"url": "https://example.com/files/kappa.png"
}
}
]
}
```
### Focal points {#focalPoint}
Mastodon supports setting a focal point on uploaded images, so that wherever that image is displayed, the focal point stays in view. This is implemented using an extra property `focalPoint` on `Image` objects. The property is an array of two floating points between -1.0 and 1.0, with 0,0 being the center of the image, the first value being x (-1.0 is the left edge, +1.0 is the right edge) and the second value being y (-1.0 is the bottom edge, +1.0 is the top edge). See [API Guidelines > Focal points]({{< relref "api/guidelines#focal-points" >}}) for more information. Example:
```json
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"toot": "http://joinmastodon.org/ns#",
"focalPoint": {
"@container": "@list",
"@id": "toot:focalPoint"
}
}
],
"id": "https://example.com/@alice/hello-world",
"type": "Note",
"content": "A picture attached!",
"attachment": [
{
"type": "Image",
"mediaType": "image/png",
"url": "https://example.com/files/cats.png",
"focalPoint": [
-0.55,
0.43
]
}
]
}
```
{{< figure src="/assets/focal-points.jpg" caption="A demonstration of various focal points and their coordinates." >}}
The focal point of (-0.55, 0.43) in the example above corresponds to a point 55% to the left of center and 43% above center. This focal point should remain visible within the cropped thumbnail, if any cropping is done.
### Blurhash {#blurhash}
Mastodon generates colorful preview thumbnails for attachments. This is implemented using an extra property `blurhash` on `Image` objects. The property is a string generated by the [BlurHash algorithm](https://blurha.sh). Example:
```json
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"toot": "http://joinmastodon.org/ns#",
"blurhash": "toot:blurhash"
}
],
"id": "https://example.com/@alice/hello-world",
"type": "Note",
"content": "A picture attached!",
"attachment": [
{
"type": "Image",
"mediaType": "image/png",
"url": "https://example.com/files/cats.png",
"blurhash": "UBL_:rOpGG-oBUNG,qRj2so|=eE1w^n4S5NH"
}
]
}
```
### Profile metadata {#PropertyValue}
Mastodon supports arbitrary profile fields containing name-value pairs. This is implemented using the `attachment` property on actor objects, with objects in the array having a type of `PropertyValue` and a `value` property, both from the schema.org namespace. Example:
Mastodon supports arbitrary profile fields containing name-value pairs. This is implemented using the `attachment` property on actor objects, with objects in the array having a type of `PropertyValue` and a `value` property, both from the schema.org namespace.
{{<hint style="warning">}}
As noted above while listing the [schema.org @context extensions](#schema), Mastodon currently incorrectly expects and maps the term `schema` to the base URI `http://schema.org#` instead of to the base URI `https://schema.org/`. Therefore, JSON-LD processors who use the correct context definition will fail to process profile fields correctly.
{{</hint>}}
```json
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"schema": "http://schema.org#",
"PropertyValue": "schema:PropertyValue",
"value": "schema:value"
}
@ -488,7 +601,7 @@ Mastodon supports arbitrary profile fields containing name-value pairs. This is
This property is currently unused/deprecated due to the removal of Keybase support in Mastodon 3.5: <https://github.com/mastodon/mastodon/pull/17045>
{{</hint>}}
Mastodon supports integration with identity providers to prove that a profile is linked to a certain identity. This is implemented using the `attachment` property on actor objects, with objects in the array having a type of `IdentityProof` from the Mastodon namespace. The object also includes `signatureAlgorithm` and `signatureValue` from the W3ID Security Vocabulary namespace. Example:
Mastodon supports integration with identity providers to prove that a profile is linked to a certain identity. This is implemented using the `attachment` property on actor objects, with objects in the array having a type of `IdentityProof` from the Mastodon namespace. The object also includes `signatureAlgorithm` and `signatureValue` from the W3ID Security Vocabulary namespace.
```json
{
@ -496,8 +609,7 @@ Mastodon supports integration with identity providers to prove that a profile is
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1",
{
"toot": "http://joinmastodon.org/ns#",
"IdentityProof": "toot:IdentityProof"
"IdentityProof": "http://joinmastodon.org/ns#IdentityProof"
}
],
"id": "https://mastodon.social/users/Gargron",
@ -515,15 +627,14 @@ Mastodon supports integration with identity providers to prove that a profile is
### Discoverability flag {#discoverable}
Mastodon allows users to opt-in or opt-out of discoverability features like the profile directory. This flag may also be used as an indicator of the user's preferences toward being included in external discovery services, such as search engines or other indexing tools. If you are implementing such a tool, it is recommended that you respect this property if it is present. This is implemented using an extra property `discoverable` on objects. Example:
Mastodon allows users to opt-in or opt-out of discoverability features like the profile directory. This flag may also be used as an indicator of the user's preferences toward being included in external discovery services, such as search engines or other indexing tools. If you are implementing such a tool, it is recommended that you respect this property if it is present. This is implemented using an extra property `discoverable` on objects.
```json
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"toot": "http://joinmastodon.org/ns#",
"discoverable": "toot:discoverable"
"discoverable": "http://joinmastodon.org/ns#discoverable"
}
],
"id": "https://mastodon.social/users/Gargron",
@ -534,15 +645,14 @@ Mastodon allows users to opt-in or opt-out of discoverability features like the
### Suspended flag {#suspended}
Mastodon reports whether a user was locally suspended, for better handling of these accounts. Suspended accounts in Mastodon return empty data. If a remote account is marked as suspended, it cannot be unsuspended locally. Suspended accounts can be targeted by activities such as Update, Undo, Reject, and Delete. This functionality is implemented using an extra property `suspended` on objects. Example:
Mastodon reports whether a user was locally suspended, for better handling of these accounts. Suspended accounts in Mastodon return empty data. If a remote account is marked as suspended, it cannot be unsuspended locally. Suspended accounts can be targeted by activities such as Update, Undo, Reject, and Delete. This functionality is implemented using an extra property `suspended` on objects.
```json
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"toot": "http://joinmastodon.org/ns#",
"suspended": "toot:suspended"
"suspended": "http://joinmastodon.org/ns#suspended"
}
],
"id": "https://example.com/@eve",
@ -551,6 +661,133 @@ Mastodon reports whether a user was locally suspended, for better handling of th
}
```
### Hashtags {#Hashtag}
Similar to the `Mention` subtype of Link already defined in ActivityStreams, Mastodon will use `Hashtag` as a subtype of Link in order to surface posts referencing some common topic identified by a string key. The Hashtag has a `name` containing the #hashtag microsyntax -- a `#` followed by a string sequence representing a topic. This is similar to the @mention microsyntax, where an `@` is followed by some string sequence representing a resource (where in Mastodon's case, this resource is expected to be an account). Mastodon will also normalize hashtags to be case-insensitive lowercase strings, performing ASCII folding and removing invalid characters.
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/lib/hashtag_normalizer.rb" caption="app/lib/hashtag_normalizer.rb" >}}
```json
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "https://www.w3.org/ns/activitystreams#Hashtag"
}
],
"id": "https://example.com/some-post",
"type": "Note",
"attributedTo": "https://example.com",
"content": "I love #cats",
"tag": [
{
"type": "Hashtag",
"name": "#cats",
"href": "https://example.com/tagged/cats"
}
]
}
```
### Custom emojis {#Emoji}
Mastodon supports arbitrary emojis by including a `tag` of the `Emoji` type. Handling of custom emojis is similar to handling of mentions and hashtags, where the `name` of the tagged entity is found as a substring of the natural language properties (`name`, `summary`, `content`) and then linked to the local representation of some resource or topic. In the case of emoji shortcodes, the `name` is replaced by the HTML for an inline image represented by the `icon` property (where `icon.url` links to the image resource).
```json
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"Emoji": "http://joinmastodon.org/ns#Emoji",
}
],
"id": "https://example.com/@alice/hello-world",
"type": "Note",
"content": "Hello world :kappa:",
"tag": [
{
"id": "https://example.com/emoji/123",
"type": "Emoji",
"name": ":kappa:",
"icon": {
"type": "Image",
"mediaType": "image/png",
"url": "https://example.com/files/kappa.png"
}
}
]
}
```
### Focal points {#focalPoint}
Mastodon supports setting a focal point on uploaded images, so that wherever that image is displayed, the focal point stays in view. This is implemented using an extra property `focalPoint` on `Image` objects. The property is an array of two floating points between -1.0 and 1.0, with 0,0 being the center of the image, the first value being x (-1.0 is the left edge, +1.0 is the right edge) and the second value being y (-1.0 is the bottom edge, +1.0 is the top edge). See [API Guidelines > Focal points]({{< relref "api/guidelines#focal-points" >}}) for more information.
```json
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"focalPoint": {
"@container": "@list",
"@id": "http://joinmastodon.org/ns#focalPoint"
}
}
],
"id": "https://example.com/@alice/hello-world",
"type": "Note",
"content": "A picture attached!",
"attachment": [
{
"type": "Image",
"mediaType": "image/png",
"url": "https://example.com/files/cats.png",
"focalPoint": [
-0.55,
0.43
]
}
]
}
```
{{< figure src="/assets/focal-points.jpg" caption="A demonstration of various focal points and their coordinates." >}}
The focal point of (-0.55, 0.43) in the example above corresponds to a point 55% to the left of center and 43% above center. This focal point should remain visible within the cropped thumbnail, if any cropping is done.
### Blurhash {#blurhash}
Mastodon generates colorful preview thumbnails for attachments. This is implemented using an extra property `blurhash` on `Image` objects. The property is a string generated by the [BlurHash algorithm](https://blurha.sh).
```json
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"blurhash": "http://joinmastodon.org/ns#blurhash"
}
],
"id": "https://example.com/@alice/hello-world",
"type": "Note",
"content": "A picture attached!",
"attachment": [
{
"type": "Image",
"mediaType": "image/png",
"url": "https://example.com/files/cats.png",
"blurhash": "UBL_:rOpGG-oBUNG,qRj2so|=eE1w^n4S5NH"
}
]
}
```
### Sensitive content {#sensitive}
Mastodon uses the `as:sensitive` extension property to mark certain posts as sensitive. When a post is marked as sensitive, any media attached to it will be hidden by default, and if a `summary` is present, the status `content` will be collapsed behind this summary. In Mastodon, this is known as a **content warning**.
## Other functionality
### Secure mode {#secure-mode}

View File

@ -7,6 +7,10 @@ menu:
parent: spec
---
{{< hint style="info" >}}
As of v4.0.0, HTML permalinks for statuses and profiles have been deprecated and removed from Mastodon. As a result, Microformats are currently not used within nor generated by Mastodon.
{{< /hint >}}
## What are microformats? {#intro}
[Microformats 2.0](https://microformats.io/) is a standard used to embed metadata directly within an HTML document. Rather than needing to use an API for read-only purposes, a web page can be parsed for certain CSS classes in order to extract information that you have already fetched just by viewing the page, rather than having to separately request that same information from an API. The use of microformats classes allows for semantic parsing of data within a given web page, and can be used to generate feeds, cards, or representations of that data.

View File

@ -11,31 +11,40 @@ menu:
The Mastodon API has many methods that require authentication from a client or authorization from a user. This is accomplished with OAuth 2.0, an authorization framework described in [RFC 6749](https://tools.ietf.org/html/rfc6749) that allows third-party applications to obtain limited access to an HTTP service on behalf of a resource owner, through the use of a standardized authorization flow that generates a client access token to be used with HTTP requests.
Mastodon supports the following OAuth 2 flows:
* **Authorization code flow**: For end-users
* **Password grant flow**: For bots and other single-user applications
* **Client credentials flow**: For applications that do not act on behalf of users
To obtain an OAuth token for a Mastodon website, make sure that you allow your users to specify the domain they want to connect to before login. Use that domain to [acquire a client id/secret]({{< relref "methods/apps#create" >}}) and then [proceed with normal OAuth 2]({{< relref "methods/oauth" >}}).
## OAuth 2 endpoints implemented {#implementation}
The following descriptions are taken from the [Doorkeeper documentation](https://github.com/doorkeeper-gem/doorkeeper/wiki/API-endpoint-descriptions-and-examples). Mastodon uses Doorkeeper to implement OAuth 2. For more information on how to use these endpoints, see the [API documentation for OAuth.]({{< relref "methods/oauth" >}})
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/config/initializers/doorkeeper.rb" caption="Doorkeeper config initializer" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/config/initializers/doorkeeper.rb" caption="Doorkeeper config initializer" >}}
### [GET /oauth/authorize]({{< relref "methods/oauth#authorize" >}})
### Authorization endpoint (RFC 6749 Section 3.1) {#authorization}
[GET /oauth/authorize]({{% relref "methods/oauth#authorize" %}})
Displays an authorization form to the user. If approved, it will create and return an authorization code, then redirect to the desired `redirect_uri`, or show the authorization code if `urn:ietf:wg:oauth:2.0:oob` was requested.
### [POST /oauth/token]({{< relref "methods/oauth#token" >}}) {#post-oauth-token}
### Token endpoint (RFC 6749 Section 3.2) {#token}
Obtain an access token. This corresponds to the token endpoint, section 3.2 of the OAuth 2 RFC.
[POST /oauth/token]({{% relref "methods/oauth#token" %}})
### [POST /oauth/revoke]({{< relref "methods/oauth#revoke" >}}) {#post-oauth-revoke}
Obtain an access token. Mastodon supports the following OAuth 2 flows:
Post here with client credentials to revoke an access token. This corresponds to the token endpoint, using the OAuth 2.0 Token Revocation RFC (RFC 7009).
Authorization code flow
: For end-users
Password grant flow
: For bots and other single-user applications
Client credentials flow
: For applications that do not act on behalf of users
### Token revocation endpoint (RFC 7009 Section 2) {#revoke}
[POST /oauth/revoke]({{% relref "methods/oauth#revoke" %}})
Post here with client credentials to revoke an access token.
## Common gotchas {#gotchas}

View File

@ -9,7 +9,7 @@ menu:
## HTTP Signatures {#http}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/app/lib/request.rb" caption="app/lib/request.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/lib/request.rb" caption="app/lib/request.rb" >}}
[HTTP Signatures](https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures) is a specification for signing HTTP messages by using a `Signature:` header with your HTTP request. Mastodon requires the use of HTTP Signatures in order to validate that any activity received was authored by the actor generating it. When secure mode is enabled, all GET requests require HTTP signatures as well.
@ -75,13 +75,13 @@ This request is functionally equivalent to saying that `https://my-example.com/a
#### Signing POST requests and the Digest header {#digest}
When making a POST request to Mastodon, you must calculate the RSA-SHA256 digest hash of your request's body and include this hash within the `Digest:` header. The `Digest:` header must also be included within the `headers` parameter of the `Signature:` header. For example:
When making a POST request to Mastodon, you must calculate the RSA-SHA256 digest hash of your request's body and include this hash (in base64 encoding) within the `Digest:` header. The `Digest:` header must also be included within the `headers` parameter of the `Signature:` header. For example:
```http
POST /users/username/inbox HTTP/1.1
HOST: mastodon.example
Date: 18 Dec 2019 10:08:46 GMT
Digest: e37e179c75071a291f90a5fd4f848da87b491f1282f7bb8509ef2115b81ee0f4
Digest: sha-256=hcK0GZB1BM4R0eenYrj9clYBuyXs/lemt5iWRYmIX0A=
Signature: keyId="https://my-example.com/actor#main-key",headers="(request-target) host date digest",signature="Y2FiYW...IxNGRiZDk4ZA=="
Content-Type: application/ld+json; profile="http://www.w3.org/ns/activitystreams"
@ -92,14 +92,14 @@ Content-Type: application/ld+json; profile="http://www.w3.org/ns/activitystreams
"object": {
"type": "Note",
"content": "Hello!"
}
},
"to": "https://mastodon.example/users/username"
}
```
### Verifying HTTP signatures {#http-verify}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/app/controllers/concerns/signature_verification.rb" caption="app/controllers/concerns/signature_verification.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/concerns/signature_verification.rb" caption="app/controllers/concerns/signature_verification.rb" >}}
Consider the following request:
@ -133,7 +133,7 @@ Mastodon verifies the signature using the following algorithm:
## Linked Data Signatures {#ld}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/app/lib/activitypub/linked_data_signature.rb" caption="app/lib/activitypub/linked_data_signature.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/lib/activitypub/linked_data_signature.rb" caption="app/lib/activitypub/linked_data_signature.rb" >}}
{{< hint style="warning" >}}
Mastodon's current implementation of LD Signatures is outdated due to a change in the JSON-LD `@context` between the drafting stage and finalization stage of the specification. Mastodon expects a `type` of `RsaSignature2017` while later drafts instead define `RsaSignature2018` via the namespace `https://w3id.org/security/v2`. Furthermore, the LD Signatures specification as a whole has been superseded by the [Verifiable Credential Data Integrity 1.0](https://w3c.github.io/vc-data-integrity/) specification, which is largely incompatible with the earlier LD Signature spec. For this reason, it is not advised to implement support for LD Signatures.

View File

@ -71,5 +71,39 @@ This way, we have translated `@Gargron@mastodon.social` to `https://mastodon.soc
```
{{< /code >}}
Note in the above example that `social.example` does not use the same URI structure as Mastodon. Thus, we cannot guess the actor `id` given only the username and domain. However, if `social.example` supports WebFinger, then we can get this `id` by requesting `https://social.example/.well-known/webfinger?resource=acct:username@social.example`and parsing the response for a link with the `application/activity+json` type.
Note in the above example that `social.example` does not use the same URI structure as Mastodon. Thus, we cannot guess the actor `id` given only the username and domain. However, if `social.example` supports WebFinger, then we can get this `id` by requesting `https://social.example/.well-known/webfinger?resource=acct:username@social.example`and parsing the response for a link with the `application/ld+json; profile="https://www.w3.org/ns/activitystreams"` or `application/activity+json` type. This link should also have the link relation `rel="self"`.
## Mastodon's requirements for WebFinger
When given an account in the form `username@domain` or `@username@domain`, Mastodon will do the following:
- Construct an `acct:` URI using that username and domain
- Make a WebFinger request for that `resource`
Using that WebFinger response, Mastodon will check the following:
- The `subject` is present
- The `links` array contains a link with `rel` of `self` and `type` of either `application/ld+json; profile="https://www.w3.org/ns/activitystreams"` or `application/activity+json`
- The `href` for this link resolves to an ActivityPub actor
Using that ActivityPub actor representation (which may be provided directly, without the initial WebFinger request), Mastodon will do the following:
- Take `preferredUsername` and the hostname of the actor's server
- Construct an `acct:` URI using that username and domain
- Make a Webfinger request for that `resource`
If the `subject` matches the `resource`, then the process stops here. Otherwise, if the `subject` contains a different canonical account URI, then Mastodon will perform an additional Webfinger request for that canonical account URI in order to ensure that this new `resource` links to the same ActivityPub actor with the same criteria being checked.
In other words, the following cases are valid:
- Asking `example.com` for the resource `acct:alice@example.com` yields a link to an actor on the domain `example.com` with a `preferredUsername` of `alice`, and the `subject` matches the requested resource `acct:alice@example.com`
- Asking `example.com` for the resource `acct:alice@example.com` yields a link to an actor on the domain `ap.example.com` with a `preferredUsername` of `alice`
- ...then, asking `ap.example.com` for the resource `acct:alice@ap.example.com` yields a `subject` of `acct:alice@example.com` and a link to the same actor
## See also
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/services/activitypub/fetch_remote_actor_service.rb" caption="app/services/activitypub/fetch_remote_actor_service.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/services/resolve_account_service.rb" caption="app/services/resolve_account_service.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/lib/webfinger.rb" caption="app/lib/webfinger.rb" >}}

View File

@ -9,13 +9,13 @@ menu:
## Generating invites {#invites}
{{< figure src="/assets/invites.jpg" caption="Invite people from your account&apos;s settings" >}}
{{< figure src="assets/invites.jpg" caption="Invite people from your account&apos;s settings" >}}
Invite links can be generated and shared with other people, and some servers require invites in order to register for an account. When generating an invite link, you can set the max uses to limit how many times a certain link is used, or how long it has been active. Invite links can be deactivated at any time.
## Follows and followers {#relationships}
{{< figure src="/assets/relationships.jpg" caption="Mutuals who have not moved their account, sorted by last activity" >}}
{{< figure src="assets/relationships.jpg" caption="Mutuals who have not moved their account, sorted by last activity" >}}
Within settings, you can find a relationship manager that lets you filter and sort through the profiles that you are connected to, based on different criteria:
@ -27,4 +27,4 @@ You can select certain users to unfollow, or to remove from your followers, by c
## Account settings {#account}
From the account settings, you can change your email address, set a new password, revoke active sessions or authorized apps, and enable two-factor authentication.
From the account settings, you can change your email address, set a new password, revoke active sessions or authorized apps, and enable two-factor authentication.

View File

@ -11,29 +11,28 @@ menu:
### Featured hashtags {#featured-tags}
{{< figure src="/assets/featured-tags.jpg" caption="A featured hashtag showing last usage date and total usage." >}}
{{< figure src="assets/featured-tags.jpg" caption="A featured hashtag showing last usage date and total usage." >}}
You can choose to feature certain hashtags that you use often. Go to Settings &gt; Profile &gt; Featured hashtags to manage which hashtags you are currently featuring. Once featured, a link to the hashtag will be shown on your profile, with the date of the last time it was used in a status, as well as the total number of statuses in which it was used.
### Featured profiles {#featured-profiles}
{{< figure src="/assets/featured-profiles.jpg" caption="Four randomly-selected featured profiles." >}}
{{< figure src="assets/featured-profiles.jpg" caption="Four randomly-selected featured profiles." >}}
You can choose to feature profiles of people that you are following. Go to that person's profile dropdown menu and click "Feature on profile". When you feature a profile, a link to their profile will appear on your profile, under a section titled "your choices". Up to 4 profiles will be shown at a time, and these profiles are selected randomly from your pool of featured profiles every time the page is loaded.
## Pinned posts {#pinned}
{{< figure src="/assets/pinned.jpg" caption="A pinned post by mastodon.social/@gargron" >}}
{{< figure src="assets/pinned.jpg" caption="A pinned post by mastodon.social/@gargron" >}}
You can choose to feature up to 5 of your own public posts at the top of your profile. Go to the status dropdown menu and click "Pin on profile". When you pin a post, it will appear at the top of your "posts" tab, before all other chronological status updates.
## Profile directory {#directory}
{{< figure src="/assets/directory.jpg" caption="Profile directory as seen from mastodon.social" >}}
{{< figure src="assets/directory.jpg" caption="Profile directory as seen from mastodon.social" >}}
The profile directory shows all accounts that have opted into being shown in the directory, and can be used to quickly find profiles that you may be interested in following.
The profile directory can be sorted either by recent activity (the most recently published status), or by new arrivals (the most recently created accounts). The directory can also be filtered to show only local accounts, or to show all known accounts that your website is aware of.
Profiles appear as cards that include a user's display name, address, account bio, and some brief stats such as how many posts they've published, how many followers they have, and the time of their last published status.

View File

@ -9,13 +9,12 @@ menu:
## Remote interactions on another Mastodon site {#interact}
{{< figure src="/assets/status-permalink.jpg" caption="An example of a post&apos;s public permalink on a Mastodon site." >}}
{{< figure src="assets/status-permalink.jpg" caption="An example of a post&apos;s public permalink on a Mastodon site." >}}
When you are browsing a remote site powered by Mastodon, clicking on any of the interaction buttons will load a dialog that will redirect you to your local site.
{{< figure src="/assets/external-reply.jpg" caption="A remote interaction dialog for replying to a toot." >}}
{{< figure src="assets/external-reply.jpg" caption="A remote interaction dialog for replying to a toot." >}}
## Signing into a client app {#apps}
You can use your Mastodon account to sign into any app that implements the Mastodon API. A list of such apps can be found at [https://joinmastodon.org/apps](https://joinmastodon.org/apps).

View File

@ -11,11 +11,11 @@ menu:
It is possible to filter statuses for specific keywords and phrases so that they can be hidden automatically.
{{< figure src="/assets/filter-list.jpg" caption="A sample of active filters for various keywords in different contexts." >}}
{{< figure src="assets/filter-list.jpg" caption="A sample of active filters for various keywords in different contexts." >}}
To create or manage your filters, go to Settings &gt; Filters. The "Add new filter" button will let you create a new filter, and existing filters can be edited or deleted. Your existing filters will be summarized in a table.
{{< figure src="/assets/filter-edit.jpg" caption="Filters can have an expiry date, specific contexts, server-side drop, and use word boundaries." >}}
{{< figure src="assets/filter-edit.jpg" caption="Filters can have an expiry date, specific contexts, server-side drop, and use word boundaries." >}}
Filters have the following settings:
@ -46,7 +46,7 @@ Filters normally apply to any status that contains the included characters, rega
## User-level actions {#blocking-and-muting}
{{< figure src="/assets/profile-dropdown.jpg" caption="The profile dropdown menu offers various actions." >}}
{{< figure src="assets/profile-dropdown.jpg" caption="The profile dropdown menu offers various actions." >}}
### Hiding boosts {#hide-boosts}
@ -54,7 +54,7 @@ If you hide boosts from someone, you wont see their boosts in your home feed.
### Muting {#mute}
{{< figure src="/assets/muted.jpg" caption="Sample of muted accounts." >}}
{{< figure src="assets/muted.jpg" caption="Sample of muted accounts." >}}
When muting, you have the option to mute notifications from them or not. Muting without muting notifications hides the user from your view:
@ -71,7 +71,7 @@ The user has no way of knowing they have been muted.
### Blocking {#block}
{{< figure src="/assets/blocked.jpg" caption="Sample of blocked accounts." >}}
{{< figure src="assets/blocked.jpg" caption="Sample of blocked accounts." >}}
Blocking hides a user from your view:
@ -92,7 +92,7 @@ If you and the blocked user are on the same server, the blocked user will not be
### Hiding an entire server {#block-domain}
![](/assets/block-domain.png)
{{< figure src="assets/block-domain.png" caption="Sample of blocking an entire domain." >}}
If you block an entire server:
@ -103,6 +103,6 @@ If you block an entire server:
## Reporting problematic content to moderators {#report}
{{< figure src="/assets/report-modal.jpg" caption="The report modal allows selecting example statuses, adding a note, and forwarding reports." >}}
{{< figure src="assets/report-modal.jpg" caption="The report modal allows selecting example statuses, adding a note, and forwarding reports." >}}
If you see a status or user that is violating the rules of your website, you can report that user to your site's moderators. Clicking the "report" option on the user dropdown or status dropdown will open the report modal. Here, you can (and should) add a note about why you are reporting this account. You can attach certain problematic statuses for additional context on why you are reporting the account, and if their conduct is violating the rules of the remote website, you can also choose to forward the report to their site's moderators.

View File

@ -9,7 +9,7 @@ menu:
## Exporting your information {#export}
{{< figure src="/assets/export.jpg" caption="The data export page in settings" >}}
{{< figure src="assets/export.jpg" caption="The data export page in settings" >}}
At any time you want, you can go to Settings &gt; Export and download a CSV file for your current followed accounts, your currently created lists, your currently blocked accounts, your currently muted accounts, and your currently blocked domains. Your following, blocking, muting, and domain-blocking lists can be imported at Settings &gt; Import, where they can either be merged or overwritten.
@ -21,25 +21,24 @@ From the bottom of Settings &gt; Account, you can find options related to accoun
### Profile redirect {#redirect}
{{< figure src="/assets/account-redirect.jpg" caption="Profile redirect form" >}}
{{< figure src="assets/account-redirect.jpg" caption="Profile redirect form" >}}
Redirecting your account disables posting from that account and displays a "profile moved" notice indicating your new account. Anyone viewing your profile can see this notice and will know to follow you at your new account. Following redirected accounts is not possible. The redirect can be canceled at any time.
### Profile move {#move}
{{< figure src="/assets/account-move.jpg" caption="Profile move form" >}}
{{< figure src="assets/account-move.jpg" caption="Profile move form" >}}
Moving your account is the same as redirecting your account, but it will also irreversibly force everyone to unfollow your current account and follow your new account, if their software supports the Move activity. Your posts will not be moved, due to technical limitations. There is also a 30 day cooldown period in which you cannot migrate again, so be very careful before using this option!
### Account aliases {#aliases}
{{< figure src="/assets/account-aliases.jpg" caption="Alias management screen" >}}
{{< figure src="assets/account-aliases.jpg" caption="Alias management screen" >}}
Profile moves can only be initiated when your two accounts have been aliased. Account aliases are currently not used for anything other than profile moves, where you will need to set your old account as an alias of your new account before initiating the move. Setting aliases is harmless and reversible on its own.
## Deleting your account {#delete}
{{< figure src="/assets/account-delete.jpg" caption="Account deletion form" >}}
{{< figure src="assets/account-delete.jpg" caption="Account deletion form" >}}
From the bottom of Settings &gt; Account, you can find the form to delete your account. Deleting your account is irreversible, and will cause both your profile and username to become forever unusable.

View File

@ -9,7 +9,7 @@ menu:
## Browsing content through public timelines {#timelines}
{{< figure src="/assets/timeline.jpg" caption="Posts within a public timeline" >}}
{{< figure src="assets/timeline.jpg" caption="Posts within a public timeline" >}}
To allow you to discover potentially interesting content, Mastodon provides a way to browse all public posts. Well, there is no global shared state between all servers, so there is no way to browse _all_ public posts. When you browse the **federated timeline**, you see all public posts that the server you are on knows about. There are various ways your server may discover posts, but the bulk of them will be from people that other users on your server follow.
@ -17,7 +17,7 @@ There is a way to filter the federated timeline to view only public posts create
## Interacting with people's posts {#actions}
{{< figure src="/assets/status.jpg" caption="An expanded view can be loaded by clicking a status in the timeline." >}}
{{< figure src="assets/status.jpg" caption="An expanded view can be loaded by clicking a status in the timeline." >}}
You can perform quick actions on a post directly from the timeline, or you can click on the post to load an expanded view that shows extra information, such as a full timestamp, interaction counts, and threaded replies, if any. The following actions can be performed on a post:
@ -29,7 +29,7 @@ You can perform quick actions on a post directly from the timeline, or you can c
## Notifications {#notifications}
{{< figure src="/assets/notifications.jpg" caption="Notifications column" >}}
{{< figure src="assets/notifications.jpg" caption="Notifications column" >}}
When other people interact with you or your posts, you will receive a notification depending on the type of the event. Your notifications column allows you to view all notifications in the same stream, or to filter for specific types of notifications:
@ -44,7 +44,7 @@ When unread notifications are present, a checkmark will appear in the column hea
## Following profiles {#follow}
![](/assets/profile.jpg)
{{< figure src="assets/profile.jpg" caption="Overview of a profile." >}}
As long as you encounter a person within your apps user interface, e.g. the web interface on your home server, or your mobile app, you can just click “follow” and you wont notice a difference if that person is on your server or not.
@ -54,21 +54,21 @@ If you are visiting a public page on another Mastodon site, see [Using Mastodon
## Enabling notifications {#bell}
![](/assets/bell.jpg)
{{< figure src="assets/bell.jpg" caption="An example of a profile that you are following." >}}
If you are following someone, you also have the option to receive a notification every time they post. To opt into this functionality, click the bell icon.
## Search {#search}
{{< figure src="/assets/search.jpg" caption="The search function can be accessed from the sidebar." >}}
{{< figure src="assets/search.jpg" caption="The search function can be accessed from the sidebar." >}}
Mastodon's basic search allows logged-in users to find posts containing a specific hashtag, or to load a user or status directly if they know the URL or address. Searching for a term will show profiles whose username or display name contains that term, as well as hashtags that match or contain that term.
{{< figure src="/assets/direct-url.jpg" caption="An example of a post being loaded directly by its URL." >}}
{{< figure src="assets/direct-url.jpg" caption="An example of a post being loaded directly by its URL." >}}
{{< figure src="/assets/search-accounts.jpg" caption="An example of accounts returned when searching for &quot;cats&quot;." >}}
{{< figure src="assets/search-accounts.jpg" caption="An example of accounts returned when searching for &quot;cats&quot;." >}}
{{< figure src="/assets/search-hashtags.jpg" caption="An example of hashtags returned when searching for &quot;cats&quot;." >}}
{{< figure src="assets/search-hashtags.jpg" caption="An example of hashtags returned when searching for &quot;cats&quot;." >}}
Admins may optionally install full-text search. Mastodons full-text search allows logged-in users to find results from their own posts, their favourites, their bookmarks and their mentions. It deliberately does not allow searching for arbitrary strings in the entire database, in order to reduce the risk of abuse by people searching for controversial terms to find people to dogpile.
@ -80,19 +80,19 @@ The following operators are supported:
## Direct conversations {#direct}
{{< figure src="/assets/dm-column.jpg" caption="A list of conversations containing direct messages." >}}
{{< figure src="assets/dm-column.jpg" caption="A list of conversations containing direct messages." >}}
In Mastodon, direct messages are just posts that have the "direct" visibility selected. Visibility can be selected per-post, which allows changing the privacy level later in a thread. The direct messages column currently shows a list of all conversations containing a direct post. Clicking on a conversation will load the associated thread.
{{< figure src="/assets/dm-thread.jpg" caption="A direct message in a thread." >}}
{{< figure src="assets/dm-thread.jpg" caption="A direct message in a thread." >}}
## List timelines {#lists}
Lists are subsets of your home timeline. You can create a list, give it a name, and add users that you follow to that list.
![](/assets/lists.jpg)
{{< figure src="assets/lists.jpg" caption="A list of lists" >}}
Opening a list will load that list's timeline. List timelines contain only posts by members of that list, as well as replies to you or to other members of the list. This can be changed to show replies to all people you follow, or to no one.
{{< figure src="/assets/list.jpg" caption="A list timeline" >}}
{{< figure src="assets/list.jpg" caption="A list timeline" >}}

View File

@ -7,7 +7,7 @@ menu:
parent: user
---
{{< figure src="/assets/compose-with-cw.jpg" caption="Compose form with CW enabled" >}}
{{< figure src="assets/compose-with-cw.jpg" caption="Compose form with CW enabled" >}}
## Text {#text}
@ -15,25 +15,25 @@ The main body of each status update can be composed using the text field. The de
### Links {#links}
{{< figure src="/assets/compose-links.jpg" caption="Links must start with http(s):// and are counted as 23 characters regardless of length." >}}
{{< figure src="assets/compose-links.jpg" caption="Links must start with http(s):// and are counted as 23 characters regardless of length." >}}
If you include links in your post, they must begin with `http://` or `https://`. All links are counted as 23 characters, no matter how long they actually are, so there is no need to use a link shortener to save characters. In fact, using a link shortener is actively discouraged.
### Mentions {#mentions}
{{< figure src="/assets/compose-mentions.jpg" caption="Suggested mentions for both local and remote users." >}}
{{< figure src="assets/compose-mentions.jpg" caption="Suggested mentions for both local and remote users." >}}
You can mention users by typing out their full address, e.g. `@alice@example.com`. Note that any usage of`@word` will be interpreted as mentioning the local user with the username `word`, if that user exists. Only the username part will count against your character limit -- the domain is not counted.
### Hashtags {#hashtags}
{{< figure src="/assets/compose-hashtags.jpg" caption="Hashtags are autosuggested by usage frequency." >}}
{{< figure src="assets/compose-hashtags.jpg" caption="Hashtags are autosuggested by usage frequency." >}}
You can use a `#hashtag` to make your post discoverable to anyone searching for that hashtag. Hashtags can contain alphanumeric characters and underscores, but cannot contain numbers only.
### Custom emoji {#emoji}
{{< figure src="/assets/compose-custom-emoji.jpg" caption="An array of custom emoji are available in the selector." >}}
{{< figure src="assets/compose-custom-emoji.jpg" caption="An array of custom emoji are available in the selector." >}}
Each server offers a set of custom emoji you can use, like on Discord. You can use an emoji using its shortcode like `:thounking:`, or by clicking the emoji face in the compose box and browsing through the "Custom" category. You can also browse through and search for standard unicode emoji.
@ -43,7 +43,7 @@ You can attach either files or a poll to your status.
### Files {#media}
{{< figure src="/assets/compose-media-attachment.jpg" caption="Thumbnail for attached media, with options to delete, edit, or mark as sensitive" >}}
{{< figure src="assets/compose-media-attachment.jpg" caption="Thumbnail for attached media, with options to delete, edit, or mark as sensitive" >}}
Click the paper clip to attach a file to your post. You can attach the following:
@ -54,13 +54,13 @@ Click the paper clip to attach a file to your post. You can attach the following
#### Editing media {#edit}
{{< figure src="/assets/edit-media.jpg" caption="Edit media to add a media description or choose a focal point for the preview thumbnail." >}}
{{< figure src="assets/edit-media.jpg" caption="Edit media to add a media description or choose a focal point for the preview thumbnail." >}}
By clicking the "Edit" link on the attachment thumbnail, you can load a modal which will allow adding a media description or changing the focal point. Although optional, it is a good idea to add media descriptions that briefly describe what is in contained in the media. These descriptions will be shown when the media fails to load for any reason, or when accessed by screen readers and other assistive technology. Setting the focal point is also optional, but can make preview thumbnails looks better when they are not shown in a 16:9 aspect ratio.
### Polls {#polls}
{{< figure src="/assets/compose-polls.jpg" caption="A poll with 2 one-of choices, expiring in 1 day" >}}
{{< figure src="assets/compose-polls.jpg" caption="A poll with 2 one-of choices, expiring in 1 day" >}}
Click the bar graph icon to attach a poll to your post.
@ -77,7 +77,7 @@ Click the bar graph icon to attach a poll to your post.
| Followers-only | No | Logged in on the same site | In-app or logged in | Yes |
| Direct | No | Logged in and mentioned | In-app or logged in | No |
Posts can be published with one of four different privacy levels, as described below. You can [set a default privacy level for your posts](../preferences#posting), and you can change the privacy level for a draft post by selecting the "Change Post Privacy" icon beneath the text of the post.
Posts can be published with one of four different privacy levels, as described below. You can [set a default privacy level for your posts](../preferences#posting), and you can change the privacy level for a draft post by selecting the "Change Post Privacy" icon beneath the text of the post.
### Public {#public}
@ -126,9 +126,8 @@ Send your post only to mentioned users.
## Content warnings and sensitive content {#cw}
{{< figure src="/assets/status-cw.jpg" caption="A status with a CW that is marked as sensitive content." >}}
{{< figure src="assets/status-cw.jpg" caption="A status with a CW that is marked as sensitive content." >}}
One feature that Mastodon provides that you may not have seen on other social networks is the option to attach a content warning to your posts. When a content warning is included, the status content will be collapsed by default, and only the CW will be shown, similarly to an email subject line or a "read more" break. This can be used to add a summary or subject for your post, to collapse long posts, or to otherwise provide context or setup for the body of the post.
When media is attached, a checkbox appears to allow you to "mark media as sensitive". This hides the full media behind a blurred thumbnail by default. Adding a CW to a post automatically marks the media as sensitive as well.

View File

@ -13,13 +13,13 @@ menu:
Mastodon defaults to a dark theme, but a light or high-contrast theme can be selected.
{{< figure src="/assets/light-theme.jpg" caption="Mastodon light theme" >}}
{{< figure src="assets/light-theme.jpg" caption="Mastodon light theme" >}}
### Choose your layout {#layout}
Mastodon defaults to a simple, one-column layout with a compose box on the left and a column switcher on the right. You can choose to enable the advanced web interface, which allows you view and pin multiple columns at the same time.
{{< figure src="/assets/advanced-web-ui.jpg" caption="The advanced web interface" >}}
{{< figure src="assets/advanced-web-ui.jpg" caption="The advanced web interface" >}}
In either interface, updates will load automatically as new posts are available. You can enable Slow Mode to instead show a banner at the top of the column indicating the number of new items available, which will be loaded only when you click the banner.
@ -41,7 +41,7 @@ By default, any media marked as sensitive is hidden behind a click-through overl
Hidden and unloaded media uses a colorful gradient provided by the BlurHash algorithm, which uses the colors of the image but blurs the details. These gradients can be disabled.
{{< figure src="/assets/blurhash.jpg" caption="An example blurhash thumbnail" >}}
{{< figure src="assets/blurhash.jpg" caption="An example blurhash thumbnail" >}}
Posts with content warnings are collapsed by default, but you can choose to always expand the warnings so that the full post is displayed.
@ -71,7 +71,7 @@ If you opt out of search engine indexing, a `noindex` flag will be added to your
You can choose to hide your network, which will make your following and follower lists private to you only.
{{< figure src="/assets/hidden-network.jpg" caption="A profile that has opted to hide its network" >}}
{{< figure src="assets/hidden-network.jpg" caption="A profile that has opted to hide its network" >}}
If you want to see posts that are boosted multiple times be reinserted into your feed at the top, you can disable boost grouping in timelines.
@ -86,4 +86,3 @@ If you often post sensitive media, you can choose to always mark your media as s
### Filtering languages on public timelines {#languages}
You can choose to only show posts in certain detected languages while browsing the public timelines. However, note that language detection can be very imprecise, so you may still see some posts in a disabled language, or miss some posts from enabled languages.

View File

@ -9,7 +9,7 @@ menu:
## Your appearance {#appearance}
{{< figure src="/assets/profile-cards.jpg" caption="Profile cards showing display name, avatar, and header" >}}
{{< figure src="assets/profile-cards.jpg" caption="Profile cards showing display name, avatar, and header" >}}
You can change how your profile appears to others by navigating to Settings &gt; Profile &gt; Appearance.
@ -33,7 +33,8 @@ Your header is a banner image shown at the top of your profile, as well as in pr
You can set certain flags on your profile to let others know how you use Mastodon.
![](/assets/bot-flag.jpg)
{{< figure src="assets/bot-flag.jpg" caption="Overview of a profile with the Bot flag set." >}}
### Locked account {#locked}
@ -65,7 +66,7 @@ Its completely up to you what you put there. The content can contain mentions
### Link verification {#verification}
Document-based verification and blue ticks are not possible without a central authority. However, Mastodon can cross-reference the links you put on your profile to prove that you are the real owner of those links. In case one of those links is your personal homepage that is known and trusted, it can serve as the next-best-thing to identity verification.
Document-based verification and blue ticks are not possible without a central authority. However, Mastodon can cross-reference the links you put on your profile to prove that you are the real owner of those links. In case one of those links is your personal homepage that is known and trusted, it can serve as the next-best-thing to identity document verification.
{{< hint style="info" >}}
Because Mastodon can be self-hosted, there is no better way to verify your identity than to host Mastodon on your own domain, which people already trust.
@ -77,15 +78,27 @@ If you put an HTTPS link in your profile metadata, Mastodon checks if that link
<a href="https://social.example.com/@username" rel="me">Follow me on Mastodon!</a>
```
More precisely, Mastodon will validate the link under the following conditions:
- It is not within an `iframe` (note that some "block-based" CMS software may wrap block elements within iframes)
- Since 4.0: the hostname does not change after IDN normalization
- it starts with HTTPS
- the resolved page contains at least one `a` or `link` tag with a `rel="me"`
- the `href` attribute on one of those elements is equal to the URL for your Mastodon profile
It may also be embedded directly in the head of your web page:
Alternatively, validation will occur if the resolved page's *first* link has an `href` value that redirects to your Mastodon profile's URL (such as through a link shortener).
```html
<link href="https://social.example.com/@username" rel="me">
```
#### Validation criteria for verified links
Mastodon will validate the "verified link" profile field under the following conditions:
- The value of the profile field is **a link that MUST start with HTTPS**. Other values will not be processed. Other types of links are not processed. In particular, plain HTTP links are not processed because they are insecure and may be modified by an attacker in transit.
- Since 4.0: **the hostname must not change after IDN normalization**. This is to prevent homeograph attacks where some Unicode character is used that looks confusingly similar to some ASCII character in a mixed string. For example, `U+0061` (English lowercase "a") and `U+0430` (Cyrillic small letter "а") appear nearly identical, but they are completely different characters. This similarity in appearance could be used maliciously to mislead people.
Mastodon will then resolve the link and fetch the web page located there, looking for a qualified link that matches the criteria:
- The resolved page must contain at least one `a` or `link` tag with a `rel="me"` attribute.
- The `href` attribute on one of those elements must be equal to the URL for your Mastodon profile.
- If no links with `rel="me"` are found, Mastodon will look for the *first* link, and the `href` value must redirect to your Mastodon profile's URL. (This provides limited support for web pages that use link shorteners and do not use rel-me.)
**Any such link must not be within an `iframe`**. An `iframe` effectively means the link is no longer on the same web page, but rather it is on some external web page which is being embedded in the current one. (Note that some "block-based" CMS software may wrap block elements within iframes, which prevents verification for this reason.)
{{< hint style="info" >}}
Make sure to save your profile *after* adding the rel-me link to your web page! The verification process is triggered when you save your profile, and may take some time before completing. If you have added the rel-me link and verification is not working, then try deleting the link, saving, re-adding the link, and saving again.
{{< /hint >}}
{{< /hint >}}

View File

@ -50,6 +50,8 @@ There exist a number of **dedicated Mastodon hosting providers** that take care
{{< caption-link url="https://cloudplane.org" caption="Cloudplane" >}}
{{< caption-link url="https://ungleich.ch/u/products/mastodon-hosting/" caption="ungleich.ch" >}}
Managed hosting solutions are great for those who do not have experience or desire to install and maintain software. However, being in charge of all components on your own hardware gives greater control over scaling, performance and customization.
We provide a **DigitalOcean 1-Click Install Image** that you can put on a DigitalOcean droplet of your choosing which essentially gives you everything you would otherwise have after following our installation instructions through an interactive setup wizard.

View File

@ -22,7 +22,7 @@ menu:
Mastodonのウェブサイトは単独で運用できます。従来のウェブサイトとまるっきり同じように、人々は、Mastodonのウェブサイトの一つに登録してメッセージを投稿したり写真をアップロードしたりすることで互いにおしゃべりします。そして従来のウェブサイトとは*異なり*、Mastodonのウェブサイトは相互運用できるため、それぞれのMastodonの間でユーザーは相互に通信できます。つまり、あなたのGmailにあるアカウントからOutlookやFastmail、Protonmail、またはその他のメールプロバイダーにあるアカウントの誰かに、その宛先の電子メールアドレスを知ってさえいれば電子メールを送信できるように、**そういったアドレスを使ってあなたはどのウェブサイトにいるどんなユーザーに対してもメンションやメッセージを送ることができるのです**。
{{< figure src="/assets/image%20%289%29.png" caption="中央型(左)、連合型(中央)、分散型(右)" >}}
{{< figure src="assets/image%20%289%29.png" caption="中央型(左)、連合型(中央)、分散型(右)" >}}
## ActivityPubとは {#fediverse}

View File

@ -9,13 +9,13 @@ menu:
## 招待リンクの作成 {#invites}
{{< figure src="/assets/image%20%2862%29.png" caption="設定で、人を招待するリンクを作成できる" >}}
{{< figure src="assets/image%20%2862%29.png" caption="設定で、人を招待するリンクを作成できる" >}}
招待リンクを作成して他の人に配ることができます。一部のサーバーではアカウンを登録するために招待を必要とします。招待リンクを作成するときに、そのリンクの使用回数の最大値や有効期限を設定できます。招待リンクはいつでも無効にできます。
## フォローとフォロワー {#relationships}
{{< figure src="/assets/image%20%2849%29.png" caption="相互にフォローしているアカウントのうち、引っ越ししていな人を「最後の活動」で並び替えたところ" >}}
{{< figure src="assets/image%20%2849%29.png" caption="相互にフォローしているアカウントのうち、引っ越ししていな人を「最後の活動」で並び替えたところ" >}}
設定では、繋がりを管理できます。次に挙げるさまざまな基準に基づいて、あなたが繋がっているプロフィールをフィルターしたり並び替えて表示できます。
@ -35,7 +35,7 @@ menu:
### Keybaseを使ったID検証 {#keybase}
{{< figure src="/assets/image%20%2860%29.png" caption="プロフィールにおける本人証明" >}}
{{< figure src="assets/image%20%2860%29.png" caption="プロフィールにおける本人証明" >}}
はじめに、Keybaseに登録し、Keybaseアカウント上でGPG公開鍵を生成するかアップロードするかします。次に、「prove more identities他のIDを証明する」に進みます。そして、動ているあなたのサーバーを見つけてください。もし見つからない場合はKeybaseにその内容を問い合わせてください。Mastodonのドメインを選択し、ユーザー名を入力します。Mastodonアカウントで認可し、証明メッセージを投稿することで、あなたのIDを証明できます。これを一度行うと本人証明が確立され、KeybaseがIDを証明したことをプロフィールに表示します。

View File

@ -11,25 +11,25 @@ menu:
### 注目のハッシュタグ {#featured-tags}
{{< figure src="/assets/image%20%2858%29.png" caption="注目のハッシュタグでは、最終更新日時と使用数も表示される" >}}
{{< figure src="assets/image%20%2858%29.png" caption="注目のハッシュタグでは、最終更新日時と使用数も表示される" >}}
あなたがよく使う特定のハッシュタグを目立たさせられます。いまの時点でどんなハッシュタグを目立たせたいかを管理するためには、設定から「プロフィール」-「注目のハッシュタグ」に移動してください。そうして目立たせると、そのハッシュタグへのリンクが、最後に使った更新日時とどの程度使われたかを示す使用数とともに、あなたのプロフィールに表示されるでしょう。
### おすすめプロフィール {#featured-profiles}
{{< figure src="/assets/image%20%2833%29.png" caption="ランダムに選択される、4つのおすすめプロフィール" >}}
{{< figure src="assets/image%20%2833%29.png" caption="ランダムに選択される、4つのおすすめプロフィール" >}}
フォローしているユーザーのプロフィールを目立たせられます。そのユーザーのプロフィールに移動して、ドロップダウンメニューにある「プロフィールで紹介する」をクリックします。プロフィールを目立たせると、自分のプロフィールにある「あなたのおすすめ」という見出しの下の領域に、そのプロフィールへのリンクが表示されるでしょう。4つまでのプロフィールが一度に表示されます。これらのプロフィールは、ページが読み込まれる度に、あなたがおすすめするプロフィールの中からランダムに選択されます。
## 固定された投稿 {#pinned}
{{< figure src="/assets/image%20%2837%29.png" caption="mastodon.social/@gargronにおける固定されたトゥート" >}}
{{< figure src="assets/image%20%2837%29.png" caption="mastodon.social/@gargronにおける固定されたトゥート" >}}
プロフィールの上部に、自分の公開投稿を5つまで目立たせられます。該当ステータスのドロップダウンメニューから「プロフィールに固定表示ピン留め」をクリックします。トゥートを固定すると、すべての時系列ステータスの更新の前、つまりトゥート欄の上部に、固定したトゥートが表示されます。
## ディレクトリ {#directory}
{{< figure src="/assets/image%20%2831%29.png" caption="mastodon.socialにおけるディレクトリ" >}}
{{< figure src="assets/image%20%2831%29.png" caption="mastodon.socialにおけるディレクトリ" >}}
ディレクトリ(=プロフィールディレクトリ)では、ディレクトリに表示することを選択したすべてのアカウントが表示されます。これを使うことで、フォローを検討できそうなプロフィールを簡単に見つけるのに役立ちます。

View File

@ -9,11 +9,11 @@ menu:
## 別のMastodonサイト上での遠隔操作 {#interact}
{{< figure src="/assets/image%20%2863%29.png" caption="Mastodonサイトにおける公開投稿のパーマリンクの例" >}}
{{< figure src="assets/image%20%2863%29.png" caption="Mastodonサイトにおける公開投稿のパーマリンクの例" >}}
Mastodonが動いている別のサイトを閲覧しているときに操作ボタンをクリックすると、あなたの所属するサイトにリダイレクトするダイアログが読み込まれます。
{{< figure src="/assets/image%20%288%29.png" caption="トゥートに返信するための遠隔操作のダイアログ" >}}
{{< figure src="assets/image%20%288%29.png" caption="トゥートに返信するための遠隔操作のダイアログ" >}}
## クライアントアプリでのログイン {#apps}

View File

@ -11,11 +11,11 @@ menu:
特定のキーワードやフレーズがあるステータスをフィルターすることが可能です。フィルターすることで、それらは自動的に見えなくなります。
{{< figure src="/assets/image%20%2848%29.png" caption="異なる場所で、さまざまなキーワードをフィルターしている例" >}}
{{< figure src="assets/image%20%2848%29.png" caption="異なる場所で、さまざまなキーワードをフィルターしている例" >}}
フィルターを作成または管理するには、設定から「フィルター」を選択します。「新規フィルターを追加」ボタンを押して新しいフィルターを作成できますし、すでに登録しているフィルターを編集したり削除できたりします。登録済みのフィルターは表にまとめられます。
{{< figure src="/assets/image%20%2814%29.png" caption="フィルターは、有効期限、除外対象、サーバーからの配信削除、および指定した単語全体での一致を指定できる" >}}
{{< figure src="assets/image%20%2814%29.png" caption="フィルターは、有効期限、除外対象、サーバーからの配信削除、および指定した単語全体での一致を指定できる" >}}
フィルターには次の設定があります。
@ -46,7 +46,7 @@ menu:
## ユーザーレベルで実行できること {#blocking-and-muting}
{{< figure src="/assets/image%20%2824%29.png" caption="ユーザープロフィールにあるドロップダウンメニューでは、さまざまなことを設定できる" >}}
{{< figure src="assets/image%20%2824%29.png" caption="ユーザープロフィールにあるドロップダウンメニューでは、さまざまなことを設定できる" >}}
### ブーストを非表示 {#hide-boosts}
@ -54,7 +54,7 @@ menu:
### ミュート {#mute}
{{< figure src="/assets/image%20%2852%29.png" caption="ミュートされたアカウントの例" >}}
{{< figure src="assets/image%20%2852%29.png" caption="ミュートされたアカウントの例" >}}
ミュートするときは、通知をミュートするかどうかを選択できます。通知をミュートしないミュートは、次の場面でそのユーザーを隠します。
@ -69,7 +69,7 @@ menu:
### ブロック {#block}
{{< figure src="/assets/image%20%2836%29.png" caption="ブロックされたアカウントの例" >}}
{{< figure src="assets/image%20%2836%29.png" caption="ブロックされたアカウントの例" >}}
ブロックは、次の場面でユーザーを隠します。
@ -90,7 +90,7 @@ menu:
### サーバー全体をブロック {#hide-domain}
![](/assets/image%20%2861%29.png)
![]({{ relUrl "/assets/image%20%2861%29.png" }})
サーバー全体をブロックする場合:
@ -101,6 +101,6 @@ menu:
## 問題のあるコンテンツをモデレーターに通報する {#report}
{{< figure src="/assets/image%20%283%29.png" caption="通報のモーダル画面では、具体的なステータスの選択、コメントの追加、レポートの転送ができる" >}}
{{< figure src="assets/image%20%283%29.png" caption="通報のモーダル画面では、具体的なステータスの選択、コメントの追加、レポートの転送ができる" >}}
あなたのウェブサイトのルールに違反しているステータスまたはユーザーを見つけた場合、あなたのサイトのモデレーターにそのユーザーを通報できます。ユーザープロフィールのドロップダウンメニューまたはステータのスドロップダウンメニューから「通報」の選択肢をクリックすると、通報のモーダル画面が開きます。ここでは、このアカウントを通報する理由についてのコメントを追加できます(追加するべきです)。アカウントを通報する理由について追加の文脈を示すために、はっきりと問題のあるステータスを指定できます。また、その行為がリモートのウェブサイトのルールに違反している場合、そのサイトのモデレーターに通報を転送することもできます。

View File

@ -9,7 +9,7 @@ menu:
## 自分の情報のエクスポート {#export}
{{< figure src="/assets/image%20%2835%29.png" caption="設定における「データのエクスポート」ページ" >}}
{{< figure src="assets/image%20%2835%29.png" caption="設定における「データのエクスポート」ページ" >}}
設定から「データのエクスポート」に移動して、現在フォローしているアカウント、現在作成しているリスト、現在ブロックしているアカウント、現在ミュートしているアカウント、および現在ブロックしているドメインを、CSVファイルとしていつでもダウンロードできます。フォロー、ブロック、ミュート、ドメインブロックの一覧は、設定から「データのインポート」で追加できます。この追加は、結合または上書きのいずれかで実行できます。
@ -21,24 +21,24 @@ menu:
### プロフィールのリダイレクト {#redirect}
{{< figure src="/assets/image%20%2853%29.png" caption="プロフィールのリダイレクトのための設定欄" >}}
{{< figure src="assets/image%20%2853%29.png" caption="プロフィールのリダイレクトのための設定欄" >}}
アカウントをリダイレクトすると、そのアカウントからの投稿が無効になります。そのとき、新しいアカウントを示して「引っ越ししました」という案内を表示します。あなたのプロフィールを見ている誰もがこの案内を見ることができ、新しいアカウントであなたをフォローできることに気づくでしょう。リダイレクトを設定したアカウントはフォローできません。リダイレクトはいつでもキャンセルできます。
### プロフィールの引っ越し {#move}
{{< figure src="/assets/image%20%2847%29.png" caption="プロフィールを引っ越しするための設定欄" >}}
{{< figure src="assets/image%20%2847%29.png" caption="プロフィールを引っ越しするための設定欄" >}}
アカウントを引っ越しすることは、アカウントをリダイレクトすることと同じです。ただしソフトウェアがMoveアクティビティに対応している場合、現在のあなたのアカウントをフォローしている人は、そのフォローが解除され、新しいアカウントをフォローし直すことを不可逆的に実行します。技術的な制限のためトゥートは引っ越しされません。また、再度引っ越しようとしてもできない、とても重いクールダウン期間があるため、この引っ越し機能を使う前に十分に注意してください。
### アカウントエイリアス {#aliases}
{{< figure src="/assets/image%20%2840%29.png" caption="エイリアス管理画面" >}}
{{< figure src="assets/image%20%2840%29.png" caption="エイリアス管理画面" >}}
プロフィールの引っ越しは、2つのアカウントがエイリアスを設定している場合のみに実行できます。現在、アカウントエイリアスはプロフィールの引っ越し以外に使われません。引っ越しを始める前に、新しいアカウントのエイリアスとして古いアカウントを設定する必要があります。エイリアスの設定は特に何かを起こすことはなく、そのエイリアス自体を元に戻せます。
## アカウントの削除 {#delete}
{{< figure src="/assets/image%20%2816%29.png" caption="アカウント削除の設定欄。" >}}
{{< figure src="assets/image%20%2816%29.png" caption="アカウント削除の設定欄。" >}}
設定の「アカウント」の下部に、アカウントを削除するための設定欄を見つけられます。アカウントを削除すると元に戻せず、プロフィールとユーザー名の両方が永久に使えなくなります。

View File

@ -9,7 +9,7 @@ menu:
## 公開タイムラインに流れるコン​​テンツの閲覧 {#timelines}
{{< figure src="/assets/image%20%2830%29.png" caption="公開タイムラインを流れる投稿" >}}
{{< figure src="assets/image%20%2830%29.png" caption="公開タイムラインを流れる投稿" >}}
興味のありそうなコンテンツを発見できるように、Mastodonはすべての公開投稿を見る手段を提供しています。とはいっても、全部のサーバー間で包括的にステータスが共有されているわけではないため、*すべての*公開投稿を見る方法はありません。**連合タイムライン**を閲覧すると、あなたのいるサーバーが認識しているすべての公開投稿を表示できます。サーバーが投稿を認識する方法はさまざまですが、その大部分は、同じサーバー上にいる他のユーザーがフォローしている人々の投稿でしょう。
@ -17,7 +17,7 @@ menu:
## 投稿への関わり {#actions}
{{< figure src="/assets/image%20%2821%29.png" caption="タイムラインにおける各ステータスをクリックすることで、トゥートの詳細が表示される" >}}
{{< figure src="assets/image%20%2821%29.png" caption="タイムラインにおける各ステータスをクリックすることで、トゥートの詳細が表示される" >}}
タイムラインを流れている投稿に対して直接クイックアクションを実行できます。また投稿をクリックすることで、トゥートの詳細を表示できます。ここでは正確な投稿日時、ブーストやお気に入りの数、そしてもし返信が付いていれば連なって表示されます。投稿に対して次の操作を実行できます。
@ -29,7 +29,7 @@ menu:
## 通知 {#notifications}
{{< figure src="/assets/image%20%2850%29.png" caption="通知欄" >}}
{{< figure src="assets/image%20%2850%29.png" caption="通知欄" >}}
他の人々があなた自身やあなたの投稿に関わるとき、その関わり方の種類に応じて通知が届きます。通知欄では、そのアカウントに関わるすべての通知を表示したり、次のように特定の種類の通知をフィルターして表示できます。
@ -41,7 +41,7 @@ menu:
## プロフィールのフォロー {#follow}
![](/assets/image%20%2811%29.png)
![]({{ relUrl "/assets/image%20%2811%29.png" }})
あなたがいるサーバーのウェブインターフェース、またはモバイルアプリなど、そのアプリのユーザーインターフェース内で人に出会いさえすれば「フォロー」ボタンをクリックするだけです。その人があなたのサーバー上にいるかいないかについての違いには気づかないでしょう。
@ -51,15 +51,15 @@ menu:
## 検索 {#search}
{{< figure src="/assets/image%20%2819%29.png" caption="検索機能はサイドバーから使える" >}}
{{< figure src="assets/image%20%2819%29.png" caption="検索機能はサイドバーから使える" >}}
Mastodonにおける基本的な検索は、特定のハッシュタグを含むトゥートを見つけたり、URLやアドレスを知っている場合にユーザーやステータスを直接読み込んだりすることを、ログインしたユーザーに可能にさせます。ある用語を検索することで、そのユーザー名または表示名にその用語が含まれているプロフィールと、その用語に一致または含んだハッシュタグを表示します。
{{< figure src="/assets/image%20%2839%29.png" caption="トゥートのURLから直接その投稿が読み込まれる例" >}}
{{< figure src="assets/image%20%2839%29.png" caption="トゥートのURLから直接その投稿が読み込まれる例" >}}
{{< figure src="/assets/image%20%2823%29.png" caption="「cats」を検索したときに表示されるアカウントの例" >}}
{{< figure src="assets/image%20%2823%29.png" caption="「cats」を検索したときに表示されるアカウントの例" >}}
{{< figure src="/assets/image%20%2827%29.png" caption="「cats」を検索したときに表示されるハッシュタグの例" >}}
{{< figure src="assets/image%20%2827%29.png" caption="「cats」を検索したときに表示されるハッシュタグの例" >}}
管理者は全文検索のインストールを選択することもできます。Mastodonの全文検索は、自分の投稿、お気に入り、ブックマーク、自分宛のメンションから検索結果を返すことをログインしたユーザーに可能にさせます。データベース全体から任意の文字列を検索することは意図的にできないようにしています。これは、論争の的になる用語を検索して言い争いしている人々を見つけ、誹謗するような機会を減らすためです。
@ -71,18 +71,18 @@ Mastodonにおける基本的な検索は、特定のハッシュタグを含む
## 直接かわされる会話のやり取り {#direct}
{{< figure src="/assets/image%20%2812%29.png" caption="ダイレクトメッセージにおける、会話のやり取りの一覧" >}}
{{< figure src="assets/image%20%2812%29.png" caption="ダイレクトメッセージにおける、会話のやり取りの一覧" >}}
Mastodonにおけるダイレクトメッセージは、「ダイレクト」の公開範囲が選択された単なるトゥートです。公開範囲は投稿ごとに選択できるため、会話のやり取りにおいて後からプライバシーレベルを変更できます。ダイレクトメッセージの欄では現在、ダイレクトの投稿を含んだすべての会話の一覧が表示されます。会話の一つをクリックすると、関連するやり取りが読み込まれます。
{{< figure src="/assets/image%20%2857%29.png" caption="あるダイレクトメッセージ。会話のやり取りが表示される" >}}
{{< figure src="assets/image%20%2857%29.png" caption="あるダイレクトメッセージ。会話のやり取りが表示される" >}}
## リストタイムライン {#lists}
リストは、ホームタイムラインの部分集合です。リストを作って名前を付け、そのリストにフォローしているユーザーを追加できます。
![](/assets/image%20%2828%29.png)
![]({{ relUrl "/assets/image%20%2828%29.png" }})
特定のリストを開くと、そのリストのタイムラインが読み込まれます。リストタイムラインには、そのリストのメンバーによる投稿と、あなたまたはリストの他のメンバーへの返信のみが含まれます。
{{< figure src="/assets/image%20%285%29.png" caption="リストタイムライン" >}}
{{< figure src="assets/image%20%285%29.png" caption="リストタイムライン" >}}

View File

@ -7,7 +7,7 @@ menu:
parent: user
---
{{< figure src="/assets/image%20%2859%29.png" caption="CWコンテンツ警告の記入欄を伴った投稿欄" >}}
{{< figure src="assets/image%20%2859%29.png" caption="CWコンテンツ警告の記入欄を伴った投稿欄" >}}
## テキスト {#text}
@ -15,19 +15,19 @@ menu:
### リンク {#links}
{{< figure src="/assets/image%20%287%29.png" caption="リンクはhttp(s)://で始まる必要があり、長さに関係なく23文字として数えられる" >}}
{{< figure src="assets/image%20%287%29.png" caption="リンクはhttp(s)://で始まる必要があり、長さに関係なく23文字として数えられる" >}}
投稿にリンクを含めるなら、それは`http://`または`https://`で始まる必要があります。すべてのリンクは実際の長さに関係なく23文字として数えられるので、文字を失わないようにするためのリンク短縮サービスを使う必要はありません。実際、リンク短縮サービスを使うことは積極的に思い留まらせるでしょう。
### メンション {#mentions}
{{< figure src="/assets/image%20%2820%29.png" caption="メンションするとき、ローカルユーザーとリモートユーザーの両方が候補に挙がる" >}}
{{< figure src="assets/image%20%2820%29.png" caption="メンションするとき、ローカルユーザーとリモートユーザーの両方が候補に挙がる" >}}
ユーザーの完全なアドレス(たとえば`@alice@example.com`)を入力することで、メンションできます。注意点は、ユーザー名が`word`であるローカルユーザーが存在した場合、`@word`のみの使用でそのユーザーへのメンションとして解釈されることです。なお、ユーザー名の部分のみが文字数制限の文字数に数えられ、ドメインは数えられません。
### ハッシュタグ {#hashtags}
{{< figure src="/assets/image%20%2825%29.png" caption="ハッシュタグは、使用頻度をもとに自動的に提案される" >}}
{{< figure src="assets/image%20%2825%29.png" caption="ハッシュタグは、使用頻度をもとに自動的に提案される" >}}
`#hashtag` のようなハッシュタグを使えます。そのハッシュタグを検索する人は誰でも、あなたの投稿を見つけられるようになります。ハッシュタグには英数字とアンダースコアを含められますが、数字のみでは構成できません。
@ -35,7 +35,7 @@ menu:
### カスタム絵文字 {#emoji}
{{< figure src="/assets/image%20%2838%29.png" caption="この一画ではカスタム絵文字が並べられている" >}}
{{< figure src="assets/image%20%2838%29.png" caption="この一画ではカスタム絵文字が並べられている" >}}
それぞれのサーバーはDiscordのように、カスタム絵文字を一揃い提供していて、この絵文字を使うことができます。 `:thounking:` などのショートコードを書くか、または投稿欄にある顔の絵文字「絵文字を追加」をクリックして「カスタム」カテゴリから見つけることで、カスタム絵文字を使うことができます。「絵文字を追加」では、Unicodeで規定されている絵文字を見つけたり検索したりもできます。
@ -45,7 +45,7 @@ menu:
### ファイル {#media}
{{< figure src="/assets/image%20%2844%29.png" caption="メディアを添付する際のサムネイル。削除、編集、そして閲覧注意とする選択肢も表示される" >}}
{{< figure src="assets/image%20%2844%29.png" caption="メディアを添付する際のサムネイル。削除、編集、そして閲覧注意とする選択肢も表示される" >}}
投稿にファイルを添付するには、ペーパークリップのアイコンをクリックします。次のファイルを添付できます。
@ -56,13 +56,13 @@ menu:
#### メディアの編集 {#edit}
{{< figure src="/assets/image%20%2826%29.png" caption="「メディアを編集」では、メディアの説明文を加えたり、プレビューサムネイルの焦点を選択できる" >}}
{{< figure src="assets/image%20%2826%29.png" caption="「メディアを編集」では、メディアの説明文を加えたり、プレビューサムネイルの焦点を選択できる" >}}
添付サムネイルの「編集」リンクをクリックすることで、メディアに説明を追加したり、焦点を変更したりするためのモーダル画面を表示できます。必須ではありませんが、メディアの内容を簡潔に説明した文章を追加することは良い考えです。これらの説明文は、何らかの理由でメディアを表示できなかったとき、またはスクリーンリーダーやその他の支援技術によってアクセスしたときに表示されます。また、焦点の設定も選択できます。プレビューサムネイルのアスペクト比が169で表示されていないときに、そのサムネイルの見栄えをより良くできます。
### 投票 {#polls}
{{< figure src="/assets/image%20%2841%29.png" caption="2つの選択肢のどちらかを選び、期限が1日の投票" >}}
{{< figure src="assets/image%20%2841%29.png" caption="2つの選択肢のどちらかを選び、期限が1日の投票" >}}
棒グラフのアイコンをクリックすることで、投稿に投票を添付できます。
@ -128,7 +128,7 @@ menu:
## コンテンツ警告と閲覧注意 {#cw}
{{< figure src="/assets/image.png" caption="「閲覧注意」としてマークされていて、「コンテンツ警告」を伴っているステータス" >}}
{{< figure src="assets/image.png" caption="「閲覧注意」としてマークされていて、「コンテンツ警告」を伴っているステータス" >}}
Mastodon以外のソーシャルネットワークでは見たことのないと思われる機能の1つとして、投稿にコンテンツ警告CWContent Warningを付ける機能を持っています。コンテンツ警告が設定されているとき、ステータスのコンテンツは初期設定で折りたたまれ、「もっと見る」というラベルが付いたボタンのみが表示されます。これは、電子メールの件名や「続きを読む」の区切りと同じです。投稿の概要や件名を追加したり、長い投稿を折りたたむためだったり、そのほか投稿の本文に前後関係やネタを含んだりするときに使えます。

View File

@ -13,7 +13,7 @@ menu:
Mastodonのデフォルトはダークテーマですが、ライトまたはハイコントラストのテーマも選択できます。
{{< figure src="/assets/image%20%2834%29.png" caption="Mastodonのライトテーマ" >}}
{{< figure src="assets/image%20%2834%29.png" caption="Mastodonのライトテーマ" >}}
### レイアウトの選択 {#layout}
@ -21,7 +21,7 @@ Mastodonは初期設定で、単純なシングルカラム1つの縦列
上級者向けウェブインターフェース上級者向けUIを有効にすることも選択できます。これを有効にすると、複数のカラムを同時に固定して表示できます。
{{< figure src="/assets/image%20%2832%29.png" caption="上級者向けウェブインターフェース" >}}
{{< figure src="assets/image%20%2832%29.png" caption="上級者向けウェブインターフェース" >}}
どちらのインターフェースでも、新しい投稿がされると、その更新が自動的に読み込まれます。新着件数をカラムの一番上にバナー状のボタンとして表示する、手動更新モードスローモードSlow Modeを有効にすることもできます。このときは、そのバナーをクリックしたときのみ読み込まれるでしょう。
@ -43,7 +43,7 @@ Mastodonは初期設定で、単純なシングルカラム1つの縦列
隠されたメディアや読み込むことができなかったメディアに、BlurHashアルゴリズムによって処理された色付きの階調を使います。画像の色を使っていますが、詳細をぼかすわけです。この階調を使うことを無効にもできます。
{{< figure src="/assets/image%20%286%29.png" caption="ぼかしたサムネイルの例" >}}
{{< figure src="assets/image%20%286%29.png" caption="ぼかしたサムネイルの例" >}}
コンテンツ警告を伴う投稿は初期設定で折りたたまれますが、その警告を常に展開して完全な投稿を表示することも選択できます。
@ -73,7 +73,7 @@ Mastodonは初期設定で、単純なシングルカラム1つの縦列
繋がり(=あなたのネットワーク)を隠すと、フォローリストとフォロワーリストが非公開になります。
{{< figure src="/assets/image%20%284%29.png" caption="繋がりを非表示にすることを選択したプロフィール" >}}
{{< figure src="assets/image%20%284%29.png" caption="繋がりを非表示にすることを選択したプロフィール" >}}
複数回ブーストされた投稿をフィードの上部に再度表示したい場合は、タイムラインにおける「ブーストをまとめる」を無効にすることで可能になります。

View File

@ -9,7 +9,7 @@ menu:
## あなたの外観 {#appearance}
{{< figure src="/assets/image%20%2829%29.png" caption="プロフィールカードでは表示名、アイコン、ヘッダーが表示される" >}}
{{< figure src="assets/image%20%2829%29.png" caption="プロフィールカードでは表示名、アイコン、ヘッダーが表示される" >}}
設定の「プロフィール」を選択して「外観」に移動し、あなたのプロフィールが他の人にどのように見られるかを変更できます。
@ -33,7 +33,7 @@ menu:
プロフィールに関するフラグを設定することで、どのようにマストドンを使っているかを、他の人に知らせることができます。
![](/assets/image%20%281%29.png)
![]({{ relUrl "/assets/image%20%281%29.png" }})
### 承認制アカウント {#locked}

View File

@ -22,7 +22,7 @@ Tak jak blogowaniem nazwiemy publikowanie aktualności na stronie, **mikroblogow
Serwer Mastodona może funkcjonować samodzielnie. Tak jak na tradycyjnej stronie, ludzie mogą się zarejestrować, publikować tam wiadomości i rozmawiać z innymi. W przeciwieństwie do tradycyjnej strony, serwery Mastodona wzajemnie komunikują się ze sobą, pozwalając swoim użytkownikom na wzajemną komunikację tak, jak mając konto na Gmailu, możesz napisać mail do kogoś na Outlooku, Fastmail, Protonmail czy serwerze dowolnego dostawcy, tak długo, jak znasz jego e-mail, **możesz wspomnieć lub napisać wiadomość do użytkownika dowolnego serwera, jeśli znasz jego adres**.
{{< figure src="/assets/network-models.jpg" caption="Od lewej do prawej: Scentralizowana, Sfederowana, Dystrybuowana" >}}
{{< figure src="assets/network-models.jpg" caption="Od lewej do prawej: Scentralizowana, Sfederowana, Dystrybuowana" >}}
@ -104,6 +104,3 @@ Naucz się tworzyć aplikacje dla Mastodona:
Naucz się o back-endzie Mastodona i dowiedz się jak wnieść swój wkład:
{{< page-ref page="dev/overview" >}}

View File

@ -9,13 +9,13 @@ menu:
## Tworzenie zaproszeń {#invites}
{{< figure src="/assets/invites.jpg" caption="Zaproś ludzi z ustawień swojego konta" >}}
{{< figure src="assets/invites.jpg" caption="Zaproś ludzi z ustawień swojego konta" >}}
Zaproszenia mogą być generowane, aby udostępniać je innym osobom, a niektóre serwery mogą wymagać zaproszenia do założenia konta. Przy generowaniu odnośnika zapraszającego, możesz określić maksymalną liczbę użyć odnośnika lub jak długo będzie on aktywny. Odnośniki z zaproszeniami mogą być dezaktywowane w każdym momencie.
## Obserwacje i obserwujący {#relationships}
{{< figure src="/assets/relationships.jpg" caption="Wzajemni obserwujący, którzy nie przenieśli konta, sortowani według daty ostatniej aktywności" >}}
{{< figure src="assets/relationships.jpg" caption="Wzajemni obserwujący, którzy nie przenieśli konta, sortowani według daty ostatniej aktywności" >}}
W ustawieniach możesz znaleźć stronę zarządzania relacjami, pozwalającą na filtrowanie i sortowanie profili, z którymi jesteś połączony(-a), według różnych kryteriów:
@ -35,11 +35,10 @@ Z ustawień konta możesz zmienić swój adres e-mail, ustawić nowe hasło, uni
### Weryfikacja tożsamości przez Keybase {#keybase}
{{< figure src="/assets/keybase.jpg" caption="Dowód tożsamości na profilu" >}}
{{< figure src="assets/keybase.jpg" caption="Dowód tożsamości na profilu" >}}
Na początek, zarejestruj się na Keybase i wygeneruj lub prześlij publiczny klucz GPG na swoje konto Keybase. Następnie, przejdź do „prove more identities”. Odnajdź swój serwer, jeśli jest dostępny, a jeśli nie, skontaktuj się z Keybase aby uzyskać pomoc. Wybierz swoją domenę Mastodona i wprowadź nazwę użytkownika. Możesz udowodnić swoją tożsamość, autoryzując swoje konto na Mastodonie i publikując wiadomość z dowodem. Gdy to zrobisz, zostanie utworzony dowód tożsamości, a Twój profil będzie pokazywał Keybase jako udowodnioną tożsamość.
{{< hint style="danger" >}}
**Weryfikacja Keybase jest nieodwracalna.** Keybase używa niemodyfikowalnego łańcucha podpisów dla dowodów tożsamości, więc po zweryfikowaniu tożsamości na Keybase, nie możesz jej usunąć. Możesz tylko unieważnić dowód, podpisując wiadomość unieważniającą używajac powiązanego klucza prywatnego.
{{< /hint >}}

View File

@ -11,29 +11,28 @@ menu:
### Wyróżnione hashtagi {#featured-tags}
{{< figure src="/assets/featured-tags.jpg" caption="Wyróżniony hashtag wraz z datą ostatniego użycia i całkowitym użyciem." >}}
{{< figure src="assets/featured-tags.jpg" caption="Wyróżniony hashtag wraz z datą ostatniego użycia i całkowitym użyciem." >}}
Możesz wyróżnić hashtagi, których używasz najczęściej. Przejdź do Preferencje &gt; Profil &gt; Wyróżnione hashtagi, aby wybrać, które hashtagi obecnie wyróżniasz. Po wybraniu odnośnik do tego hashtagu wraz z datą ostatniego użycia przez Ciebie oraz łączną liczbą jego wystąpień pojawi się na Twoim profilu.
### Wyróżnione profile {#featured-profiles}
{{< figure src="/assets/featured-profiles.jpg" caption="Cztery losowo wybrane wyróżnione profile." >}}
{{< figure src="assets/featured-profiles.jpg" caption="Cztery losowo wybrane wyróżnione profile." >}}
Możesz wyróżnić profile osób, które obserwujesz. Wybierz menu opcji na profilu tej osoby i naciśnij „Polecaj na profilu”. Kiedy wyróżnisz jakiś profil, odnośnik do tego profilu pojawi się na Twoim profilu, w sekcji nazwanej „Polecani przez…”. Jednocześnie może tam pojawiać się do czterech profilów, które są wybierane losowo spośród wyróżnionych profilów za każdym razem, gdy strona jest ładowana.
## Przypięte wpisy {#pinned}
{{< figure src="/assets/pinned.jpg" caption="Wpis przypięty przez mastodon.social/@gargron" >}}
{{< figure src="assets/pinned.jpg" caption="Wpis przypięty przez mastodon.social/@gargron" >}}
Możesz wybrać maksymalnie 5 spośród swoich publicznych wpisów do wyróżnienia na górze profilu. Przejdź w okno opcji wpisu i wybierz „Przypnij do profilu”. Gdy przypniesz wpis, pojawi się na górze Twojej zakładki „wpisy”, przed pozostałymi wpisami, występującymi w kolejności chronologicznej.
## Katalog profilów {#directory}
{{< figure src="/assets/directory.jpg" caption="Katalog profilów na mastodon.social" >}}
{{< figure src="assets/directory.jpg" caption="Katalog profilów na mastodon.social" >}}
Katalog profilów pokazuje wszystkie konta, które zgodziły się być pokazywane w katalogu i może służyć szybkiemu wyszukiwaniu profilów, którymi możesz być zainteresowany(-a).
Katalog profilów może być posortowany według ostatniej aktywności (ostatnio opublikowane wpisy) lub od najnowszych użytkowników (ostatnio założone konto). Katalog może wyświetlać tylko lokalne konta lub wszystkie znane przez serwer.
Profile są przedstawiane jako karty zawierające nazwę wyświetlaną użytkownika, adres, biogram i kilka podstawowych statystyk jak liczba opublikowanych wpisów, liczba obserwujących i kiedy opublikowali ostatni wpis.

View File

@ -9,13 +9,12 @@ menu:
## Zdalne interakcje z innym serwerem Mastodona {#interact}
{{< figure src="/assets/status-permalink.jpg" caption="Przykład odnośnika bezpośredniego do wpisu na serwerze Mastodona" >}}
{{< figure src="assets/status-permalink.jpg" caption="Przykład odnośnika bezpośredniego do wpisu na serwerze Mastodona" >}}
Kiedy odwiedzasz zdalny serwer oparty na Mastodonie, kliknięcie dowolnego z przycisków interakcji przeniesie Cię do okna dialogowego, które przekieruje Cię na Twój lokalny serwer.
{{< figure src="/assets/external-reply.jpg" caption="Ekran zdalnej interakcji przy odpowiadaniu na wpis" >}}
{{< figure src="assets/external-reply.jpg" caption="Ekran zdalnej interakcji przy odpowiadaniu na wpis" >}}
## Logowanie się do aplikacji klienckiej {#apps}
Możesz użyć swojego konta na Mastodonie, aby zalogować się w dowolnej aplikacji obsługującej API Mastodona. Listę takich aplikacji znajdziesz na [https://joinmastodon.org/apps](https://joinmastodon.org/apps).

View File

@ -11,11 +11,11 @@ menu:
Możliwe jest filtrowanie wpisów według określonych słów kluczowych lub fraz, aby były automatycznie ukrywane.
{{< figure src="/assets/filter-list.jpg" caption="Przykład aktywnych filtrów dla różnych słów kluczowych w różnych kontekstach." >}}
{{< figure src="assets/filter-list.jpg" caption="Przykład aktywnych filtrów dla różnych słów kluczowych w różnych kontekstach." >}}
Aby utworzyć i zarządzać filtrami, odwiedź Preferencje &gt; Filtry. Przycisk „Dodaj nowy filtr” pozwoli na utworzenie nowego filtru, a istniejące filtry mogą zostać edytowane lub usunięte. Istniejące filtry są podsumowane w tabeli.
{{< figure src="/assets/filter-edit.jpg" caption="Filtry mogą mieć datę wyczerpania, określone konteksty, usuwanie po stronie serwera lub używać granic słów." >}}
{{< figure src="assets/filter-edit.jpg" caption="Filtry mogą mieć datę wyczerpania, określone konteksty, usuwanie po stronie serwera lub używać granic słów." >}}
Filtry mają następujące opcje:
@ -45,7 +45,7 @@ Filtry zwykle są stosowane we wpisach zawierających wskazane znaki, niezależn
## Działania po stronie użytkownika {#blocking-and-muting}
{{< figure src="/assets/profile-dropdown.jpg" caption="Menu wyboru profilu oferuje różnorodne działania." >}}
{{< figure src="assets/profile-dropdown.jpg" caption="Menu wyboru profilu oferuje różnorodne działania." >}}
### Ukrywanie udostępnień {#hide-boosts}
@ -53,7 +53,7 @@ Jeżeli ukryjesz czyjeś udostępnienia, nie zobaczysz ich udostępnień na stro
### Wyciszanie {#mute}
{{< figure src="/assets/muted.jpg" caption="Przykład wyciszonych kont." >}}
{{< figure src="assets/muted.jpg" caption="Przykład wyciszonych kont." >}}
Przy wyciszeniu możesz zadecydować czy wyciszysz powiadomienia od tej osoby. Wyciszenie bez wyciszania powiadomień sprawi, że:
@ -70,7 +70,7 @@ Użytkownik nie może się dowiedzieć, że został wyciszony.
### Blokowanie {#block}
{{< figure src="/assets/blocked.jpg" caption="Przykład zablokowanych kont." >}}
{{< figure src="assets/blocked.jpg" caption="Przykład zablokowanych kont." >}}
Blokowanie ukrywa użytkownika z Twojego widoku:
@ -91,7 +91,7 @@ Jeżeli jesteś na tym samym serwerze, na którym jest zablokowana osoba, ta oso
### Ukrywanie całego serwera {#block-domain}
![](/assets/block-domain.png)
![]({{ relUrl "/assets/block-domain.png" }})
Jeżeli zablokujesz cały serwer:
@ -102,7 +102,6 @@ Jeżeli zablokujesz cały serwer:
## Zgłaszanie nieodpowiedniej treści moderatorom {#report}
{{< figure src="/assets/report-modal.jpg" caption="Okno zgłaszania pozwalające na wybór przykładowych wpisów, dodanie notatki czy przekierowanie zgłoszeń." >}}
{{< figure src="assets/report-modal.jpg" caption="Okno zgłaszania pozwalające na wybór przykładowych wpisów, dodanie notatki czy przekierowanie zgłoszeń." >}}
Jeżeli zobaczysz wpis lub użytkownika naruszającego zasady Twojego serwera, możesz zgłosić użytkownika moderatorom swojego serwera. Wybranie opcji „Zgłoś” otworzy okno zgłaszania. Tam możesz (jest to wskazane) dodać notatkę, w której napiszesz, dlaczego zgłaszasz to konto. Możesz załączyć nieodpowiednie wpisy dla dodatkowego kontekstu zgłoszenia, a jeżeli naruszają one zasady zdalnego serwera, możesz przekierować zgłoszenie również do jego moderatorów.

View File

@ -9,7 +9,7 @@ menu:
## Eksportuj informacje {#export}
{{< figure src="/assets/export.jpg" caption="Strona eksportu danych w ustawieniach" >}}
{{< figure src="assets/export.jpg" caption="Strona eksportu danych w ustawieniach" >}}
W każdym momencie możesz odwiedzić Preferencje &gt; Eksportowanie danych i pobrać plik CSV zawierający obecnie obserwowane konta, Twoje obecne listy, blokowanych lub wyciszonych użytkowników, zablokowane domeny. Twoja lista obserwowanych, blokowanych, wyciszonych lub zablokowanych domen może zostać zaimportowana w Preferencje &gt; Importowanie danych, gdzie mogą one zostać połączone lub nadpisane.
@ -21,25 +21,24 @@ W dolnej części Preferencje &gt; Profil możesz znaleźć opcje powiązane z p
### Przekierowanie profilu {#redirect}
{{< figure src="/assets/account-redirect.jpg" caption="Formularz przekierowania profilu" >}}
{{< figure src="assets/account-redirect.jpg" caption="Formularz przekierowania profilu" >}}
Przekierowanie konta wyłączy możliwość tworzenia z niego wpisów i wyświetli komunikat „przeniesiono profil”, wskazując na Twoje nowe konto. Każdy wyświetlający Twój nowy profil zobaczy tę informację i będzie wiedział, aby zaobserwować Twoje nowe konto. Obserwowanie przekierowanych kont nie jest możliwe. Przekierowanie może być anulowane w dowolnym momencie.
### Przenoszenie profilu {#move}
{{< figure src="/assets/account-move.jpg" caption="Formularz przenoszenia profilu" >}}
{{< figure src="assets/account-move.jpg" caption="Formularz przenoszenia profilu" >}}
Przenoszenie konta działa tak jak przekierowanie konta, ale również nieodwracalnie wymusi na obserwujących Twoje konto cofnięcie tej obserwacji i zaobserwowanie nowego konta, jeżeli oprogramowanie ich serwerów obsługuje aktywność Move. Twoje wpisy nie zostaną przeniesione z uwagi na ograniczenia techniczne. Istnieje też okres, w którego trakcie nie możesz ponownie migrować konta, więc uważaj, zanim użyjesz tej opcji!
### Aliasy konta {#aliases}
{{< figure src="/assets/account-aliases.jpg" caption="Ekran zarządzania aliasami" >}}
{{< figure src="assets/account-aliases.jpg" caption="Ekran zarządzania aliasami" >}}
Przeniesienie konta jest tylko możliwe, jeżeli powstał alias między dwoma kontami. Aliasy kont nie są obecnie używane w innych sytuacjach niż przeniesienie konta, gdzie musisz ustawić stare konto jako alias dla nowego konta przed rozpoczęciem przenoszenia. Samo ustawianie aliasu nie przynosi szkód i może być odwrócone.
## Usuwanie konta {#delete}
{{< figure src="/assets/account-delete.jpg" caption="Formularz usunięcia konta" >}}
{{< figure src="assets/account-delete.jpg" caption="Formularz usunięcia konta" >}}
Na dole Preferencje &gt; Profil możesz znaleźć formularz usunięcia konta. Usunięcie konta jest nieodwracalne i sprawi, że zarówno Twój profil, jak i nazwa użytkownika nie będą mogły zostać później użyte.

View File

@ -9,7 +9,7 @@ menu:
## Przeglądanie zawartości z publicznych osi czasu {#timelines}
{{< figure src="/assets/timeline.jpg" caption="Wpisy na publicznej osi czasu" >}}
{{< figure src="assets/timeline.jpg" caption="Wpisy na publicznej osi czasu" >}}
Aby pozwolić na poznanie potencjalnie interesującej treści, Mastodon pozwala na przeglądanie wszystkich publicznych wpisów. Ponieważ nie ma tu danych współdzielonych między wszystkimi serwerami, nie możesz przeglądać _wszystkich_ publicznych wpisów. Kiedy przeglądasz **oś czasu federacji**, zobaczysz wszystkie wpisy, o których wie serwer. Istnieje wiele sposobów, aby Twój serwer dowiadywał się o wpisach, ale ogromna część z nich to po prostu wpisy osób śledzonych przez użytkowników Twojego serwera.
@ -18,7 +18,7 @@ Istnieje sposób na filtrowane osi czasu federacji, aby wyświetlać tylko wpisy
## Interakcje z wpisami użytkowników {#actions}
{{< figure src="/assets/status.jpg" caption="Rozszerzony widok może zostać załadowany po kliknięciu wpisu w osi czasu." >}}
{{< figure src="assets/status.jpg" caption="Rozszerzony widok może zostać załadowany po kliknięciu wpisu w osi czasu." >}}
Możesz dokonywać szybkich działań na wpisach bezpośrednio z osi czasu lub kliknąć wpis, aby zobaczyć rozszerzony widok zawierający szczegółowe informacje o nim, takie jak pełen czas dodania, liczba interakcji czy odpowiedzi w wątku, jeśli takie istnieją. Na wpisie można dokonać następujących działań:
@ -30,7 +30,7 @@ Możesz dokonywać szybkich działań na wpisach bezpośrednio z osi czasu lub k
## Powiadomienia {#notifications}
{{< figure src="/assets/notifications.jpg" caption="Kolumna powiadomień" >}}
{{< figure src="assets/notifications.jpg" caption="Kolumna powiadomień" >}}
Jeżeli inne osoby wejdą w interakcje z jednym z Twoich wpisów, otrzymasz powiadomienie zależące od rodzaju działania. Twoja kolumna powiadomień pozwala wyświetlić wszystkie powiadomienia, lub przefiltrować określone rodzaje powiadomień:
@ -45,7 +45,7 @@ Kiedy są dostępne nieprzeczytanie powiadomienia, w kolumnie powiadomień pojaw
## Obserwowanie profilów {#follow}
![](/assets/profile.jpg)
![]({{ relUrl "/assets/profile.jpg" }})
Tak długo, jak trafiasz na czyiś profil z poziomu interfejsu swojej aplikacji, np. interfejsu serwera, z którego korzystasz lub aplikacji mobilnej, możesz po prostu nacisnąć „Śledź” i nie zauważysz różnicy wynikającej z tego, czy ta osoba jest na Twoim serwerze.
@ -55,22 +55,22 @@ Jeżeli przeglądasz publiczny profil z innego serwera Mastodona, przeczytaj [Ko
## Włączenie powiadomień {#bell}
![](/assets/bell.jpg)
![]({{ relUrl "/assets/bell.jpg" }})
Jeżeli kogoś obserwujesz, masz też możliwość otrzymywania powiadomień o każdym wpisie tej osoby. Aby włączyć tę opcję, naciśnij ikonę dzwonka.
If you are following someone, you also have the option to receive a notification every time they post. To opt into this functionality, click the bell icon.
## Wyszukiwanie {#search}
{{< figure src="/assets/search.jpg" caption="Możliwość wyszukiwania jest dostępna na pasku bocznym." >}}
{{< figure src="assets/search.jpg" caption="Możliwość wyszukiwania jest dostępna na pasku bocznym." >}}
Podstawowe wyszukiwanie na Mastodonie pozwala zalogowanym użytkownikom na znalezienie wpisów zawierających określony hashtag, lub załadowanie użytkownika bądź wpisu znając adres jego profilu lub adres URL. Wyszukiwanie słowa wyświetli profile, których nazwy użytkowników lub nazwy wyświetlane zawierają je, oraz hashtagi spełniające to kryterium.
{{< figure src="/assets/direct-url.jpg" caption="Przykład wpisu ładowanego bezpośrednio z adresu URL." >}}
{{< figure src="assets/direct-url.jpg" caption="Przykład wpisu ładowanego bezpośrednio z adresu URL." >}}
{{< figure src="/assets/search-accounts.jpg" caption="Przykład konta uzyskanego z wyszukiwania wyrazu „cats”." >}}
{{< figure src="assets/search-accounts.jpg" caption="Przykład konta uzyskanego z wyszukiwania wyrazu „cats”." >}}
{{< figure src="/assets/search-hashtags.jpg" caption="Przykład hashtagu uzyskanego z wyszukiwania „cats”." >}}
{{< figure src="assets/search-hashtags.jpg" caption="Przykład hashtagu uzyskanego z wyszukiwania „cats”." >}}
Administratorzy mogą dodatkowo zainstalować wyszukiwanie pełnego tekstu. Wyszukiwanie pełnego tekstu na Mastodonie pozwala zalogowanym użytkownikom na wyszukiwanie wyników z własnych wpisów, własnych polubień, zakładek i wspomnień. Celowo nie pozwala na wyszukiwanie dowolnych wierszy znaków w całej bazie danych, aby ograniczyć możliwość nadużywania ten funkcji przez osoby szukające kontrowersyjnych treści do dogpilingu.
@ -82,19 +82,18 @@ Obsługiwane są następujące operatory:
## Wiadomości bezpośrednie {#direct}
{{< figure src="/assets/dm-column.jpg" caption="Lista konwersacji zawierających wiadomości bezpośrednie." >}}
{{< figure src="assets/dm-column.jpg" caption="Lista konwersacji zawierających wiadomości bezpośrednie." >}}
Na Mastodonie, wiadomości bezpośrednie to po prostu wpisy o bezpośredniej widoczności. Widoczność może być wybrana dla poszczególnych wpisów, co pozwala na zmianę poziomu prywatności w późniejszym momencie w wątku. Kolumna wiadomości bezpośrednich wyświetla obecnie listę wszystkich konserwacji zawierających wiadomość bezpośrednią. Kliknięcie konwersacji załaduje powiązany wątek.
Na Mastodonie, wiadomości bezpośrednie to po prostu wpisy o bezpośredniej widoczności. Widoczność może być wybrana dla poszczególnych wpisów, co pozwala na zmianę poziomu prywatności w późniejszym momencie w wątku. Kolumna wiadomości bezpośrednich wyświetla obecnie listę wszystkich konserwacji zawierających wiadomość bezpośrednią. Kliknięcie konwersacji załaduje powiązany wątek.
{{< figure src="/assets/dm-thread.jpg" caption="Wiadomość bezpośrednia w wątku." >}}
{{< figure src="assets/dm-thread.jpg" caption="Wiadomość bezpośrednia w wątku." >}}
## Osie czasu list {#lists}
Listy są podzbiorami Twojej osi czasu. Możesz utworzyć listę, nadać jej nazwę i dodać do niej użytkowników, których obserwujesz.
![](/assets/lists.jpg)
![]({{ relUrl "/assets/lists.jpg" }})
Otwarcie listy załaduje jej oś czasu. Osie czasu listy zawierają wyłącznie wpisy członków tej listy, oraz odpowiedzi do Ciebie lub innych członków tej listy. Może to zostać zmienione, aby pokazywać odpowiedzi do osób które obserwujesz, lub nie pokazywać odpowiedzi.
{{< figure src="/assets/list.jpg" caption="Oś czasu listy" >}}
{{< figure src="assets/list.jpg" caption="Oś czasu listy" >}}

View File

@ -7,7 +7,7 @@ menu:
parent: user
---
{{< figure src="/assets/compose-with-cw.jpg" caption="Tworzenie wpisów z włączonym CW" >}}
{{< figure src="assets/compose-with-cw.jpg" caption="Tworzenie wpisów z włączonym CW" >}}
## Tekst {#text}
@ -15,25 +15,25 @@ Główna treść każdego wpisu może zostać utworzona z użyciem pola tekstowe
### Odnośniki {#links}
{{< figure src="/assets/compose-links.jpg" caption="Odnośniki muszą zaczynać się od http(s):// i są liczone jako 23 znaki niezależnie od ich długości." >}}
{{< figure src="assets/compose-links.jpg" caption="Odnośniki muszą zaczynać się od http(s):// i są liczone jako 23 znaki niezależnie od ich długości." >}}
Jeżeli uwzględnisz w swoim wpisie odnośniki, muszą one zaczynać się od `http://` lub `https://`. Wszystkie odnośniki są traktowane, jakby miały 23 znaki, niezależnie od ich rzeczywistej długości, więc nie musisz korzystać z usług skracania odnośników. Właściwie to odradzamy korzystanie z nich.
### Wspominanie {#mentions}
{{< figure src="/assets/compose-mentions.jpg" caption="Sugerowane wspomnienia dla lokalnych i zdalnych użytkowników." >}}
{{< figure src="assets/compose-mentions.jpg" caption="Sugerowane wspomnienia dla lokalnych i zdalnych użytkowników." >}}
Możesz wspominać użytkowników, wprowadzając ich pełny adres, np. `@alicja@example.com`. Zauważ, że każde użycie `@słowo` zostanie zainterpretowane jako wspomnienie lokalnego użytkownika o nazwie `słowo`, jeżeli taki użytkownik istnieje. Tylko część zawierająca nazwę użytkownika będzie liczona do limitu długości wpisu długość domeny nie jest liczona.
### Hashtagi {#hashtags}
{{< figure src="/assets/compose-hashtags.jpg" caption="Hashtagi są sugerowane według częstości używania ich." >}}
{{< figure src="assets/compose-hashtags.jpg" caption="Hashtagi są sugerowane według częstości używania ich." >}}
Możesz używać `#hashtag`ów, aby Twoje wpisy były widoczne dla wszystkich, którzy wyszukują tego hashtagu. Hashtagi mogą zawierać tylko litery, cyfry i podkreślniki, ale nie mogą składać się z samych cyfr.
### Niestandardowe emoji {#emoji}
{{< figure src="/assets/compose-custom-emoji.jpg" caption="Tablica niestandardowych emoji dostępnych na ekranie wyboru." >}}
{{< figure src="assets/compose-custom-emoji.jpg" caption="Tablica niestandardowych emoji dostępnych na ekranie wyboru." >}}
Każdy serwer może oferować zestaw niestandardowych emoji, z których możesz korzystać jak na Discordzie. Możesz korzystać z nich, wpisując ich shortcode, np. `:thounking:` lub klikając na ikonę emoji w ekranie tworzenia wpisu i wybierając w kategorii „Niestandardowe”. Możesz też przeglądać i wyszukiwać standardowe emoji unicode.
@ -43,7 +43,7 @@ Możesz załączyć do wpisu pliki lub ankietę.
### Pliki {#media}
{{< figure src="/assets/compose-media-attachment.jpg" caption="Miniaturka dla załączonych mediów, z możliwością usunięcia, edycji lub oznaczenia zawartości jako wrażliwą." >}}
{{< figure src="assets/compose-media-attachment.jpg" caption="Miniaturka dla załączonych mediów, z możliwością usunięcia, edycji lub oznaczenia zawartości jako wrażliwą." >}}
Naciśnij ikonę spinacza, aby dodać plik do wpisu. Możesz załączyć:
@ -54,13 +54,13 @@ Naciśnij ikonę spinacza, aby dodać plik do wpisu. Możesz załączyć:
#### Edytowanie mediów {#edit}
{{< figure src="/assets/edit-media.jpg" caption="Edytuj media, aby dodać opis zawartości lub wybrać punkt skupienia dla miniaturki podglądu." >}}
{{< figure src="assets/edit-media.jpg" caption="Edytuj media, aby dodać opis zawartości lub wybrać punkt skupienia dla miniaturki podglądu." >}}
Po kliknięciu „Edytuj” na miniaturze załącznika, możesz załadować okno, które pozwoli na dodanie opisu mediów lub wybranie punktu skupienia. Choć jest to nieobowiązkowe, dobrze jest dodawać opis, który krótko opisze, co przedstawiane jest na mediach. Te opisy będą widoczne, gdy nie uda się załadować mediów z jakiegoś powodu, lub gdy ktoś korzysta z czytnika zawartości ekranu, lub innej technologii wspomagającej. Ustawienie punktu skupienia jest również nieobowiązkowe, ale sprawi, że miniaturka wygląda lepiej, jeżeli zdjęcie nie jest wyświetlane w proporcji 16:9.
### Ankiety {#polls}
{{< figure src="/assets/compose-polls.jpg" caption="Ankieta z dwoma opcjami, wygasająca po jednym dniu" >}}
{{< figure src="assets/compose-polls.jpg" caption="Ankieta z dwoma opcjami, wygasająca po jednym dniu" >}}
Naciśnij na ikonę wykresu, aby załączyć ankietę do wpisu.
@ -126,9 +126,8 @@ Wyślij wpis wyłącznie wspomnianym użytkownikom.
## Ostrzeżenia o zawartości (CW) i zawartość wrażliwa {#cw}
{{< figure src="/assets/status-cw.jpg" caption="Wpis z CW oznaczony jako zawierający zawartość wrażliwą." >}}
{{< figure src="assets/status-cw.jpg" caption="Wpis z CW oznaczony jako zawierający zawartość wrażliwą." >}}
Jedną z funkcji obecnych na Mastodonie, których możesz nie zobaczyć na innych platformach społecznościowych, jest możliwość załączenia ostrzeżenia o zawartości do Twoich wpisów. Kiedy obecne jest ostrzeżenie o zawartości, zawartość wpisu jest domyślnie zwinięta, a widoczny jest tylko tekst ostrzeżenia, tak jak linia tematu wiadomości e-mail, i przycisk „zobacz więcej”. Może to zostać wykorzystane do podania podsumowania lub tytułu wpisu, lub podania skrótu poprzedniego wpisu z wątku.
Jeżeli załączone są media, pokaże się przy nich przełącznik pozwalający „oznaczyć zawartość multimedialną jako wrażliwą”. To domyślnie ukryje media za rozmytą miniaturką. Dodanie CW do wpisu automatycznie oznacza również media jako wrażliwe.

View File

@ -13,13 +13,13 @@ menu:
Mastodon domyślnie korzysta z ciemnego motywu, ale może zostać wybrany też jasny lub wysokokontrastowy motyw.
{{< figure src="/assets/light-theme.jpg" caption="Jasny motyw Mastodona" >}}
{{< figure src="assets/light-theme.jpg" caption="Jasny motyw Mastodona" >}}
### Wybierz układ {#layout}
Mastodon domyślnie wybiera prosty, jednokolumnowy układ z polem tworzenia wpisów po lewej i wyborem kolumny po prawej. Możesz wybrać zaawansowany interfejs, pozwalający na wyświetlanie i przypięcie wielu kolumn jednocześnie.
{{< figure src="/assets/advanced-web-ui.jpg" caption="Zaawansowany interfejs" >}}
{{< figure src="assets/advanced-web-ui.jpg" caption="Zaawansowany interfejs" >}}
W obu interfejsach aktualizacje ładują się, gdy tylko dostępne są nowe wpisy. Możesz włączyć Tryb spowolniony, który zamiast tego pokazuje na górze kolumny komunikat wskazujący liczbę nowych dostępnych wpisów, które zostaną załadowane po kliknięciu tego komunikatu.
@ -41,7 +41,7 @@ Domyślnie, media oznaczone jako wrażliwe są ukrywane i wymagają kliknięcia
Ukryte i niezaładowane media używają kolorowych gradientów korzystających z algorytmu BlurHash, korzystającego z kolorów obrazu, lecz rozmywających detale. Te gradienty mogą być wyłączone.
{{< figure src="/assets/blurhash.jpg" caption="Przykład miniaturki z blurhashem" >}}
{{< figure src="assets/blurhash.jpg" caption="Przykład miniaturki z blurhashem" >}}
Wpisy z ostrzeżeniami o zawartości są domyślnie zwijane, ale możesz wybrać aby zawsze wyświetlany był pełny wpis.
@ -71,7 +71,7 @@ Jeżeli zdecydujesz się wypisać się z indeksowania w wyszukiwarkach, flaga `n
Możesz ukryć swoją sieć, dzięki czemu lista obserwujących Cię i obserwowanych przez Ciebie będzie widoczna tylko dla Ciebie.
{{< figure src="/assets/hidden-network.jpg" caption="Profil, którego właściciel zdecydował się ukryć swoją sieć" >}}
{{< figure src="assets/hidden-network.jpg" caption="Profil, którego właściciel zdecydował się ukryć swoją sieć" >}}
Jeżeli chcesz widzieć wpisy, które zostały udostępnione wielokrotnie na osi czasu, możesz wyłączyć grupowanie podbić w osiach czasu.
@ -86,4 +86,3 @@ Jeżeli często publikujesz zawartość wrażliwą, możesz wybrać, aby zawsze
### Filtrowanie języków na publicznych osiach czasu {#languages}
Możesz wybrać, aby wyświetlały się jedynie wpisy w określonych językach, kiedy przeglądasz publiczne osie czasu. Pamiętaj jednak, że wykrywanie języków może być bardzo niedokładne i możesz wciąż widzieć wpisy w wyłączonym języku lub ominąć wpisy we włączonych językach.

View File

@ -9,7 +9,7 @@ menu:
## Wygląd Twojego profilu {#appearance}
{{< figure src="/assets/profile-cards.jpg" caption="Karta profilu składająca się z nazwy wyświetlanej, awataru i nagłówka" >}}
{{< figure src="assets/profile-cards.jpg" caption="Karta profilu składająca się z nazwy wyświetlanej, awataru i nagłówka" >}}
Możesz zmienić to, jak Twój profil wygląda u innych, kierując się do: Preferencje &gt; Profil &gt; Wygląd.
@ -33,7 +33,7 @@ Twój nagłówek to baner wyświetlany na górze Twojego profilu, jak i na karta
Możesz oflagować swoje konto, aby poinformować innych, w jaki sposób korzystasz z Mastodona.
![](/assets/bot-flag.jpg)
![]({{ relUrl "/assets/bot-flag.jpg" }})
### Konto zablokowane {#locked}
@ -74,4 +74,3 @@ Mastodon sprawdza, czy odnośnik zawiera atrybut `rel="me"`. Tak samo, Mastodon
{{< hint style="info" >}}
Ponieważ możesz hostować Mastodona na własnym serwerze, nie istnieje lepszy sposób na potwierdzenie swojej tożsamości niż hostowanie Mastodona na własnej domenie, której inni już ufają.
{{< /hint >}}

View File

@ -22,7 +22,7 @@ menu:
Mastodon站点可以独立运作。和传统网站一样人们可以在上面注册、发布消息、上传图片、互相聊天。但与传统网站*不同*的是Mastodon网站之间可以互动让跨站用户互相交流就好像只要你知道他们的电子邮件地址你就可以从你的Gmail帐户发送电子邮件给使用Outlook、Fastmail、Protonmail或任何其他电子邮件供应商的用户。在Mastodon里**你可以对任何人在任何网站上的地址进行“@”或私信**。
{{< figure src="/assets/image%20%289%29.png" caption="上图从左到右依次为:集中式、联邦式、分布式" >}}
{{< figure src="assets/image%20%289%29.png" caption="上图从左到右依次为:集中式、联邦式、分布式" >}}
## ActivityPub是什么 {#fediverse}

View File

@ -92,7 +92,7 @@ Mastodon使用环境变量作为其的配置。
* `CACHE_REDIS_URL`
* `CACHE_REDIS_NAMESPACE`
### ElasticSearch {#elasticsearch}
### Elasticsearch {#elasticsearch}
* `ES_ENABLED`
* `ES_HOST`

View File

@ -1,23 +1,23 @@
---
title: 全文搜索
description: 设置ElasticSearch来搜索自己发出的嘟文、自己喜欢的嘟文、自己的书签和自己被提及的嘟文。
description: 设置Elasticsearch来搜索自己发出的嘟文、自己喜欢的嘟文、自己的书签和自己被提及的嘟文。
menu:
docs:
weight: 10
parent: admin-optional
---
当有可用ElasticSearch时Mastodon支持全文搜索。Mastodon的全文搜索允许登录用户从他们自己的嘟文、他们喜欢的嘟文、他们的书签和他们被提及的嘟文中查找相应结果。Mastodon有意禁用了在全数据库搜索任意关键词的功能。
当有可用Elasticsearch时Mastodon支持全文搜索。Mastodon的全文搜索允许登录用户从他们自己的嘟文、他们喜欢的嘟文、他们的书签和他们被提及的嘟文中查找相应结果。Mastodon有意禁用了在全数据库搜索任意关键词的功能。
## 安装 ElasticSearch {#install}
## 安装 Elasticsearch {#install}
ElasticSearch 需要 Java runtime。如果你还没有安装 Java请立刻安装上它。以下操均假定你已经登录为`root`用户:
Elasticsearch 需要 Java runtime。如果你还没有安装 Java请立刻安装上它。以下操均假定你已经登录为`root`用户:
```bash
apt install openjdk-8-jre-headless
```
添加ElasticSearch官方软件仓库至apt
添加Elasticsearch官方软件仓库至apt
```bash
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
@ -25,20 +25,20 @@ echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | tee -a /e
apt update
```
现在,你可以安装 ElasticSearch
现在,你可以安装 Elasticsearch
```bash
apt install elasticsearch
```
{{< hint style="warning" >}}
**安全警告:** 默认情况下ElasticSearch仅绑定于localhost即无法从外部网络访问。你可以通过查看 `/etc/elasticsearch/elasticsearch.yml` 中的 `network.host` 来检查 ElasticSearch 绑定了哪些地址。考虑到由于缺乏认证层,任何能访问 ElasticSearch 的人都可以读取或修改里面的数据。因此,确保访问安全非常重要。如[主要安装说明](../../prerequisites/#install-a-firewall-and-only-whitelist-ssh-http-and-https-ports)中所述防火墙建议仅暴露了22、80、443端口。如果你是一个多主机配置你必须知道如何保证内部流量安全。
**安全警告:** 默认情况下Elasticsearch仅绑定于localhost即无法从外部网络访问。你可以通过查看 `/etc/elasticsearch/elasticsearch.yml` 中的 `network.host` 来检查 Elasticsearch 绑定了哪些地址。考虑到由于缺乏认证层,任何能访问 Elasticsearch 的人都可以读取或修改里面的数据。因此,确保访问安全非常重要。如[主要安装说明](../../prerequisites/#install-a-firewall-and-only-whitelist-ssh-http-and-https-ports)中所述防火墙建议仅暴露了22、80、443端口。如果你是一个多主机配置你必须知道如何保证内部流量安全。
{{< /hint >}}
{{< hint style="danger" >}}
**安全警告:** 由于近期ElasticSearch所使用的`log4j`库被披露出[安全漏洞](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228),使用了旧版本`log4j`(`2.0`到`2.14.1`)的ES可能会受到影响。如果使用了这些版本的`log4j`,请参阅 [此 issue](https://github.com/elastic/elasticsearch/issues/81618#issuecomment-991000240) 来暂时缓解此问题。
**安全警告:** 由于近期Elasticsearch所使用的`log4j`库被披露出[安全漏洞](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228),使用了旧版本`log4j`(`2.0`到`2.14.1`)的ES可能会受到影响。如果使用了这些版本的`log4j`,请参阅 [此 issue](https://github.com/elastic/elasticsearch/issues/81618#issuecomment-991000240) 来暂时缓解此问题。
{{< /hint >}}
启动 ElasticSearch
启动 Elasticsearch
```bash
systemctl enable elasticsearch
@ -55,10 +55,10 @@ ES_HOST=localhost
ES_PORT=9200
```
如果你同一台机器上运行多个Mastodon服务器你计划让它们使用同一个ElasticSearch请确保他们都配置了互不重复的 `REDIS_NAMESPACE` 以分别他们的索引。如果你需要覆盖ElasticSearch索引前缀你可以直接设置 `ES_PREFIX`
如果你同一台机器上运行多个Mastodon服务器你计划让它们使用同一个Elasticsearch请确保他们都配置了互不重复的 `REDIS_NAMESPACE` 以分别他们的索引。如果你需要覆盖Elasticsearch索引前缀你可以直接设置 `ES_PREFIX`
保存新设置之后使用如下命令创建ElasticSearch索引
保存新设置之后使用如下命令创建Elasticsearch索引
```bash
RAILS_ENV=production bundle exec rake chewy:upgrade
@ -71,7 +71,7 @@ systemctl restart mastodon-sidekiq
systemctl reload mastodon-web
```
现在新的嘟文将会被写入ElasticSearch索引。最后一步是导入所有旧有数据。这将花费很长一段时间
现在新的嘟文将会被写入Elasticsearch索引。最后一步是导入所有旧有数据。这将花费很长一段时间
```bash
RAILS_ENV=production bundle exec rake chewy:sync
@ -85,10 +85,10 @@ RAILS_ENV=production bundle exec rake chewy:sync
### 中文搜索优化 {#chinese-search-optimize}
ElasticSearch默认使用标准分析器这对于中文来说可能并不太适合。为了提高搜索体验你可以安装特定语言的专用分析器。在创建ElasticSearch索引之前执行
Elasticsearch默认使用标准分析器这对于中文来说可能并不太适合。为了提高搜索体验你可以安装特定语言的专用分析器。在创建Elasticsearch索引之前执行
安装 [elasticsearch-analysis-ik](https://github.com/medcl/elasticsearch-analysis-ik)、[elasticsearch-analysis-stconvert](https://github.com/medcl/elasticsearch-analysis-stconvert) 插件至 ElasticSearch。
安装 [elasticsearch-analysis-ik](https://github.com/medcl/elasticsearch-analysis-ik)、[elasticsearch-analysis-stconvert](https://github.com/medcl/elasticsearch-analysis-stconvert) 插件至 Elasticsearch。
并对源码做出如下修改:

View File

@ -259,7 +259,7 @@ Redis被广泛使用于应用但是某些用途比其他用途更重要。主
为了减轻你的Postgresql服务器负担你可以使用热流复制hot streaming replication只读副本read replica。有关示例请参见[该指南](https://cloud.google.com/community/tutorials/setting-up-postgres-hot-standby)。你可以给以下Mastodon用途使用副本replica
* streaming API 服务器无需写入因此你可以将其直接使用副本replica。但由于 streaming API 服务器不经常查询数据库,这样的优化影响很小。
* 使用 Makara 驱动 web 与 sidekiq 进程这样可以实现从主master数据库写从副本replica读。让我们开始吧。
* 使用 Makara 驱动 web 与 sidekiq 进程,这样可以实现从主(primary数据库写从副本replica读。让我们开始吧。
编辑 `config/database.yml` 文件,将 `production` 替换为如下内容:

View File

@ -23,7 +23,7 @@ RAILS_ENV=production bin/tootctl help
## 基础命令
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/cli.rb" caption="lib/cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/base.rb" caption="lib/mastodon/cli/base.rb" >}}
### `tootctl self-destruct` {#self-destruct}
@ -51,7 +51,7 @@ RAILS_ENV=production bin/tootctl help
## 帐户相关命令 {#accounts}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/accounts_cli.rb" caption="lib/mastodon/accounts_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/accounts.rb" caption="lib/mastodon/cli/accounts.rb" >}}
### `tootctl accounts rotate` {#accounts-rotate}
@ -208,7 +208,7 @@ RAILS_ENV=production bin/tootctl help
## 缓存相关命令 {#cache}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/cache_cli.rb" caption="lib/mastodon/cache_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/cache.rb" caption="lib/mastodon/cli/cache.rb" >}}
### `tootctl cache clear` {#cache-clear}
@ -232,7 +232,7 @@ RAILS_ENV=production bin/tootctl help
## 域名相关命令 {#domains}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/domains_cli.rb" caption="lib/mastodon/domains_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/domains.rb" caption="lib/mastodon/cli/domains.rb" >}}
### `tootctl domains purge` {#domains-purge}
@ -269,7 +269,7 @@ RAILS_ENV=production bin/tootctl help
## Emoji相关命令 {#emoji}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/emoji_cli.rb" caption="lib/mastodon/emoji_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/emoji.rb" caption="lib/mastodon/cli/emoji.rb" >}}
### `tootctl emoji import` {#emoji-import}
@ -301,7 +301,7 @@ RAILS_ENV=production bin/tootctl help
## 时间流Feeds相关命令 {#feeds}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/feeds_cli.rb" caption="lib/mastodon/feeds_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/feeds.rb" caption="lib/mastodon/cli/feeds.rb" >}}
### `tootctl feeds build` {#feeds-build}
@ -327,7 +327,7 @@ RAILS_ENV=production bin/tootctl help
## 媒体相关命令 {#media}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/media_cli.rb" caption="lib/mastodon/media_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/media.rb" caption="lib/mastodon/cli/media.rb" >}}
### `tootctl media remove` {#media-remove}
@ -390,7 +390,7 @@ RAILS_ENV=production bin/tootctl help
## 预览卡片Preview Cards相关命令 {#preview_cards}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/preview_cards_cli.rb" caption="lib/mastodon/preview_cards_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/preview_cards.rb" caption="lib/mastodon/cli/preview_cards.rb" >}}
### `tootctl preview_cards remove` {#preview_cards-remove}
@ -409,11 +409,11 @@ RAILS_ENV=production bin/tootctl help
## 搜索相关命令 {#search}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/search_cli.rb" caption="lib/mastodon/search_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/search.rb" caption="lib/mastodon/cli/search.rb" >}}
### `tootctl search deploy` {#search-deploy}
创建或更新ElasticSearch索引并进行填充。 如果ElasticSearch为空此命令将创建必要的索引然后将数据从数据库导入到这些索引中。如果自上次运行以来索引结构已更改此命令还将升级索引。
创建或更新Elasticsearch索引并进行填充。 如果Elasticsearch为空此命令将创建必要的索引然后将数据从数据库导入到这些索引中。如果自上次运行以来索引结构已更改此命令还将升级索引。
**版本历史:**
* 2.8.0 - 被加入
@ -425,7 +425,7 @@ RAILS_ENV=production bin/tootctl help
## 站点设定相关命令 {#settings}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/settings_cli.rb" caption="lib/mastodon/settings_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/settings.rb" caption="lib/mastodon/cli/settings.rb" >}}
### `tootctl settings registrations open` {#settings-registrations-open}
@ -443,7 +443,7 @@ RAILS_ENV=production bin/tootctl help
## 嘟文相关命令 {#statuses}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/master/lib/mastodon/statuses_cli.rb" caption="lib/mastodon/statuses_cli.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/statuses.rb" caption="lib/mastodon/cli/statuses.rb" >}}
### `tootctl statuses remove` {#statuses-remove}

View File

@ -7,7 +7,7 @@ menu:
---
{{< hint style="info" >}}
当一个新的Mastodon版本释出后它将出现在[GitHub releases页面](https://github.com/mastodon/mastodon/releases)。请注意:运行来自`master`分支的未释出代码,虽然可以进行,但不推荐这样做。
当一个新的Mastodon版本释出后它将出现在[GitHub releases页面](https://github.com/mastodon/mastodon/releases)。请注意:运行来自`main`分支的未释出代码,虽然可以进行,但不推荐这样做。
{{< /hint >}}
Mastodon版本与git tags一致。在尝试升级之前请至[GitHub releases页面](https://github.com/mastodon/mastodon/releases)查找所需版本。该页面包含了一个**更新日专**,其中描述你需要了解的所有差异,以及**特定的升级指令**。

View File

@ -9,13 +9,13 @@ menu:
## 生成邀请链接 {#invites}
{{< figure src="/assets/image%20%2862%29.png" caption="从你的帐户设置中邀请别人加入本站" >}}
{{< figure src="assets/image%20%2862%29.png" caption="从你的帐户设置中邀请别人加入本站" >}}
邀请链接可以被生成并与其他人分享,有些服务器需要邀请才能注册账号。在生成邀请链接时,你可以设置最多使用次数,以限制某个链接的使用次数,或者限制链接的可使用时间。邀请链接可以在任何时候停用。
## 关注管理 {#relationships}
{{< figure src="/assets/image%20%2849%29.png" caption="所有与你互相关注并且没有启用迁移功能的用户,按最后一次活动时间排序" >}}
{{< figure src="assets/image%20%2849%29.png" caption="所有与你互相关注并且没有启用迁移功能的用户,按最后一次活动时间排序" >}}
在设置中有关注管理器,你可以根据不同的标准,对和你有关的用户进行筛选和排序。
@ -35,7 +35,7 @@ menu:
### Keybase身份验证 {#keybase}
{{< figure src="/assets/image%20%2860%29.png" caption="个人资料上的身份验证" >}}
{{< figure src="assets/image%20%2860%29.png" caption="个人资料上的身份验证" >}}
首先注册Keybase并生成或上传一个GPG公钥到你的Keybase帐户。接下来进入“证明更多身份prove more identities”。找到你的实例如果没有请联系Keybase寻求帮助。选择你的Mastodon域名输入你的用户名。你可以通过使用你的Mastodon账号进行授权并发布验证消息来验证你的身份。一旦你这样做了身份验证就会建立你的个人资料将会显示Keybase的身份验证。

View File

@ -11,25 +11,25 @@ menu:
### 精选话题标签 {#featured-tags}
{{< figure src="/assets/image%20%2858%29.png" caption="精选话题标签会显示该标签最后使用日期和总使用量" >}}
{{< figure src="assets/image%20%2858%29.png" caption="精选话题标签会显示该标签最后使用日期和总使用量" >}}
你可以选择展示你经常使用的某些话题标签。进入 设置 &gt; 个人资料 &gt; 精选的话题标签 来管理你目前正在使用的精选话题标签。一旦被精选,你的个人资料上就会显示一个指向该话题标签的链接,其中包括上次在嘟文中使用该话题标签的日期,以及使用该话题标签的嘟文总数。
### 推荐用户 {#featured-profiles}
{{< figure src="/assets/image%20%2833%29.png" caption="图为四个被随机展示出来的推荐用户列表" >}}
{{< figure src="assets/image%20%2833%29.png" caption="图为四个被随机展示出来的推荐用户列表" >}}
你可以选择在个人资料中推荐你所关注的人。进入你所关注的人的个人资料页打开下拉菜单点击“在个人资料中推荐该用户”。当你推荐某用户时时一个指向该用户个人资料页的链接将会出现在你个人资料页“你的推荐”栏目下。“你的推荐”栏目一次最多展示4个推荐用户每次加载页面时这四个推荐用户将会从你所有的推荐用户中随机选出。
## 置顶嘟文 {#pinned}
{{< figure src="/assets/image%20%2837%29.png" caption="一篇来自mastodon.social/@gargron的置顶嘟文" >}}
{{< figure src="assets/image%20%2837%29.png" caption="一篇来自mastodon.social/@gargron的置顶嘟文" >}}
你可以选择在你的个人档案的顶部最多置顶5个自己的公开嘟文。进入嘟文下拉菜单然后点击“在个人资料页面置顶”。置顶后它将出现在你的嘟文选项卡的顶部在所有其他按时间顺序排列的嘟文的之前。
## 用户资料目录 {#directory}
{{< figure src="/assets/image%20%2831%29.png" caption="mastodon.social上的用户资料目录" >}}
{{< figure src="assets/image%20%2831%29.png" caption="mastodon.social上的用户资料目录" >}}
用户资料目录显示了所有选择在目录中显示的帐户,可以用来快速找到你可能感兴趣的用户资料。

View File

@ -9,11 +9,11 @@ menu:
## 与另一个Mastodon站点的远程互动 {#interact}
{{< figure src="/assets/image%20%2863%29.png" caption="Mastodon网站上的一个嘟文的永久链接" >}}
{{< figure src="assets/image%20%2863%29.png" caption="Mastodon网站上的一个嘟文的永久链接" >}}
当你在跨站浏览其他由Mastodon驱动的远程站点时点击任何一个交互按钮都会加载一个对话框将你重定向到你的本地站点。
{{< figure src="/assets/image%20%288%29.png" caption="跨站嘟文回复对话框" >}}
{{< figure src="assets/image%20%288%29.png" caption="跨站嘟文回复对话框" >}}
## 登录到一个客户端应用程序 {#apps}

View File

@ -11,11 +11,11 @@ menu:
你可以过滤特定关键字和短语的嘟文,自动隐藏它们。
{{< figure src="/assets/image%20%2848%29.png" caption="含有不同内容不同关键词的已激活的过滤器" >}}
{{< figure src="assets/image%20%2848%29.png" caption="含有不同内容不同关键词的已激活的过滤器" >}}
要创建或管理过滤器,请转到设置 &gt; 过滤器。点击“添加新的过滤器”按钮,你可以创建、编辑或删除过滤器。你现有的过滤器将汇总在一个表格中。
{{< figure src="/assets/image%20%2814%29.png" caption="可以为筛选器设置到期日期、过滤位置、是否服务器端删除而非隐藏、是否过滤整个词条" >}}
{{< figure src="assets/image%20%2814%29.png" caption="可以为筛选器设置到期日期、过滤位置、是否服务器端删除而非隐藏、是否过滤整个词条" >}}
过滤器有以下设置:
@ -46,7 +46,7 @@ menu:
## 用户级操作 {#blocking-and-muting}
{{< figure src="/assets/image%20%2824%29.png" caption="用户下拉菜单提供了多种操作" >}}
{{< figure src="assets/image%20%2824%29.png" caption="用户下拉菜单提供了多种操作" >}}
### 隐藏转嘟 {#hide-boosts}
@ -54,7 +54,7 @@ menu:
### 隐藏 {#mute}
{{< figure src="/assets/image%20%2852%29.png" caption="图为被隐藏的帐户" >}}
{{< figure src="assets/image%20%2852%29.png" caption="图为被隐藏的帐户" >}}
隐藏某一账号时,你可以选择是否将其通知一并隐藏。隐藏用户,而不隐藏通知时,会将该账号从用户界面中隐藏:
@ -69,7 +69,7 @@ menu:
### 屏蔽 {#block}
{{< figure src="/assets/image%20%2836%29.png" caption="图为被屏蔽的帐户" >}}
{{< figure src="assets/image%20%2836%29.png" caption="图为被屏蔽的帐户" >}}
屏蔽会将账号从用户界面中隐藏。
@ -90,7 +90,7 @@ menu:
### 屏蔽整个域名 {#hide-domain}
![](/assets/image%20%2861%29.png)
![]({{ relUrl "/assets/image%20%2861%29.png" }})
如果你屏蔽了整个域名:
@ -101,7 +101,7 @@ menu:
## 向管理员报告有问题的内容 {#report}
{{< figure src="/assets/image%20%283%29.png" caption="报告模块允许选择被报告嘟文、添加注释和是否转发报告" >}}
{{< figure src="assets/image%20%283%29.png" caption="报告模块允许选择被报告嘟文、添加注释和是否转发报告" >}}
如果你看到有违反站点规则的嘟文或用户你可以向站点管理员报告该用户。点击用户下拉菜单或嘟文的下拉菜单上的“举报”选项将打开报告模块。在这里你可以并且应该添加一个关于你为什么要举报这个帐号的注释。你可以附加某些有问题的嘟文以了解你为什么要报告该账号如果他们的行为违反了他们所在Mastodon站点的规则你还可以选择将报告转发至他们所在Mastodon站点的管理员。

View File

@ -9,7 +9,7 @@ menu:
## 导出你的信息 {#export}
{{< figure src="/assets/image%20%2835%29.png" caption="设置中的数据导出页面" >}}
{{< figure src="assets/image%20%2835%29.png" caption="设置中的数据导出页面" >}}
在任何时候,你都可以在 设置 &gt; 导出 中下载一个CSV文件其中包括你当前关注的帐户、当前创建的列表、当前屏蔽的帐户、当前隐藏的帐户和当前被屏蔽的域名。你可以在 设置 &gt; 导入 中导入你的关注、用户屏蔽、隐藏和域屏蔽列表,在这里可以合并或覆盖它们。
@ -21,25 +21,25 @@ menu:
### 帐户跳转 {#redirect}
{{< figure src="/assets/image%20%2853%29.png" caption="帐户跳转设置页面" >}}
{{< figure src="assets/image%20%2853%29.png" caption="帐户跳转设置页面" >}}
跳转帐户将禁止从该帐户发布信息,并显示一个指向你的新帐户的“帐户已经迁移”通知。任何查看你的个人资料的人都可以看到这个通知,并知道要关注你的新帐户。已跳转的帐户无法被关注。可以在任何时候取消跳转。
### 帐户迁移 {#move}
{{< figure src="/assets/image%20%2847%29.png" caption="帐户迁移设置页面" >}}
{{< figure src="assets/image%20%2847%29.png" caption="帐户迁移设置页面" >}}
迁移你的帐户等同于跳转你的帐户,但是,如果他们的软件支持迁移功能的话,它将不可逆转地迫使每个人取消关注你当前的帐户并关注你的新帐户。由于技术上的限制,你的嘟文将不会被移动。迁移帐户功能有一个很长的冷却期,在此期间你无法再次迁移,因此在使用这个功能之前要格外小心!
### 账号别名 {#aliases}
{{< figure src="/assets/image%20%2840%29.png" caption="别名管理页面" >}}
{{< figure src="assets/image%20%2840%29.png" caption="别名管理页面" >}}
仅当你的两个账号都已设置别名后,帐户迁移才会启动。帐户别名当前仅用于帐户迁移,开始迁移之前,你需要将旧帐户设置为新帐户的别名。设置帐户别名本身是无害且可逆的。
## 删除帐户 {#delete}
{{< figure src="/assets/image%20%2816%29.png" caption="删除帐户页面" >}}
{{< figure src="assets/image%20%2816%29.png" caption="删除帐户页面" >}}
在 设置 &gt; 帐户 底部,你可以找到删除帐户的选项。删除你的帐户是不可逆的,并且会导致你的个人资料和用户名永远无法使用。

View File

@ -9,7 +9,7 @@ menu:
## 浏览公共时间轴 {#timelines}
{{< figure src="/assets/image%20%2830%29.png" caption="公共时间轴上的嘟文" >}}
{{< figure src="assets/image%20%2830%29.png" caption="公共时间轴上的嘟文" >}}
为了让你发现潜在的有趣内容Mastodon提供了一种浏览所有公共嘟文的方法。当然所有Mastodon服务器之间并不会全局共享嘟文因此无法同时浏览*所有*公共嘟文。当你浏览**跨站公共时间轴**时,你将看到你所在的服务器所知道的所有公共嘟文。你的服务器可以通过多种方式发现嘟文,但其中大部分是来自你服务器上的其他用户关注的人。
@ -17,7 +17,7 @@ menu:
## 与其他人的嘟文互动 {#actions}
{{< figure src="/assets/image%20%2821%29.png" caption="可以通过单击时间轴中的嘟文来加载扩展视图" >}}
{{< figure src="assets/image%20%2821%29.png" caption="可以通过单击时间轴中的嘟文来加载扩展视图" >}}
你可以直接从时间轴对嘟文执行快速操作,或者你可以单击一条嘟文加载扩展视图,显示额外信息,包括:完整的时间戳、交互计数和嘟文回复(如果有的话)。在每一条嘟文上,你可以执行以下操作:
@ -29,7 +29,7 @@ menu:
## 通知 {#notifications}
{{< figure src="/assets/image%20%2850%29.png" caption="通知栏" >}}
{{< figure src="assets/image%20%2850%29.png" caption="通知栏" >}}
当其他人与你或你的嘟文交互时,你将根据事件的类型收到通知消息。在通知栏里,你可以查看所有通知消息,或过滤特定类型的通知消息:
@ -41,7 +41,7 @@ menu:
## 关注用户 {#follow}
![](/assets/image%20%2811%29.png)
![]({{ relUrl "/assets/image%20%2811%29.png" }})
只要你在应用程序界面例如Web界面、手机APP中遇到的用户只需要点击“关注”该用户是否在你所在的服务器上并不会带来用户体验上的差异。
@ -51,15 +51,15 @@ menu:
## 搜索 {#search}
{{< figure src="/assets/image%20%2819%29.png" caption="搜索功能可以从侧栏中访问" >}}
{{< figure src="assets/image%20%2819%29.png" caption="搜索功能可以从侧栏中访问" >}}
Mastodon的基本搜索允许登录用户查找包含特定话题标签的嘟文如果他们知道URL或地址的话可以直接加载用户或嘟文。搜索某个关键词将显示包括该关键词的用户以及话题标签。
{{< figure src="/assets/image%20%2839%29.png" caption="直接通过URL加载嘟文" >}}
{{< figure src="assets/image%20%2839%29.png" caption="直接通过URL加载嘟文" >}}
{{< figure src="/assets/image%20%2823%29.png" caption="搜索“cats”时返回包含“cats”的帐户" >}}
{{< figure src="assets/image%20%2823%29.png" caption="搜索“cats”时返回包含“cats”的帐户" >}}
{{< figure src="/assets/image%20%2827%29.png" caption="搜索“cats”时返回话题标签" >}}
{{< figure src="assets/image%20%2827%29.png" caption="搜索“cats”时返回话题标签" >}}
管理员可以选择安装全文搜索功能。Mastodon的全文搜索允许登录用户从他们自己的嘟文、他们喜欢的嘟文、他们的书签和他们被提及的嘟文中查找相应结果。为了减少人们通过搜索争议相关关键词来找人撕逼的滥用行为Mastodon有意禁用了在全数据库搜索任意关键词的功能。
@ -73,20 +73,20 @@ Mastodon的基本搜索允许登录用户查找包含特定话题标签的嘟文
## 私信 {#direct}
{{< figure src="/assets/image%20%2812%29.png" caption="私信对话列表" >}}
{{< figure src="assets/image%20%2812%29.png" caption="私信对话列表" >}}
在Mastodon中私信就是选择了“私信”可见范围的嘟文。在私信对话中后续的嘟文可以设置不同的可见范围。私信列中展示了一个包含所有私信对话的列表。点击某个对话将加载相关的嘟文。
{{< figure src="/assets/image%20%2857%29.png" caption="私信对话" >}}
{{< figure src="assets/image%20%2857%29.png" caption="私信对话" >}}
## 列表时间轴 {#lists}
列表是主页时间轴的子集。你可以创建一个列表,给它起一个名称,并将你所关注的用户添加到该列表中。
![](/assets/image%20%2828%29.png)
![]({{ relUrl "/assets/image%20%2828%29.png" }})
打开一个列表将加载该列表的时间轴。列表时间轴只包含该列表成员的嘟文,以及对你或对其他列表成员的回复。
{{< figure src="/assets/image%20%285%29.png" caption="一个列表时间轴" >}}
{{< figure src="assets/image%20%285%29.png" caption="一个列表时间轴" >}}
{{< translation-status-zh-cn raw_title="Using the network features" raw_link="/user/network/" last_tranlation_time="2020-05-03" raw_commit="ad1ef20f171c9f61439f32168987b0b4f9abd74b">}}

View File

@ -7,7 +7,7 @@ menu:
parent: user
---
{{< figure src="/assets/image%20%2859%29.png" caption="启用CW后的撰写表单" >}}
{{< figure src="assets/image%20%2859%29.png" caption="启用CW后的撰写表单" >}}
## 文本 {#text}
@ -15,25 +15,25 @@ menu:
### 链接 {#links}
{{< figure src="/assets/image%20%287%29.png" caption="链接必须以 http(s):// 开头无论长度如何都将被视为23个字符" >}}
{{< figure src="assets/image%20%287%29.png" caption="链接必须以 http(s):// 开头无论长度如何都将被视为23个字符" >}}
如果你的嘟文中有链接,它们必须以 `http://``https://` 开头。所有的链接无论实际上有多长都将被记作23个字符。因此没有使用短链接来节省字符的必要。事实上使用短链接是极其不被推荐的。
### 提及 {#mentions}
{{< figure src="/assets/image%20%2820%29.png" caption="键入@后会自动推荐你可能要提及的本站或跨站用户" >}}
{{< figure src="assets/image%20%2820%29.png" caption="键入@后会自动推荐你可能要提及的本站或跨站用户" >}}
你可以通过输入用户的完整地址来提及(@)他们,例如`@alice@example.com`。请注意,`@word`的任何用法都将被解释为提及本地用户名为`word`的用户(如果该用户存在于本站的话)。只有用户名部分才会受到字数限制,域名不被计算在字数内。
### 话题标签 {#hashtags}
{{< figure src="/assets/image%20%2825%29.png" caption="话题标签会根据使用频率自动被系统推荐" >}}
{{< figure src="assets/image%20%2825%29.png" caption="话题标签会根据使用频率自动被系统推荐" >}}
你可以使用 `#话题标签` 使任何搜索该话题标签的人都可以发现你的嘟文。标签可以包含字母数字字符和下划线,但不能只包含数字。
### 自定义emoji {#emoji}
{{< figure src="/assets/image%20%2838%29.png" caption="一组自定义表情符号存在于选择器中" >}}
{{< figure src="assets/image%20%2838%29.png" caption="一组自定义表情符号存在于选择器中" >}}
每个服务器都提供了一套你可以使用的自定义表情符号。你可以使用表情符号的短代码,如`:thounking:`或者点击撰写框中的表情符号图标浏览“自定义”类别。你也可以使用unicode标准表情符号。
@ -43,7 +43,7 @@ menu:
### 媒体文件 {#media}
{{< figure src="/assets/image%20%2844%29.png" caption="带有删除、编辑、标记为敏感媒体选项的附加媒体文件缩略图" >}}
{{< figure src="assets/image%20%2844%29.png" caption="带有删除、编辑、标记为敏感媒体选项的附加媒体文件缩略图" >}}
点击回形针将文件附加到你的嘟文上。你可以附上以下文件:
@ -54,13 +54,13 @@ menu:
#### 编辑媒体 {#edit}
{{< figure src="/assets/image%20%2826%29.png" caption="编辑媒体以添加媒体描述,或选择预览缩略图的焦点" >}}
{{< figure src="assets/image%20%2826%29.png" caption="编辑媒体以添加媒体描述,或选择预览缩略图的焦点" >}}
通过点击附件缩略图上的“编辑”链接你可以加载模块这个模块允许你添加媒体描述或改变焦点。虽然是可选的但还是建议添加媒体描述来简单地描述媒体中包含的内容。当媒体因任何原因无法加载时或当视觉障碍人士使用屏幕阅读器和其他辅助技术访问时这些描述将被显示出来。设置焦点也是可选的但是当未以169的纵横比显示预览缩略图时可以使预览缩略图看起来更好。
### 投票 {#polls}
{{< figure src="/assets/image%20%2841%29.png" caption="一个含有2个单选选项过期时间为1天的投票" >}}
{{< figure src="assets/image%20%2841%29.png" caption="一个含有2个单选选项过期时间为1天的投票" >}}
单击条型图图标将投票附加到你的嘟文。
@ -126,7 +126,7 @@ menu:
## 内容警告CW和敏感内容 {#cw}
{{< figure src="/assets/image.png" caption="在CW中被标记为敏感内容的嘟文" >}}
{{< figure src="assets/image.png" caption="在CW中被标记为敏感内容的嘟文" >}}
Mastodon提供了一个你可能在其他社交网络上没有看到的功能那就是在你的嘟文上附加一个内容警告。当包含内容警告时嘟文内容默认会被折叠只显示你设置的CW的警告标题而不直接展开显示嘟文正文起到了类似于电子邮件的主题栏或“阅读更多”的内容中断作用。这可以用于为你的嘟文添加摘要或主题、折叠长嘟文或者为嘟文主体提供上下文。

Some files were not shown because too many files have changed in this diff Show More