Merge branch 'develop' into pizzax-indexeddb
5
.github/ISSUE_TEMPLATE/01_bug-report.md
vendored
|
@ -22,7 +22,10 @@ First, in order to avoid duplicate Issues, please search to see if the problem y
|
|||
|
||||
## 🤬 Actual Behavior
|
||||
|
||||
<!--- Tell us what happens instead of the expected behavior -->
|
||||
<!--
|
||||
Tell us what happens instead of the expected behavior.
|
||||
Please include errors from the developer console and/or server log files if you have access to them.
|
||||
-->
|
||||
|
||||
## 📝 Steps to Reproduce
|
||||
|
||||
|
|
4
.github/labeler.yml
vendored
|
@ -4,5 +4,9 @@
|
|||
'🖥️Client':
|
||||
- packages/client/**/*
|
||||
|
||||
'🧪Test':
|
||||
- cypress/**/*
|
||||
- packages/backend/test/**/*
|
||||
|
||||
'‼️ wrong locales':
|
||||
- any: ['locales/*.yml', '!locales/ja-JP.yml']
|
||||
|
|
4
.github/workflows/labeler.yml
vendored
|
@ -1,6 +1,8 @@
|
|||
name: "Pull Request Labeler"
|
||||
on:
|
||||
- pull_request_target
|
||||
pull_request_target:
|
||||
branches-ignore:
|
||||
- 'l10n_develop'
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
|
|
36
.github/workflows/ok-to-test.yml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
# If someone with write access comments "/ok-to-test" on a pull request, emit a repository_dispatch event
|
||||
name: Ok To Test
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
ok-to-test:
|
||||
runs-on: ubuntu-latest
|
||||
# Only run for PRs, not issue comments
|
||||
if: ${{ github.event.issue.pull_request }}
|
||||
steps:
|
||||
# Generate a GitHub App installation access token from an App ID and private key
|
||||
# To create a new GitHub App:
|
||||
# https://developer.github.com/apps/building-github-apps/creating-a-github-app/
|
||||
# See app.yml for an example app manifest
|
||||
- name: Generate token
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@v1
|
||||
with:
|
||||
app_id: ${{ secrets.DEPLOYBOT_APP_ID }}
|
||||
private_key: ${{ secrets.DEPLOYBOT_PRIVATE_KEY }}
|
||||
|
||||
- name: Slash Command Dispatch
|
||||
uses: peter-evans/slash-command-dispatch@v1
|
||||
env:
|
||||
TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||
with:
|
||||
token: ${{ env.TOKEN }} # GitHub App installation access token
|
||||
# token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # PAT or OAuth token will also work
|
||||
reaction-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-type: pull-request
|
||||
commands: deploy
|
||||
named-args: true
|
||||
permission: write
|
95
.github/workflows/pr-preview-deploy.yml
vendored
Normal file
|
@ -0,0 +1,95 @@
|
|||
# Run secret-dependent integration tests only after /deploy approval
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize]
|
||||
repository_dispatch:
|
||||
types: [deploy-command]
|
||||
|
||||
name: Deploy preview environment
|
||||
|
||||
jobs:
|
||||
# Repo owner has commented /deploy on a (fork-based) pull request
|
||||
deploy-preview-environment:
|
||||
runs-on: ubuntu-latest
|
||||
if:
|
||||
github.event_name == 'repository_dispatch' &&
|
||||
github.event.client_payload.slash_command.sha != '' &&
|
||||
contains(github.event.client_payload.pull_request.head.sha, github.event.client_payload.slash_command.sha)
|
||||
steps:
|
||||
- uses: actions/github-script@v5
|
||||
id: check-id
|
||||
env:
|
||||
number: ${{ github.event.client_payload.pull_request.number }}
|
||||
job: ${{ github.job }}
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
result-encoding: string
|
||||
script: |
|
||||
const { data: pull } = await github.rest.pulls.get({
|
||||
...context.repo,
|
||||
pull_number: process.env.number
|
||||
});
|
||||
const ref = pull.head.sha;
|
||||
|
||||
const { data: checks } = await github.rest.checks.listForRef({
|
||||
...context.repo,
|
||||
ref
|
||||
});
|
||||
|
||||
const check = checks.check_runs.filter(c => c.name === process.env.job);
|
||||
|
||||
return check[0].id;
|
||||
|
||||
- uses: actions/github-script@v5
|
||||
env:
|
||||
check_id: ${{ steps.check-id.outputs.result }}
|
||||
details_url: ${{ github.server_url }}/${{ github.repository }}/runs/${{ github.run_id }}
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
await github.rest.checks.update({
|
||||
...context.repo,
|
||||
check_run_id: process.env.check_id,
|
||||
status: 'in_progress',
|
||||
details_url: process.env.details_url
|
||||
});
|
||||
|
||||
# Check out merge commit
|
||||
- name: Fork based /deploy checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge'
|
||||
|
||||
# <insert integration tests needing secrets>
|
||||
- name: Context
|
||||
uses: okteto/context@latest
|
||||
with:
|
||||
token: ${{ secrets.OKTETO_TOKEN }}
|
||||
|
||||
- name: Deploy preview environment
|
||||
uses: ikuradon/deploy-preview@latest
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
name: pr-${{ github.event.client_payload.pull_request.number }}-syuilo
|
||||
timeout: 15m
|
||||
|
||||
# Update check run called "integration-fork"
|
||||
- uses: actions/github-script@v5
|
||||
id: update-check-run
|
||||
if: ${{ always() }}
|
||||
env:
|
||||
# Conveniently, job.status maps to https://developer.github.com/v3/checks/runs/#update-a-check-run
|
||||
conclusion: ${{ job.status }}
|
||||
check_id: ${{ steps.check-id.outputs.result }}
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const { data: result } = await github.rest.checks.update({
|
||||
...context.repo,
|
||||
check_run_id: process.env.check_id,
|
||||
status: 'completed',
|
||||
conclusion: process.env.conclusion
|
||||
});
|
||||
|
||||
return result;
|
21
.github/workflows/pr-preview-destroy.yml
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
# file: .github/workflows/preview-closed.yaml
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
|
||||
name: Destroy preview environment
|
||||
|
||||
jobs:
|
||||
destroy-preview-environment:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Context
|
||||
uses: okteto/context@latest
|
||||
with:
|
||||
token: ${{ secrets.OKTETO_TOKEN }}
|
||||
|
||||
- name: Destroy preview environment
|
||||
uses: okteto/destroy-preview@latest
|
||||
with:
|
||||
name: pr-${{ github.event.number }}-syuilo
|
2
.github/workflows/test.yml
vendored
|
@ -103,7 +103,7 @@ jobs:
|
|||
- name: ALSA Env
|
||||
run: echo -e 'pcm.!default {\n type hw\n card 0\n}\n\nctl.!default {\n type hw\n card 0\n}' > ~/.asoundrc
|
||||
- name: Cypress run
|
||||
uses: cypress-io/github-action@v2
|
||||
uses: cypress-io/github-action@v4
|
||||
with:
|
||||
install: false
|
||||
start: npm run start:test
|
||||
|
|
|
@ -1 +1 @@
|
|||
v18.0.0
|
||||
v16.15.0
|
||||
|
|
68
CHANGELOG.md
|
@ -12,8 +12,6 @@ You should also include the user name that made the change.
|
|||
## 12.x.x (unreleased)
|
||||
|
||||
### Improvements
|
||||
- Client: Preferences Registry
|
||||
=======
|
||||
### NOTE
|
||||
- From this version, Node 18.0.0 or later is required.
|
||||
|
||||
|
@ -28,25 +26,73 @@ You should also include the user name that made the change.
|
|||
- enhance: display URL of QR code for TOTP registration @syuilo
|
||||
- make CAPTCHA required for signin to improve security @syuilo
|
||||
- enhance: Supports Unicode Emoji 14.0 @mei23
|
||||
=======
|
||||
- Server: Add rate limit to i/notifications @tamaina
|
||||
- Client: Improve files page of control panel @syuilo
|
||||
- Improve player detection in URL preview @mei23
|
||||
- Add Badge Image to Push Notification #8012 @tamaina
|
||||
|
||||
### Bugfixes
|
||||
- Server: Fix GenerateVideoThumbnail failed @mei23
|
||||
- Server: Ensure temp directory cleanup @Johann150
|
||||
- favicons of federated instances not showing @syuilo
|
||||
|
||||
## 12.111.1 (2022/06/13)
|
||||
|
||||
### Bugfixes
|
||||
- some fixes of multiple notification read @tamaina
|
||||
- some GenerateVideoThumbnail failed @Johann150
|
||||
- Client: デッキでウィジェットの情報が保存されない問題を修正 @syuilo
|
||||
- Client: ギャラリーの投稿を開こうとすると編集画面が表示される @futchitwo
|
||||
|
||||
## 12.111.0 (2022/06/11)
|
||||
### Note
|
||||
- Node.js 16.15.0 or later is required
|
||||
|
||||
### Improvements
|
||||
- Supports Unicode Emoji 14.0 @mei23
|
||||
- プッシュ通知を複数アカウント対応に #7667 @tamaina
|
||||
- プッシュ通知にクリックやactionを設定 #7667 @tamaina
|
||||
- ドライブに画像ファイルをアップロードするときオリジナル画像を破棄してwebpublicのみ保持するオプション @tamaina
|
||||
- Server: always remove completed tasks of job queue @Johann150
|
||||
- Client: アバターの設定で画像をクロップできるように @syuilo
|
||||
- Client: make emoji stand out more on reaction button @Johann150
|
||||
- Client: display URL of QR code for TOTP registration @tamaina
|
||||
- Client: render quote renote CWs as MFM @pixeldesu
|
||||
- API: notifications/readは配列でも受け付けるように #7667 @tamaina
|
||||
- API: ユーザー検索で、クエリがusernameの条件を満たす場合はusernameもLIKE検索するように @tamaina
|
||||
- MFM: Allow speed changes in all animated MFMs @Johann150
|
||||
- The theme color is now better validated. @Johann150
|
||||
Your own theme color may be unset if it was in an invalid format.
|
||||
Admins should check their instance settings if in doubt.
|
||||
- Perform port diagnosis at startup only when Listen fails @mei23
|
||||
- Rate limiting is now also usable for non-authenticated users. @Johann150 @mei23
|
||||
Admins should make sure the reverse proxy sets the `X-Forwarded-For` header to the original address.
|
||||
|
||||
### Bugfixes
|
||||
- Client: fix settings page @tamaina
|
||||
- Client: fix profile tabs @futchitwo
|
||||
- Server: await promises when following or unfollowing users @Johann150
|
||||
- Client: fix abuse reports page to be able to show all reports @Johann150
|
||||
- Federation: Add rel attribute to host-meta @mei23
|
||||
- Client: fix profile picture height in mentions @tamaina
|
||||
- MFM: more animated functions support `speed` parameter @futchitwo
|
||||
- Federation: Fix quote renotes containing no text being federated correctly @Johann150
|
||||
- Server: keep file order of note attachement @Johann150
|
||||
- Server: fix missing foreign key for reports leading to reports page being unusable @Johann150
|
||||
- Server: fix internal in-memory caching @Johann150
|
||||
- Server: use correct order of attachments on notes @Johann150
|
||||
- Server: prevent crash when processing certain PNGs @syuilo
|
||||
- Server: Fix unable to generate video thumbnails @mei23
|
||||
- Server: Fix `Cannot find module` issue @mei23
|
||||
- Federation: Add rel attribute to host-meta @mei23
|
||||
- Federation: add id for activitypub follows @Johann150
|
||||
- Federation: use `source` instead of `_misskey_content` @Johann150
|
||||
- Federation: ensure resolver does not fetch local resources via HTTP(S) @Johann150
|
||||
- Federation: correctly render empty note text @Johann150
|
||||
- Federation: Fix quote renotes containing no text being federated correctly @Johann150
|
||||
- Federation: remove duplicate br tag/newline @Johann150
|
||||
- Federation: add missing authorization checks @Johann150
|
||||
- Client: fix profile picture height in mentions @tamaina
|
||||
- Client: fix abuse reports page to be able to show all reports @Johann150
|
||||
- Client: fix settings page @tamaina
|
||||
- Client: fix profile tabs @futchitwo
|
||||
- Client: fix popout URL @futchitwo
|
||||
- Client: correctly handle MiAuth URLs with query string @sn0w
|
||||
- Client: ノート詳細ページの新しいノートを表示する機能の動作が正しくなるように修正する @xianonn
|
||||
- MFM: more animated functions support `speed` parameter @futchitwo
|
||||
- MFM: limit large MFM @Johann150
|
||||
|
||||
## 12.110.1 (2022/04/23)
|
||||
|
||||
|
|
|
@ -66,18 +66,25 @@ Be willing to comment on the good points and not just the things you want fixed
|
|||
- Are there any omissions or gaps?
|
||||
- Does it check for anomalies?
|
||||
|
||||
## Deploy
|
||||
The `/deploy` command by issue comment can be used to deploy the contents of a PR to the preview environment.
|
||||
```
|
||||
/deploy sha=<commit hash>
|
||||
```
|
||||
An actual domain will be assigned so you can test the federation.
|
||||
|
||||
## Merge
|
||||
For now, basically only @syuilo has the authority to merge PRs into develop because he is most familiar with the codebase.
|
||||
However, minor fixes, refactoring, and urgent changes may be merged at the discretion of a contributor.
|
||||
|
||||
## Release
|
||||
For now, basically only @syuilo has the authority to release Misskey.
|
||||
However, in case of emergency, a release can be made at the discretion of a contributor.
|
||||
|
||||
### Release Instructions
|
||||
1. commit version changes in the `develop` branch ([package.json](https://github.com/misskey-dev/misskey/blob/develop/package.json))
|
||||
2. follow the `master` branch to the `develop` branch.
|
||||
3. Create a [release of GitHub](https://github.com/misskey-dev/misskey/releases)
|
||||
1. Commit version changes in the `develop` branch ([package.json](https://github.com/misskey-dev/misskey/blob/develop/package.json))
|
||||
2. Create a release PR.
|
||||
- Into `master` from `develop` branch.
|
||||
- The title must be in the format `Release: x.y.z`.
|
||||
- `x.y.z` is the new version you are trying to release.
|
||||
3. Deploy and perform a simple QA check. Also verify that the tests passed.
|
||||
4. Merge it.
|
||||
5. Create a [release of GitHub](https://github.com/misskey-dev/misskey/releases)
|
||||
- The target branch must be `master`
|
||||
- The tag name must be the version
|
||||
|
||||
|
|
|
@ -47,6 +47,10 @@ With Misskey's built in drive, you get cloud storage right in your social media,
|
|||
|
||||
<div style="clear: both;"></div>
|
||||
|
||||
## Documentation
|
||||
|
||||
Misskey Documentation can be found at [Misskey Hub](https://misskey-hub.net/), some of the links and graphics above also lead to specific portions of it.
|
||||
|
||||
## Sponsors
|
||||
<div align="center">
|
||||
<a class="rss3" title="RSS3" href="https://rss3.io/" target="_blank"><img src="https://rss3.mypinata.cloud/ipfs/QmUG6H3Z7D5P511shn7sB4CPmpjH5uZWu4m5mWX7U3Gqbu" alt="RSS3" height="60"></a>
|
||||
|
|
|
@ -19,6 +19,7 @@ This is the phase we are at now. We need to make a high-maintenance environment
|
|||
## (2) Improve functionality
|
||||
Once Phase 1 is complete and an environment conducive to the development of a stable system is in place, the implementation of new functions can begin gradually.
|
||||
|
||||
- Improve features for moderation
|
||||
- OAuth2 support https://github.com/misskey-dev/misskey/issues/8262
|
||||
- GraphQL support?
|
||||
|
||||
|
|
12
cypress.config.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
import { defineConfig } from 'cypress'
|
||||
|
||||
export default defineConfig({
|
||||
e2e: {
|
||||
// We've imported your old cypress plugins here.
|
||||
// You may want to clean this up later by importing these.
|
||||
setupNodeEvents(on, config) {
|
||||
return require('./cypress/plugins/index.js')(on, config)
|
||||
},
|
||||
baseUrl: 'http://localhost:61812',
|
||||
},
|
||||
})
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"baseUrl": "http://localhost:61812"
|
||||
}
|
|
@ -1,11 +1,6 @@
|
|||
describe('Before setup instance', () => {
|
||||
beforeEach(() => {
|
||||
cy.window(win => {
|
||||
win.indexedDB.deleteDatabase('keyval-store');
|
||||
});
|
||||
cy.request('POST', '/api/reset-db').as('reset');
|
||||
cy.get('@reset').its('status').should('equal', 204);
|
||||
cy.reload(true);
|
||||
cy.resetState();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
@ -35,18 +30,10 @@ describe('Before setup instance', () => {
|
|||
|
||||
describe('After setup instance', () => {
|
||||
beforeEach(() => {
|
||||
cy.window(win => {
|
||||
win.indexedDB.deleteDatabase('keyval-store');
|
||||
});
|
||||
cy.request('POST', '/api/reset-db').as('reset');
|
||||
cy.get('@reset').its('status').should('equal', 204);
|
||||
cy.reload(true);
|
||||
cy.resetState();
|
||||
|
||||
// インスタンス初期セットアップ
|
||||
cy.request('POST', '/api/admin/accounts/create', {
|
||||
username: 'admin',
|
||||
password: 'pass',
|
||||
}).its('body').as('admin');
|
||||
cy.registerUser('admin', 'pass', true);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
@ -76,24 +63,13 @@ describe('After setup instance', () => {
|
|||
|
||||
describe('After user signup', () => {
|
||||
beforeEach(() => {
|
||||
cy.window(win => {
|
||||
win.indexedDB.deleteDatabase('keyval-store');
|
||||
});
|
||||
cy.request('POST', '/api/reset-db').as('reset');
|
||||
cy.get('@reset').its('status').should('equal', 204);
|
||||
cy.reload(true);
|
||||
cy.resetState();
|
||||
|
||||
// インスタンス初期セットアップ
|
||||
cy.request('POST', '/api/admin/accounts/create', {
|
||||
username: 'admin',
|
||||
password: 'pass',
|
||||
}).its('body').as('admin');
|
||||
cy.registerUser('admin', 'pass', true);
|
||||
|
||||
// ユーザー作成
|
||||
cy.request('POST', '/api/signup', {
|
||||
username: 'alice',
|
||||
password: 'alice1234',
|
||||
}).its('body').as('alice');
|
||||
cy.registerUser('alice', 'alice1234');
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
@ -138,34 +114,15 @@ describe('After user signup', () => {
|
|||
|
||||
describe('After user singed in', () => {
|
||||
beforeEach(() => {
|
||||
cy.window(win => {
|
||||
win.indexedDB.deleteDatabase('keyval-store');
|
||||
});
|
||||
cy.request('POST', '/api/reset-db').as('reset');
|
||||
cy.get('@reset').its('status').should('equal', 204);
|
||||
cy.reload(true);
|
||||
cy.resetState();
|
||||
|
||||
// インスタンス初期セットアップ
|
||||
cy.request('POST', '/api/admin/accounts/create', {
|
||||
username: 'admin',
|
||||
password: 'pass',
|
||||
}).its('body').as('admin');
|
||||
cy.registerUser('admin', 'pass', true);
|
||||
|
||||
// ユーザー作成
|
||||
cy.request('POST', '/api/signup', {
|
||||
username: 'alice',
|
||||
password: 'alice1234',
|
||||
}).its('body').as('alice');
|
||||
cy.registerUser('alice', 'alice1234');
|
||||
|
||||
cy.visit('/');
|
||||
|
||||
cy.intercept('POST', '/api/signin').as('signin');
|
||||
|
||||
cy.get('[data-cy-signin]').click();
|
||||
cy.get('[data-cy-signin-username] input').type('alice');
|
||||
cy.get('[data-cy-signin-password] input').type('alice1234{enter}');
|
||||
|
||||
cy.wait('@signin').as('signedIn');
|
||||
cy.login('alice', 'alice1234');
|
||||
});
|
||||
|
||||
afterEach(() => {
|
65
cypress/e2e/widgets.cy.js
Normal file
|
@ -0,0 +1,65 @@
|
|||
describe('After user signed in', () => {
|
||||
beforeEach(() => {
|
||||
cy.resetState();
|
||||
cy.viewport('macbook-16');
|
||||
|
||||
// インスタンス初期セットアップ
|
||||
cy.registerUser('admin', 'pass', true);
|
||||
|
||||
// ユーザー作成
|
||||
cy.registerUser('alice', 'alice1234');
|
||||
|
||||
cy.login('alice', 'alice1234');
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
// テスト終了直前にページ遷移するようなテストケース(例えばアカウント作成)だと、たぶんCypressのバグでブラウザの内容が次のテストケースに引き継がれてしまう(例えばアカウントが作成し終わった段階からテストが始まる)。
|
||||
// waitを入れることでそれを防止できる
|
||||
cy.wait(1000);
|
||||
});
|
||||
|
||||
it('widget edit toggle is visible', () => {
|
||||
cy.get('.mk-widget-edit').should('be.visible');
|
||||
});
|
||||
|
||||
it('widget select should be visible in edit mode', () => {
|
||||
cy.get('.mk-widget-edit').click();
|
||||
cy.get('.mk-widget-select').should('be.visible');
|
||||
});
|
||||
|
||||
it('first widget should be removed', () => {
|
||||
cy.get('.mk-widget-edit').click();
|
||||
cy.get('.customize-container:first-child .remove._button').click();
|
||||
cy.get('.customize-container').should('have.length', 2);
|
||||
});
|
||||
|
||||
function buildWidgetTest(widgetName) {
|
||||
it(`${widgetName} widget should get added`, () => {
|
||||
cy.get('.mk-widget-edit').click();
|
||||
cy.get('.mk-widget-select select').select(widgetName, { force: true });
|
||||
cy.get('.bg._modalBg.transparent').click({ multiple: true, force: true });
|
||||
cy.get('.mk-widget-add').click({ force: true });
|
||||
cy.get(`.mkw-${widgetName}`).should('exist');
|
||||
});
|
||||
}
|
||||
|
||||
buildWidgetTest('memo');
|
||||
buildWidgetTest('notifications');
|
||||
buildWidgetTest('timeline');
|
||||
buildWidgetTest('calendar');
|
||||
buildWidgetTest('rss');
|
||||
buildWidgetTest('trends');
|
||||
buildWidgetTest('clock');
|
||||
buildWidgetTest('activity');
|
||||
buildWidgetTest('photos');
|
||||
buildWidgetTest('digitalClock');
|
||||
buildWidgetTest('federation');
|
||||
buildWidgetTest('postForm');
|
||||
buildWidgetTest('slideshow');
|
||||
buildWidgetTest('serverMetric');
|
||||
buildWidgetTest('onlineUsers');
|
||||
buildWidgetTest('jobQueue');
|
||||
buildWidgetTest('button');
|
||||
buildWidgetTest('aiscript');
|
||||
buildWidgetTest('aichan');
|
||||
});
|
|
@ -23,3 +23,33 @@
|
|||
//
|
||||
// -- This will overwrite an existing command --
|
||||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
||||
|
||||
Cypress.Commands.add('resetState', () => {
|
||||
cy.window(win => {
|
||||
win.indexedDB.deleteDatabase('keyval-store');
|
||||
});
|
||||
cy.request('POST', '/api/reset-db').as('reset');
|
||||
cy.get('@reset').its('status').should('equal', 204);
|
||||
cy.reload(true);
|
||||
});
|
||||
|
||||
Cypress.Commands.add('registerUser', (username, password, isAdmin = false) => {
|
||||
const route = isAdmin ? '/api/admin/accounts/create' : '/api/signup';
|
||||
|
||||
cy.request('POST', route, {
|
||||
username: username,
|
||||
password: password,
|
||||
}).its('body').as(username);
|
||||
});
|
||||
|
||||
Cypress.Commands.add('login', (username, password) => {
|
||||
cy.visit('/');
|
||||
|
||||
cy.intercept('POST', '/api/signin').as('signin');
|
||||
|
||||
cy.get('[data-cy-signin]').click();
|
||||
cy.get('[data-cy-signin-username] input').type(username);
|
||||
cy.get('[data-cy-signin-password] input').type(`${password}{enter}`);
|
||||
|
||||
cy.wait('@signin').as('signedIn');
|
||||
});
|
||||
|
|
|
@ -1007,7 +1007,6 @@ _sfx:
|
|||
antenna: "الهوائيات"
|
||||
channel: "إشعارات القنات"
|
||||
_ago:
|
||||
unknown: "مجهول"
|
||||
future: "المستقبَل"
|
||||
justNow: "اللحظة"
|
||||
secondsAgo: "منذ {n} ثوانٍ"
|
||||
|
|
|
@ -831,11 +831,18 @@ themeColor: "থিমের রং"
|
|||
size: "আকার"
|
||||
numberOfColumn: "কলামের সংখ্যা"
|
||||
searchByGoogle: "গুগল"
|
||||
instanceDefaultLightTheme: "ইন্সট্যান্সের ডিফল্ট লাইট থিম"
|
||||
instanceDefaultDarkTheme: "ইন্সট্যান্সের ডিফল্ট ডার্ক থিম"
|
||||
instanceDefaultThemeDescription: "অবজেক্ট ফরম্যাটে থিম কোড লিখুন"
|
||||
mutePeriod: "মিউটের সময়কাল"
|
||||
indefinitely: "অনির্দিষ্ট"
|
||||
tenMinutes: "১০ মিনিট"
|
||||
oneHour: "১ ঘণ্টা"
|
||||
oneDay: "একদিন"
|
||||
oneWeek: "এক সপ্তাহ"
|
||||
reflectMayTakeTime: "এটির কাজ দেখা যেতে কিছুটা সময় লাগতে পারে।"
|
||||
failedToFetchAccountInformation: "অ্যাকাউন্টের তথ্য উদ্ধার করা যায়নি"
|
||||
rateLimitExceeded: "রেট লিমিট ছাড়িয়ে গেছে "
|
||||
_emailUnavailable:
|
||||
used: "এই ইমেইল ঠিকানাটি ইতোমধ্যে ব্যবহৃত হয়েছে"
|
||||
format: "এই ইমেল ঠিকানাটি সঠিকভাবে লিখা হয়নি"
|
||||
|
@ -1081,7 +1088,6 @@ _sfx:
|
|||
antenna: "অ্যান্টেনাগুলি"
|
||||
channel: "চ্যানেলের বিজ্ঞপ্তি"
|
||||
_ago:
|
||||
unknown: "অজানা"
|
||||
future: "ভবিষ্যৎ"
|
||||
justNow: "এইমাত্র"
|
||||
secondsAgo: "{n} সেকেন্ড আগে"
|
||||
|
@ -1125,6 +1131,7 @@ _2fa:
|
|||
registerKey: "সিকিউরিটি কী নিবন্ধন করুন"
|
||||
step1: "প্রথমে, আপনার ডিভাইসে {a} বা {b} এর মতো একটি অথেনটিকেশন অ্যাপ ইনস্টল করুন৷"
|
||||
step2: "এরপরে, অ্যাপের সাহায্যে প্রদর্শিত QR কোডটি স্ক্যান করুন।"
|
||||
step2Url: "ডেস্কটপ অ্যাপে, নিম্নলিখিত URL লিখুন:"
|
||||
step3: "অ্যাপে প্রদর্শিত টোকেনটি লিখুন এবং আপনার কাজ শেষ।"
|
||||
step4: "আপনাকে এখন থেকে লগ ইন করার সময়, এইভাবে টোকেন লিখতে হবে।"
|
||||
securityKeyInfo: "আপনি একটি হার্ডওয়্যার সিকিউরিটি কী ব্যবহার করে লগ ইন করতে পারেন যা FIDO2 বা ডিভাইসের ফিঙ্গারপ্রিন্ট সেন্সর বা পিন সমর্থন করে৷"
|
||||
|
@ -1608,6 +1615,8 @@ _notification:
|
|||
youReceivedFollowRequest: "অনুসরণ করার জন্য অনুরোধ পাওয়া গেছে"
|
||||
yourFollowRequestAccepted: "আপনার অনুসরণ করার অনুরোধ গৃহীত হয়েছে"
|
||||
youWereInvitedToGroup: "আপনি একটি গ্রুপে আমন্ত্রিত হয়েছেন"
|
||||
pollEnded: "পোলের ফলাফল দেখা যাবে"
|
||||
emptyPushNotificationMessage: "আপডেট করা পুশ বিজ্ঞপ্তি"
|
||||
_types:
|
||||
all: "সকল"
|
||||
follow: "অনুসরণ করা হচ্ছে"
|
||||
|
@ -1617,11 +1626,13 @@ _notification:
|
|||
quote: "উদ্ধৃতি"
|
||||
reaction: "প্রতিক্রিয়া"
|
||||
pollVote: "পোলে ভোট আছে"
|
||||
pollEnded: "পোল শেষ"
|
||||
receiveFollowRequest: "প্রাপ্ত অনুসরণের অনুরোধসমূহ"
|
||||
followRequestAccepted: "গৃহীত অনুসরণের অনুরোধসমূহ"
|
||||
groupInvited: "গ্রুপের আমন্ত্রনসমূহ"
|
||||
app: "লিঙ্ক করা অ্যাপ থেকে বিজ্ঞপ্তি"
|
||||
_actions:
|
||||
followBack: "ফলো ব্যাক করেছে"
|
||||
reply: "জবাব"
|
||||
renote: "রিনোট"
|
||||
_deck:
|
||||
|
|
|
@ -134,6 +134,8 @@ _theme:
|
|||
_sfx:
|
||||
note: "Notes"
|
||||
notification: "Notificacions"
|
||||
_2fa:
|
||||
step2Url: "També pots inserir aquest enllaç i utilitzes una aplicació d'escriptori:"
|
||||
_widgets:
|
||||
notifications: "Notificacions"
|
||||
timeline: "Línia de temps"
|
||||
|
|
|
@ -842,6 +842,9 @@ oneDay: "Einen Tag"
|
|||
oneWeek: "Eine Woche"
|
||||
reflectMayTakeTime: "Es kann etwas dauern, bis sich dies widerspiegelt."
|
||||
failedToFetchAccountInformation: "Benutzerkontoinformationen konnten nicht abgefragt werden"
|
||||
rateLimitExceeded: "Versuchsanzahl überschritten"
|
||||
cropImage: "Bild zuschneiden"
|
||||
cropImageAsk: "Möchtest du das Bild zuschneiden?"
|
||||
_emailUnavailable:
|
||||
used: "Diese Email-Adresse wird bereits verwendet"
|
||||
format: "Das Format dieser Email-Adresse ist ungültig"
|
||||
|
@ -1087,7 +1090,6 @@ _sfx:
|
|||
antenna: "Antennen"
|
||||
channel: "Kanalbenachrichtigung"
|
||||
_ago:
|
||||
unknown: "Unbekannt"
|
||||
future: "Zukunft"
|
||||
justNow: "Gerade eben"
|
||||
secondsAgo: "vor {n} Sekunde(n)"
|
||||
|
@ -1131,6 +1133,7 @@ _2fa:
|
|||
registerKey: "Neuen Sicherheitsschlüssel registrieren"
|
||||
step1: "Installiere zuerst eine Authentifizierungsapp (z.B. {a} oder {b}) auf deinem Gerät."
|
||||
step2: "Dann, scanne den angezeigten QR-Code mit deinem Gerät."
|
||||
step2Url: "Nutzt du ein Desktopprogramm kannst du alternativ diese URL eingeben:"
|
||||
step3: "Gib zum Abschluss den Token ein, der von deiner App angezeigt wird."
|
||||
step4: "Alle folgenden Anmeldungsversuche werden ab sofort die Eingabe eines solchen Tokens benötigen."
|
||||
securityKeyInfo: "Du kannst neben Fingerabdruck- oder PIN-Authentifizierung auf deinem Gerät auch Anmeldung mit Hilfe eines FIDO2-kompatiblen Hardware-Sicherheitsschlüssels einrichten."
|
||||
|
|
|
@ -842,6 +842,9 @@ oneDay: "One day"
|
|||
oneWeek: "One week"
|
||||
reflectMayTakeTime: "It may take some time for this to be reflected."
|
||||
failedToFetchAccountInformation: "Could not fetch account information"
|
||||
rateLimitExceeded: "Rate limit exceeded"
|
||||
cropImage: "Crop image"
|
||||
cropImageAsk: "Do you want to crop this image?"
|
||||
_emailUnavailable:
|
||||
used: "This email address is already being used"
|
||||
format: "The format of this email address is invalid"
|
||||
|
@ -1087,7 +1090,6 @@ _sfx:
|
|||
antenna: "Antennas"
|
||||
channel: "Channel notifications"
|
||||
_ago:
|
||||
unknown: "Unknown"
|
||||
future: "Future"
|
||||
justNow: "Just now"
|
||||
secondsAgo: "{n} second(s) ago"
|
||||
|
@ -1131,6 +1133,7 @@ _2fa:
|
|||
registerKey: "Register a security key"
|
||||
step1: "First, install an authentication app (such as {a} or {b}) on your device."
|
||||
step2: "Then, scan the QR code displayed on this screen."
|
||||
step2Url: "You can also enter this URL if you're using a desktop program:"
|
||||
step3: "Enter the token provided by your app to finish setup."
|
||||
step4: "From now on, any future login attempts will ask for such a login token."
|
||||
securityKeyInfo: "Besides fingerprint or PIN authentication, you can also setup authentication via hardware security keys that support FIDO2 to further secure your account."
|
||||
|
|
|
@ -989,7 +989,6 @@ _sfx:
|
|||
antenna: "Antena receptora"
|
||||
channel: "Notificaciones del canal"
|
||||
_ago:
|
||||
unknown: "Desconocido"
|
||||
future: "Futuro"
|
||||
justNow: "Recién ahora"
|
||||
secondsAgo: "Hace {n} segundos"
|
||||
|
|
|
@ -804,7 +804,7 @@ manageAccounts: "Gérer les comptes"
|
|||
makeReactionsPublic: "Rendre les réactions publiques"
|
||||
makeReactionsPublicDescription: "Ceci rendra la liste de toutes vos réactions données publique."
|
||||
classic: "Classique"
|
||||
muteThread: "Mettre ce thread en sourdine"
|
||||
muteThread: "Masquer cette discussion"
|
||||
unmuteThread: "Ne plus masquer le fil"
|
||||
ffVisibility: "Visibilité des abonnés/abonnements"
|
||||
ffVisibilityDescription: "Permet de configurer qui peut voir les personnes que tu suis et les personnes qui te suivent."
|
||||
|
@ -1075,7 +1075,6 @@ _sfx:
|
|||
antenna: "Réception de l’antenne"
|
||||
channel: "Notifications de canal"
|
||||
_ago:
|
||||
unknown: "Inconnu"
|
||||
future: "Futur"
|
||||
justNow: "à l’instant"
|
||||
secondsAgo: "Il y a {n}s"
|
||||
|
|
|
@ -842,6 +842,9 @@ oneDay: "1 Hari"
|
|||
oneWeek: "1 Bulan"
|
||||
reflectMayTakeTime: "Mungkin perlu beberapa saat untuk dicerminkan."
|
||||
failedToFetchAccountInformation: "Gagal untuk mendapatkan informasi akun"
|
||||
rateLimitExceeded: "Batas sudah terlampaui"
|
||||
cropImage: "potong gambar"
|
||||
cropImageAsk: "Ingin memotong gambar?"
|
||||
_emailUnavailable:
|
||||
used: "Alamat surel ini telah digunakan"
|
||||
format: "Format tidak valid."
|
||||
|
@ -1087,7 +1090,6 @@ _sfx:
|
|||
antenna: "Penerimaan Antenna"
|
||||
channel: "Pemberitahuan saluran"
|
||||
_ago:
|
||||
unknown: "Tidak diketahui"
|
||||
future: "Masa depan"
|
||||
justNow: "Baru saja"
|
||||
secondsAgo: "{n} detik lalu"
|
||||
|
@ -1131,6 +1133,7 @@ _2fa:
|
|||
registerKey: "Daftarkan kunci keamanan baru"
|
||||
step1: "Pertama, pasang aplikasi otentikasi (seperti {a} atau {b}) di perangkat kamu."
|
||||
step2: "Lalu, pindai kode QR yang ada di layar."
|
||||
step2Url: "Di aplikasi desktop, masukkan URL berikut:"
|
||||
step3: "Masukkan token yang telah disediakan oleh aplikasimu untuk menyelesaikan pemasangan."
|
||||
step4: "Mulai sekarang, upaya login apapun akan meminta token login dari aplikasi otentikasi kamu."
|
||||
securityKeyInfo: "Kamu dapat memasang otentikasi WebAuthN untuk mengamankan proses login lebih lanjut dengan tidak hanya perangkat keras kunci keamanan yang mendukung FIDO2, namun juga sidik jari atau otentikasi PIN pada perangkatmu."
|
||||
|
|
|
@ -10,7 +10,7 @@ password: "Password"
|
|||
forgotPassword: "Hai dimenticato la tua password?"
|
||||
fetchingAsApObject: "Recuperando dal Fediverso..."
|
||||
ok: "OK"
|
||||
gotIt: "Capito!"
|
||||
gotIt: "Ho capito"
|
||||
cancel: "Annulla"
|
||||
enterUsername: "Inserisci un nome utente"
|
||||
renotedBy: "Rinotato da {user}"
|
||||
|
@ -767,6 +767,7 @@ customCss: "CSS personalizzato"
|
|||
global: "Federata"
|
||||
squareAvatars: "Mostra l'immagine del profilo come quadrato"
|
||||
sent: "Inviare"
|
||||
received: "Ricevuto"
|
||||
searchResult: "Risultati della Ricerca"
|
||||
hashtags: "Hashtag"
|
||||
troubleshooting: "Risoluzione problemi"
|
||||
|
@ -804,6 +805,10 @@ welcomeBackWithName: "Bentornato/a, {name}"
|
|||
clickToFinishEmailVerification: "Fai click su [{ok}] per completare la verifica dell'indirizzo email."
|
||||
searchByGoogle: "Cerca"
|
||||
indefinitely: "Non scade"
|
||||
tenMinutes: "10 minuti"
|
||||
oneHour: "1 ora"
|
||||
oneDay: "1 giorno"
|
||||
oneWeek: "1 settimana"
|
||||
_emailUnavailable:
|
||||
used: "Email già in uso"
|
||||
format: "Formato email non valido"
|
||||
|
@ -999,7 +1004,6 @@ _sfx:
|
|||
antenna: "Ricezione dell'antenna"
|
||||
channel: "Notifiche di canale"
|
||||
_ago:
|
||||
unknown: "Sconosciuto"
|
||||
future: "Futuro"
|
||||
justNow: "Ora"
|
||||
secondsAgo: "{n}s fa"
|
||||
|
|
|
@ -645,6 +645,8 @@ clip: "クリップ"
|
|||
createNew: "新規作成"
|
||||
optional: "任意"
|
||||
createNewClip: "新しいクリップを作成"
|
||||
unclip: "クリップ解除"
|
||||
confirmToUnclipAlreadyClippedNote: "このノートはすでにクリップ「{name}」に含まれています。ノートをこのクリップから除外しますか?"
|
||||
public: "パブリック"
|
||||
i18nInfo: "Misskeyは有志によって様々な言語に翻訳されています。{link}で翻訳に協力できます。"
|
||||
manageAccessTokens: "アクセストークンの管理"
|
||||
|
@ -844,6 +846,10 @@ oneDay: "1日"
|
|||
oneWeek: "1週間"
|
||||
reflectMayTakeTime: "反映されるまで時間がかかる場合があります。"
|
||||
failedToFetchAccountInformation: "アカウント情報の取得に失敗しました"
|
||||
rateLimitExceeded: "レート制限を超えました"
|
||||
cropImage: "画像のクロップ"
|
||||
cropImageAsk: "画像をクロップしますか?"
|
||||
file: "ファイル"
|
||||
|
||||
_emailUnavailable:
|
||||
used: "既に使用されています"
|
||||
|
@ -1135,7 +1141,6 @@ _sfx:
|
|||
channel: "チャンネル通知"
|
||||
|
||||
_ago:
|
||||
unknown: "謎"
|
||||
future: "未来"
|
||||
justNow: "たった今"
|
||||
secondsAgo: "{n}秒前"
|
||||
|
|
|
@ -799,7 +799,6 @@ _sfx:
|
|||
notification: "通知"
|
||||
chat: "チャット"
|
||||
_ago:
|
||||
unknown: "わからん"
|
||||
future: "未来"
|
||||
justNow: "たった今"
|
||||
secondsAgo: "{n}秒前"
|
||||
|
|
|
@ -842,6 +842,9 @@ oneDay: "1일"
|
|||
oneWeek: "일주일"
|
||||
reflectMayTakeTime: "반영되기까지 시간이 걸릴 수 있습니다."
|
||||
failedToFetchAccountInformation: "계정 정보를 가져오지 못했습니다"
|
||||
rateLimitExceeded: "요청 제한 횟수를 초과하였습니다"
|
||||
cropImage: "이미지 자르기"
|
||||
cropImageAsk: "이미지를 자르시겠습니까?"
|
||||
_emailUnavailable:
|
||||
used: "이 메일 주소는 사용중입니다"
|
||||
format: "형식이 올바르지 않습니다"
|
||||
|
@ -1087,7 +1090,6 @@ _sfx:
|
|||
antenna: "안테나 수신"
|
||||
channel: "채널 알림"
|
||||
_ago:
|
||||
unknown: "알 수 없음"
|
||||
future: "미래"
|
||||
justNow: "방금 전"
|
||||
secondsAgo: "{n}초 전"
|
||||
|
@ -1131,6 +1133,7 @@ _2fa:
|
|||
registerKey: "키를 등록"
|
||||
step1: "먼저, {a}나 {b}등의 인증 앱을 사용 중인 디바이스에 설치합니다."
|
||||
step2: "그 후, 표시되어 있는 QR코드를 앱으로 스캔합니다."
|
||||
step2Url: "데스크톱 앱에서는 다음 URL을 입력하세요:"
|
||||
step3: "앱에 표시된 토큰을 입력하시면 완료됩니다."
|
||||
step4: "다음 로그인부터는 토큰을 입력해야 합니다."
|
||||
securityKeyInfo: "FIDO2를 지원하는 하드웨어 보안 키 혹은 디바이스의 지문인식이나 화면잠금 PIN을 이용해서 로그인하도록 설정할 수 있습니다."
|
||||
|
|
|
@ -303,6 +303,8 @@ muteThread: "Discussies dempen "
|
|||
unmuteThread: "Dempen van discussie ongedaan maken"
|
||||
hide: "Verbergen"
|
||||
searchByGoogle: "Zoeken"
|
||||
cropImage: "Afbeelding bijsnijden"
|
||||
cropImageAsk: "Bijsnijdengevraagd"
|
||||
_email:
|
||||
_follow:
|
||||
title: "volgde jou"
|
||||
|
|
|
@ -946,7 +946,6 @@ _sfx:
|
|||
chatBg: "Rozmowy (tło)"
|
||||
channel: "Powiadomienia kanału"
|
||||
_ago:
|
||||
unknown: "Nieznane"
|
||||
future: "W przyszłości"
|
||||
justNow: "Przed chwilą"
|
||||
secondsAgo: "{n} sek. temu"
|
||||
|
|
|
@ -81,18 +81,67 @@ somethingHappened: "Ocorreu um erro"
|
|||
retry: "Tentar novamente"
|
||||
pageLoadError: "Ocorreu um erro ao carregar a página."
|
||||
pageLoadErrorDescription: "Isto é normalmente causado por erros de rede ou pela cache do browser. Experimenta limpar a cache e tenta novamente após algum tempo."
|
||||
serverIsDead: "O servidor não está respondendo. Por favor espere um pouco e tente novamente."
|
||||
youShouldUpgradeClient: "Para visualizar essa página, por favor recarregue-a para atualizar seu cliente."
|
||||
enterListName: "Insira um nome para a lista"
|
||||
privacy: "Privacidade"
|
||||
makeFollowManuallyApprove: "Pedidos de seguimento precisam ser aprovados"
|
||||
defaultNoteVisibility: "Visibilidade padrão"
|
||||
follow: "Seguindo"
|
||||
followRequest: "Mandar pedido de seguimento"
|
||||
followRequests: "Pedidos de seguimento"
|
||||
unfollow: "Deixar de seguir"
|
||||
followRequestPending: "Pedido de seguimento pendente"
|
||||
enterEmoji: "Inserir emoji"
|
||||
renote: "Repostar"
|
||||
renoted: "Repostado"
|
||||
cantRenote: "Não pode repostar"
|
||||
cantReRenote: "Não pode repostar este repost"
|
||||
quote: "Citar"
|
||||
pinnedNote: "Post fixado"
|
||||
pinned: "Afixar no perfil"
|
||||
you: "Você"
|
||||
clickToShow: "Clique para ver"
|
||||
sensitive: "Conteúdo sensível"
|
||||
add: "Adicionar"
|
||||
reaction: "Reações"
|
||||
reactionSetting: "Quais reações a mostrar no selecionador de reações"
|
||||
rememberNoteVisibility: "Lembrar das configurações de visibilidade de notas"
|
||||
attachCancel: "Remover anexo"
|
||||
markAsSensitive: "Marcar como sensível"
|
||||
unmarkAsSensitive: "Desmarcar como sensível"
|
||||
enterFileName: "Digite o nome do ficheiro"
|
||||
mute: "Silenciar"
|
||||
unmute: "Dessilenciar"
|
||||
block: "Bloquear"
|
||||
unblock: "Desbloquear"
|
||||
suspend: "Suspender"
|
||||
unsuspend: "Cancelar suspensão"
|
||||
blockConfirm: "Tem certeza que gostaria de bloquear essa conta?"
|
||||
unblockConfirm: "Tem certeza que gostaria de desbloquear essa conta?"
|
||||
suspendConfirm: "Tem certeza que gostaria de suspender essa conta?"
|
||||
unsuspendConfirm: "Tem certeza que gostaria de cancelar a suspensão dessa conta?"
|
||||
selectList: "Escolhe uma lista"
|
||||
selectAntenna: "Escolhe uma antena"
|
||||
selectWidget: "Escolhe um widget"
|
||||
editWidgets: "Editar widgets"
|
||||
editWidgetsExit: "Pronto"
|
||||
customEmojis: "Emoji personalizado"
|
||||
emoji: "Emoji"
|
||||
emojis: "Emojis"
|
||||
emojiName: "Nome do Emoji"
|
||||
emojiUrl: "URL do Emoji"
|
||||
addEmoji: "Adicionar um Emoji"
|
||||
settingGuide: "Guia de configuração"
|
||||
flagAsBot: "Marcar conta como robô"
|
||||
flagAsCat: "Marcar conta como gato"
|
||||
flagAsCatDescription: "Ative essa opção para marcar essa conta como gato."
|
||||
flagShowTimelineReplies: "Mostrar respostas na linha de tempo"
|
||||
general: "Geral"
|
||||
wallpaper: "Papel de parede"
|
||||
searchWith: "Buscar: {q}"
|
||||
youHaveNoLists: "Não tem nenhuma lista"
|
||||
followConfirm: "Tem certeza que quer deixar de seguir {name}?"
|
||||
instances: "Instância"
|
||||
registeredAt: "Registrado em"
|
||||
perHour: "por hora"
|
||||
|
@ -107,6 +156,8 @@ nsfw: "Conteúdo sensível"
|
|||
monthX: "mês de {month}"
|
||||
pinnedNotes: "Post fixado"
|
||||
userList: "Listas"
|
||||
none: "Nenhum"
|
||||
output: "Resultado"
|
||||
smtpUser: "Nome de usuário"
|
||||
smtpPass: "Senha"
|
||||
user: "Usuários"
|
||||
|
@ -116,6 +167,8 @@ _email:
|
|||
title: "Você tem um novo seguidor"
|
||||
_mfm:
|
||||
mention: "Menção"
|
||||
quote: "Citar"
|
||||
emoji: "Emoji personalizado"
|
||||
search: "Pesquisar"
|
||||
_theme:
|
||||
keys:
|
||||
|
@ -136,38 +189,229 @@ _profile:
|
|||
_exportOrImport:
|
||||
followingList: "Seguindo"
|
||||
muteList: "Silenciar"
|
||||
blockingList: "Bloquear"
|
||||
userLists: "Listas"
|
||||
_pages:
|
||||
blocks:
|
||||
_button:
|
||||
_action:
|
||||
_pushEvent:
|
||||
event: "Nome do evento"
|
||||
message: "Mostrar mensagem quando ativado"
|
||||
variable: "Variável a mandar"
|
||||
no-variable: "Nenhum"
|
||||
callAiScript: "Invocar AiScript"
|
||||
_callAiScript:
|
||||
functionName: "Nome da função"
|
||||
radioButton: "Escolha"
|
||||
_radioButton:
|
||||
values: "Lista de escolhas separadas por quebras de texto"
|
||||
script:
|
||||
categories:
|
||||
logical: "Operação lógica"
|
||||
operation: "Cálculos"
|
||||
comparison: "Comparação"
|
||||
list: "Listas"
|
||||
blocks:
|
||||
_strReplace:
|
||||
arg2: "Texto que irá ser substituído"
|
||||
arg3: "Substituir com"
|
||||
strReverse: "Virar texto"
|
||||
join: "Sequência de texto"
|
||||
_join:
|
||||
arg1: "Listas"
|
||||
arg2: "Separador"
|
||||
add: "Somar"
|
||||
_add:
|
||||
arg1: "A"
|
||||
arg2: "B"
|
||||
subtract: "Subtrair"
|
||||
_subtract:
|
||||
arg1: "A"
|
||||
arg2: "B"
|
||||
multiply: "Multiplicar"
|
||||
_multiply:
|
||||
arg1: "A"
|
||||
arg2: "B"
|
||||
divide: "Dividir"
|
||||
_divide:
|
||||
arg1: "A"
|
||||
arg2: "B"
|
||||
mod: "O resto de"
|
||||
_mod:
|
||||
arg1: "A"
|
||||
arg2: "B"
|
||||
round: "Arredondar decimal"
|
||||
_round:
|
||||
arg1: "Numérico"
|
||||
eq: "A e B são iguais"
|
||||
_eq:
|
||||
arg1: "A"
|
||||
arg2: "B"
|
||||
notEq: "A e B são diferentes"
|
||||
_notEq:
|
||||
arg1: "A"
|
||||
arg2: "B"
|
||||
and: "A e B"
|
||||
_and:
|
||||
arg1: "A"
|
||||
arg2: "B"
|
||||
or: "A OU B"
|
||||
_or:
|
||||
arg1: "A"
|
||||
arg2: "B"
|
||||
lt: "< A é menor do que B"
|
||||
_lt:
|
||||
arg1: "A"
|
||||
arg2: "B"
|
||||
gt: "> A é maior do que B"
|
||||
_gt:
|
||||
arg1: "A"
|
||||
arg2: "B"
|
||||
ltEq: "<= A é maior ou igual a B"
|
||||
_ltEq:
|
||||
arg1: "A"
|
||||
arg2: "B"
|
||||
gtEq: ">= A é maior ou igual a B"
|
||||
_gtEq:
|
||||
arg1: "A"
|
||||
arg2: "B"
|
||||
if: "Galho"
|
||||
_if:
|
||||
arg1: "Se"
|
||||
arg2: "Então"
|
||||
arg3: "Se não"
|
||||
not: "NÃO"
|
||||
_not:
|
||||
arg1: "NÃO"
|
||||
random: "Aleatório"
|
||||
_random:
|
||||
arg1: "Probabilidade"
|
||||
rannum: "Numeral aleatório"
|
||||
_rannum:
|
||||
arg1: "Valor mínimo"
|
||||
arg2: "Valor máximo"
|
||||
randomPick: "Escolher aleatoriamente de uma lista"
|
||||
_randomPick:
|
||||
arg1: "Listas"
|
||||
dailyRandom: "Aleatório (Muda uma vez por dia para cada usuário)"
|
||||
_dailyRandom:
|
||||
arg1: "Probabilidade"
|
||||
dailyRannum: "Numeral aleatório (Muda uma vez por dia para cada usuário)"
|
||||
_dailyRannum:
|
||||
arg1: "Valor mínimo"
|
||||
arg2: "Valor máximo"
|
||||
dailyRandomPick: "Escolher aleatoriamente de uma lista (Muda uma vez por dia para cada usuário)"
|
||||
_dailyRandomPick:
|
||||
arg1: "Listas"
|
||||
seedRandom: "Aleatório (com semente)"
|
||||
_seedRandom:
|
||||
arg1: "Semente"
|
||||
arg2: "Probabilidade"
|
||||
seedRannum: "Número aleatório (com semente)"
|
||||
_seedRannum:
|
||||
arg1: "Semente"
|
||||
arg2: "Valor mínimo"
|
||||
arg3: "Valor máximo"
|
||||
seedRandomPick: "Escolher aleatoriamente de uma lista (com uma semente)"
|
||||
_seedRandomPick:
|
||||
arg1: "Semente"
|
||||
arg2: "Listas"
|
||||
DRPWPM: "Escolher aleatoriamente de uma lista ponderada (Muda uma vez por dia para cada usuário)"
|
||||
_DRPWPM:
|
||||
arg1: "Lista de texto"
|
||||
pick: "Escolhe a partir da lista"
|
||||
_pick:
|
||||
arg1: "Listas"
|
||||
arg2: "Posição"
|
||||
listLen: "Pegar comprimento da lista"
|
||||
_listLen:
|
||||
arg1: "Listas"
|
||||
number: "Numérico"
|
||||
stringToNumber: "Texto para numérico"
|
||||
_stringToNumber:
|
||||
arg1: "Texto"
|
||||
numberToString: "Numérico para texto"
|
||||
_numberToString:
|
||||
arg1: "Numérico"
|
||||
splitStrByLine: "Dividir texto por quebras"
|
||||
_splitStrByLine:
|
||||
arg1: "Texto"
|
||||
ref: "Variável"
|
||||
aiScriptVar: "Variável AiScript"
|
||||
fn: "Função"
|
||||
_fn:
|
||||
slots: "Espaços"
|
||||
slots-info: "Separar cada espaço com uma quebra de texto"
|
||||
arg1: "Resultado"
|
||||
for: "Repetição 'for'"
|
||||
_for:
|
||||
arg1: "Número de repetições"
|
||||
arg2: "Ação"
|
||||
typeError: "Espaço {slot} aceita valores de tipo \"{expect}\", mas o valor dado é do tipo \"{actual}\"!"
|
||||
thereIsEmptySlot: "O espaço {slot} está vazio!"
|
||||
types:
|
||||
string: "Texto"
|
||||
number: "Numérico"
|
||||
array: "Listas"
|
||||
stringArray: "Lista de texto"
|
||||
emptySlot: "Espaço vazio"
|
||||
enviromentVariables: "Variáveis de ambiente"
|
||||
pageVariables: "Variáveis de página"
|
||||
_relayStatus:
|
||||
requesting: "Pendente"
|
||||
accepted: "Aprovado"
|
||||
rejected: "Recusado"
|
||||
_notification:
|
||||
fileUploaded: "Carregamento de arquivo efetuado com sucesso"
|
||||
youGotMention: "{name} te mencionou"
|
||||
youGotReply: "{name} te respondeu"
|
||||
youGotQuote: "{name} te citou"
|
||||
youGotPoll: "{name} votou em sua enquete"
|
||||
youGotMessagingMessageFromUser: "{name} te mandou uma mensagem de bate-papo"
|
||||
youGotMessagingMessageFromGroup: "Uma mensagem foi mandada para o grupo {name}"
|
||||
youWereFollowed: "Você tem um novo seguidor"
|
||||
youReceivedFollowRequest: "Você recebeu um pedido de seguimento"
|
||||
yourFollowRequestAccepted: "Seu pedido de seguimento foi aceito"
|
||||
youWereInvitedToGroup: "{userName} te convidou para um grupo"
|
||||
pollEnded: "Os resultados da enquete agora estão disponíveis"
|
||||
emptyPushNotificationMessage: "As notificações de alerta foram atualizadas"
|
||||
_types:
|
||||
all: "Todos"
|
||||
follow: "Seguindo"
|
||||
mention: "Menção"
|
||||
reply: "Respostas"
|
||||
renote: "Repostar"
|
||||
quote: "Citar"
|
||||
reaction: "Reações"
|
||||
pollVote: "Votações em enquetes"
|
||||
pollEnded: "Enquetes terminando"
|
||||
receiveFollowRequest: "Recebeu pedidos de seguimento"
|
||||
followRequestAccepted: "Aceitou pedidos de seguimento"
|
||||
groupInvited: "Convites de grupo"
|
||||
app: "Notificações de aplicativos conectados"
|
||||
_actions:
|
||||
followBack: "te seguiu de volta"
|
||||
reply: "Responder"
|
||||
renote: "Repostar"
|
||||
_deck:
|
||||
alwaysShowMainColumn: "Sempre mostrar a coluna principal"
|
||||
columnAlign: "Alinhar colunas"
|
||||
columnMargin: "Margem entre colunas"
|
||||
columnHeaderHeight: "Altura do cabeçalho de coluna"
|
||||
addColumn: "Adicionar coluna"
|
||||
swapLeft: "Trocar de posição com a coluna à esquerda"
|
||||
swapRight: "Trocar de posição com a coluna à direita"
|
||||
swapUp: "Trocar de posição com a coluna acima"
|
||||
swapDown: "Trocar de posição com a coluna abaixo"
|
||||
popRight: "Acoplar coluna à direita"
|
||||
profile: "Perfil"
|
||||
_columns:
|
||||
main: "Principal"
|
||||
widgets: "Widgets"
|
||||
notifications: "Notificações"
|
||||
tl: "Timeline"
|
||||
antenna: "Antenas"
|
||||
list: "Listas"
|
||||
mentions: "Menções"
|
||||
direct: "Notas diretas"
|
||||
|
|
|
@ -141,6 +141,8 @@ flagAsBot: "Аккаунт бота"
|
|||
flagAsBotDescription: "Включите, если этот аккаунт управляется программой. Это позволит системе Misskey учитывать это, а также поможет разработчикам других ботов предотвратить бесконечные циклы взаимодействия."
|
||||
flagAsCat: "Аккаунт кота"
|
||||
flagAsCatDescription: "Включите, и этот аккаунт будет помечен как кошачий."
|
||||
flagShowTimelineReplies: "Показывать ответы на заметки в ленте"
|
||||
flagShowTimelineRepliesDescription: "Если этот параметр включен, то в ленте, в дополнение к заметкам пользователя, отображаются ответы на другие заметки пользователя."
|
||||
autoAcceptFollowed: "Принимать подписчиков автоматически"
|
||||
addAccount: "Добавить учётную запись"
|
||||
loginFailed: "Неудачная попытка входа"
|
||||
|
@ -236,6 +238,7 @@ saved: "Сохранено"
|
|||
messaging: "Сообщения"
|
||||
upload: "Загрузить"
|
||||
keepOriginalUploading: "Сохранить исходное изображение"
|
||||
keepOriginalUploadingDescription: "Сохраняет исходную версию при загрузке изображений. Если выключить, то при загрузке браузер генерирует изображение для публикации."
|
||||
fromDrive: "С «диска»"
|
||||
fromUrl: "По ссылке"
|
||||
uploadFromUrl: "Загрузить по ссылке"
|
||||
|
@ -589,6 +592,7 @@ smtpSecure: "Использовать SSL/TLS для SMTP-соединений"
|
|||
smtpSecureInfo: "Выключите при использовании STARTTLS."
|
||||
testEmail: "Проверка доставки электронной почты"
|
||||
wordMute: "Скрытие слов"
|
||||
regexpError: "Ошибка в регулярном выражении"
|
||||
instanceMute: "Глушение инстансов"
|
||||
userSaysSomething: "{name} что-то сообщает"
|
||||
makeActive: "Активировать"
|
||||
|
@ -619,6 +623,8 @@ fillAbuseReportDescription: "Опишите, пожалуйста, причин
|
|||
abuseReported: "Жалоба отправлена. Большое спасибо за информацию."
|
||||
reporteeOrigin: "О ком сообщено"
|
||||
reporterOrigin: "Кто сообщил"
|
||||
forwardReport: "Перенаправление отчета на инстант."
|
||||
forwardReportIsAnonymous: "Удаленный инстант не сможет увидеть вашу информацию и будет отображаться как анонимная системная учетная запись."
|
||||
send: "Отправить"
|
||||
abuseMarkAsResolved: "Отметить жалобу как решённую"
|
||||
openInNewTab: "Открыть в новой вкладке"
|
||||
|
@ -815,7 +821,16 @@ leaveGroupConfirm: "Покинуть группу «{name}»?"
|
|||
useDrawerReactionPickerForMobile: "Выдвижная палитра на мобильном устройстве"
|
||||
welcomeBackWithName: "С возвращением, {name}!"
|
||||
clickToFinishEmailVerification: "Пожалуйста, нажмите [{ok}], чтобы завершить подтверждение адреса электронной почты."
|
||||
overridedDeviceKind: "Тип устройства"
|
||||
smartphone: "Смартфон"
|
||||
tablet: "Планшет"
|
||||
auto: "Автоматически"
|
||||
themeColor: "Цвет темы"
|
||||
size: "Размер"
|
||||
numberOfColumn: "Количество столбцов"
|
||||
searchByGoogle: "Поиск"
|
||||
instanceDefaultLightTheme: "Светлая тема по умолчанию"
|
||||
instanceDefaultDarkTheme: "Темная тема по умолчанию"
|
||||
indefinitely: "вечно"
|
||||
_emailUnavailable:
|
||||
used: "Уже используется"
|
||||
|
@ -1059,7 +1074,6 @@ _sfx:
|
|||
antenna: "Антенна"
|
||||
channel: "Канал"
|
||||
_ago:
|
||||
unknown: "Когда-то"
|
||||
future: "Из будущего"
|
||||
justNow: "Только что"
|
||||
secondsAgo: "{n} с назад"
|
||||
|
|
|
@ -841,6 +841,7 @@ oneDay: "1 deň"
|
|||
oneWeek: "1 týždeň"
|
||||
reflectMayTakeTime: "Zmeny môžu chvíľu trvať kým sa prejavia."
|
||||
failedToFetchAccountInformation: "Nepodarilo sa načítať informácie o účte."
|
||||
rateLimitExceeded: "Prekročený limit rýchlosti"
|
||||
_emailUnavailable:
|
||||
used: "Táto emailová adresa sa už používa"
|
||||
format: "Formát emailovej adresy je nesprávny"
|
||||
|
@ -1086,7 +1087,6 @@ _sfx:
|
|||
antenna: "Antény"
|
||||
channel: "Upozornenia kanála"
|
||||
_ago:
|
||||
unknown: "Neznáme"
|
||||
future: "Budúcnosť"
|
||||
justNow: "Teraz"
|
||||
secondsAgo: "pred {n} sekundami"
|
||||
|
@ -1130,6 +1130,7 @@ _2fa:
|
|||
registerKey: "Registrovať bezpečnostný kľúč"
|
||||
step1: "Najprv si nainštalujte autentifikačnú aplikáciu (napríklad {a} alebo {b}) na svoje zariadenie."
|
||||
step2: "Potom, naskenujte QR kód zobrazený na obrazovke."
|
||||
step2Url: "Do aplikácie zadajte nasledujúcu URL adresu:"
|
||||
step3: "Nastavenie dokončíte zadaním tokenu z vašej aplikácie."
|
||||
step4: "Od teraz, všetky ďalšie prihlásenia budú vyžadovať prihlasovací token."
|
||||
securityKeyInfo: "Okrem odtlačku prsta alebo PIN autentifikácie si môžete nastaviť autentifikáciu cez hardvérový bezpečnostný kľúč podporujúci FIDO2 a tak ešte viac zabezpečiť svoj účet."
|
||||
|
|
319
locales/sv-SE.yml
Normal file
|
@ -0,0 +1,319 @@
|
|||
---
|
||||
_lang_: "Svenska"
|
||||
headlineMisskey: "Ett nätverk kopplat av noter"
|
||||
introMisskey: "Välkommen! Misskey är en öppen och decentraliserad mikrobloggningstjänst.\nSkapa en \"not\" och dela dina tankar med alla runtomkring dig. 📡\nMed \"reaktioner\" kan du snabbt uttrycka dina känslor kring andras noter.👍\nLåt oss utforska en nya värld!🚀"
|
||||
monthAndDay: "{day}/{month}"
|
||||
search: "Sök"
|
||||
notifications: "Notifikationer"
|
||||
username: "Användarnamn"
|
||||
password: "Lösenord"
|
||||
forgotPassword: "Glömt lösenord"
|
||||
fetchingAsApObject: "Hämtar från Fediversum..."
|
||||
ok: "OK"
|
||||
gotIt: "Uppfattat!"
|
||||
cancel: "Avbryt"
|
||||
enterUsername: "Ange användarnamn"
|
||||
renotedBy: "Omnoterad av {user}"
|
||||
noNotes: "Inga noteringar"
|
||||
noNotifications: "Inga aviseringar"
|
||||
instance: "Instanser"
|
||||
settings: "Inställningar"
|
||||
basicSettings: "Basinställningar"
|
||||
otherSettings: "Andra inställningar"
|
||||
openInWindow: "Öppna i ett fönster"
|
||||
profile: "Profil"
|
||||
timeline: "Tidslinje"
|
||||
noAccountDescription: "Användaren har inte skrivit en biografi än."
|
||||
login: "Logga in"
|
||||
loggingIn: "Loggar in"
|
||||
logout: "Logga ut"
|
||||
signup: "Registrera"
|
||||
uploading: "Uppladdning sker..."
|
||||
save: "Spara"
|
||||
users: "Användare"
|
||||
addUser: "Lägg till användare"
|
||||
favorite: "Lägg till i favoriter"
|
||||
favorites: "Favoriter"
|
||||
unfavorite: "Avfavorisera"
|
||||
favorited: "Tillagd i favoriter."
|
||||
alreadyFavorited: "Redan tillagd i favoriter."
|
||||
cantFavorite: "Gick inte att lägga till i favoriter."
|
||||
pin: "Fäst till profil"
|
||||
unpin: "Lossa från profil"
|
||||
copyContent: "Kopiera innehåll"
|
||||
copyLink: "Kopiera länk"
|
||||
delete: "Radera"
|
||||
deleteAndEdit: "Radera och ändra"
|
||||
deleteAndEditConfirm: "Är du säker att du vill radera denna not och ändra den? Du kommer förlora alla reaktioner, omnoteringar och svar till den."
|
||||
addToList: "Lägg till i lista"
|
||||
sendMessage: "Skicka ett meddelande"
|
||||
copyUsername: "Kopiera användarnamn"
|
||||
searchUser: "Sök användare"
|
||||
reply: "Svara"
|
||||
loadMore: "Ladda mer"
|
||||
showMore: "Visa mer"
|
||||
youGotNewFollower: "följde dig"
|
||||
receiveFollowRequest: "Följarförfrågan mottagen"
|
||||
followRequestAccepted: "Följarförfrågan accepterad"
|
||||
mention: "Nämn"
|
||||
mentions: "Omnämningar"
|
||||
directNotes: "Direktnoter"
|
||||
importAndExport: "Importera / Exportera"
|
||||
import: "Importera"
|
||||
export: "Exportera"
|
||||
files: "Filer"
|
||||
download: "Nedladdning"
|
||||
driveFileDeleteConfirm: "Är du säker att du vill radera filen \"{name}\"? Noter med denna fil bifogad kommer också raderas."
|
||||
unfollowConfirm: "Är du säker att du vill avfölja {name}?"
|
||||
exportRequested: "Du har begärt en export. Detta kan ta lite tid. Den kommer läggas till i din Drive när den blir klar."
|
||||
importRequested: "Du har begärt en import. Detta kan ta lite tid."
|
||||
lists: "Listor"
|
||||
noLists: "Du har inga listor"
|
||||
note: "Not"
|
||||
notes: "Noter"
|
||||
following: "Följer"
|
||||
followers: "Följare"
|
||||
followsYou: "Följer dig"
|
||||
createList: "Skapa lista"
|
||||
manageLists: "Hantera lista"
|
||||
error: "Fel!"
|
||||
somethingHappened: "Ett fel har uppstått"
|
||||
retry: "Försök igen"
|
||||
pageLoadError: "Det gick inte att ladda sidan."
|
||||
pageLoadErrorDescription: "Detta händer oftast p.g.a. nätverksfel eller din webbläsarcache. Försök tömma din cache och testa sedan igen efter en liten stund."
|
||||
serverIsDead: "Servern svarar inte. Vänta ett litet tag och försök igen."
|
||||
youShouldUpgradeClient: "För att kunna se denna sida, vänligen ladda om sidan för att uppdatera din klient."
|
||||
enterListName: "Skriv ett namn till listan"
|
||||
privacy: "Integritet"
|
||||
makeFollowManuallyApprove: "Följarförfrågningar kräver manuellt godkännande"
|
||||
defaultNoteVisibility: "Standardsynlighet"
|
||||
follow: "Följ"
|
||||
followRequest: "Skicka följarförfrågan"
|
||||
followRequests: "Följarförfrågningar"
|
||||
unfollow: "Avfölj"
|
||||
followRequestPending: "Följarförfrågning avvaktar för svar"
|
||||
enterEmoji: "Skriv en emoji"
|
||||
renote: "Omnotera"
|
||||
unrenote: "Ta tillbaka omnotering"
|
||||
renoted: "Omnoterad."
|
||||
cantRenote: "Inlägget kunde inte bli omnoterat."
|
||||
cantReRenote: "En omnotering kan inte bli omnoterad."
|
||||
quote: "Citat"
|
||||
pinnedNote: "Fästad not"
|
||||
pinned: "Fäst till profil"
|
||||
you: "Du"
|
||||
clickToShow: "Klicka för att visa"
|
||||
sensitive: "Känsligt innehåll"
|
||||
add: "Lägg till"
|
||||
reaction: "Reaktioner"
|
||||
reactionSetting: "Reaktioner som ska visas i reaktionsväljaren"
|
||||
reactionSettingDescription2: "Dra för att omordna, klicka för att radera, tryck \"+\" för att lägga till."
|
||||
rememberNoteVisibility: "Komihåg notvisningsinställningar"
|
||||
attachCancel: "Ta bort bilaga"
|
||||
markAsSensitive: "Markera som känsligt innehåll"
|
||||
unmarkAsSensitive: "Avmarkera som känsligt innehåll"
|
||||
enterFileName: "Ange filnamn"
|
||||
mute: "Tysta"
|
||||
unmute: "Avtysta"
|
||||
block: "Blockera"
|
||||
unblock: "Avblockera"
|
||||
suspend: "Suspendera"
|
||||
unsuspend: "Ta bort suspenderingen"
|
||||
blockConfirm: "Är du säker att du vill blockera kontot?"
|
||||
unblockConfirm: "Är du säkert att du vill avblockera kontot?"
|
||||
suspendConfirm: "Är du säker att du vill suspendera detta konto?"
|
||||
unsuspendConfirm: "Är du säker att du vill avsuspendera detta konto?"
|
||||
selectList: "Välj lista"
|
||||
selectAntenna: "Välj en antenn"
|
||||
selectWidget: "Välj en widget"
|
||||
editWidgets: "Redigera widgets"
|
||||
editWidgetsExit: "Avsluta redigering"
|
||||
customEmojis: "Anpassa emoji"
|
||||
emoji: "Emoji"
|
||||
emojis: "Emoji"
|
||||
emojiName: "Emoji namn"
|
||||
emojiUrl: "Emoji länk"
|
||||
addEmoji: "Lägg till emoji"
|
||||
settingGuide: "Rekommenderade inställningar"
|
||||
cacheRemoteFiles: "Spara externa filer till cachen"
|
||||
cacheRemoteFilesDescription: "När denna inställning är avstängd kommer externa filer laddas direkt från den externa instansen. Genom att stänga av detta kommer lagringsutrymme minska i användning men kommer öka datatrafiken eftersom miniatyrer inte kommer genereras."
|
||||
flagAsBot: "Markera konto som bot"
|
||||
flagAsBotDescription: "Aktivera det här alternativet om kontot är kontrollerat av ett program. Om aktiverat kommer den fungera som en flagga för andra utvecklare för att hindra ändlösa kedjor med andra bottar. Det kommer också få Misskeys interna system att hantera kontot som en bot."
|
||||
flagAsCat: "Markera konto som katt"
|
||||
flagAsCatDescription: "Aktivera denna inställning för att markera kontot som en katt."
|
||||
flagShowTimelineReplies: "Visa svar i tidslinje"
|
||||
flagShowTimelineRepliesDescription: "Visar användarsvar till andra användares noter i tidslinjen om påslagen."
|
||||
autoAcceptFollowed: "Godkänn följarförfrågningar från användare du följer automatiskt"
|
||||
addAccount: "Lägg till konto"
|
||||
loginFailed: "Inloggningen misslyckades"
|
||||
showOnRemote: "Se på extern instans"
|
||||
general: "Allmänt"
|
||||
wallpaper: "Bakgrundsbild"
|
||||
setWallpaper: "Välj bakgrund"
|
||||
removeWallpaper: "Ta bort bakgrund"
|
||||
searchWith: "Sök: {q}"
|
||||
youHaveNoLists: "Du har inga listor"
|
||||
followConfirm: "Är du säker att du vill följa {name}?"
|
||||
proxyAccount: "Proxykonto"
|
||||
proxyAccountDescription: "Ett proxykonto är ett konto som agerar som en extern följare för användare under vissa villkor. Till exempel, när en användare lägger till en extern användare till en lista så kommer den externa användarens aktivitet inte levireras till instansen om ingen lokal användare följer det kontot, så proxykontot används istället."
|
||||
host: "Värd"
|
||||
selectUser: "Välj användare"
|
||||
recipient: "Mottagare"
|
||||
annotation: "Kommentarer"
|
||||
federation: "Federation"
|
||||
instances: "Instanser"
|
||||
registeredAt: "Registrerad på"
|
||||
latestRequestSentAt: "Senaste förfrågan skickad"
|
||||
latestRequestReceivedAt: "Senaste begäran mottagen"
|
||||
latestStatus: "Senaste status"
|
||||
storageUsage: "Använt lagringsutrymme"
|
||||
charts: "Diagram"
|
||||
perHour: "Per timme"
|
||||
perDay: "Per dag"
|
||||
stopActivityDelivery: "Sluta skicka aktiviteter"
|
||||
blockThisInstance: "Blockera instans"
|
||||
operations: "Operationer"
|
||||
software: "Mjukvara"
|
||||
version: "Version"
|
||||
metadata: "Metadata"
|
||||
withNFiles: "{n} fil(er)"
|
||||
monitor: "Övervakning"
|
||||
jobQueue: "Jobbkö"
|
||||
cpuAndMemory: "CPU och minne"
|
||||
network: "Nätverk"
|
||||
disk: "Disk"
|
||||
instanceInfo: "Instansinformation"
|
||||
statistics: "Statistik"
|
||||
clearQueue: "Rensa kö"
|
||||
clearQueueConfirmTitle: "Är du säker att du vill rensa kön?"
|
||||
clearQueueConfirmText: "Om någon not är olevererad i kön kommer den inte federeras. Vanligtvis behövs inte denna handling."
|
||||
clearCachedFiles: "Rensa cache"
|
||||
clearCachedFilesConfirm: "Är du säker att du vill radera alla cachade externa filer?"
|
||||
blockedInstances: "Blockerade instanser"
|
||||
blockedInstancesDescription: "Lista adressnamn av instanser som du vill blockera. Listade instanser kommer inte längre kommunicera med denna instans."
|
||||
muteAndBlock: "Tystningar och blockeringar"
|
||||
mutedUsers: "Tystade användare"
|
||||
blockedUsers: "Blockerade användare"
|
||||
noUsers: "Det finns inga användare"
|
||||
editProfile: "Redigera profil"
|
||||
noteDeleteConfirm: "Är du säker på att du vill ta bort denna not?"
|
||||
pinLimitExceeded: "Du kan inte fästa fler noter"
|
||||
intro: "Misskey har installerats! Vänligen skapa en adminanvändare."
|
||||
done: "Klar"
|
||||
processing: "Bearbetar..."
|
||||
preview: "Förhandsvisning"
|
||||
default: "Standard"
|
||||
noCustomEmojis: "Det finns ingen emoji"
|
||||
noJobs: "Det finns inga jobb"
|
||||
federating: "Federerar"
|
||||
blocked: "Blockerad"
|
||||
suspended: "Suspenderad"
|
||||
all: "Allt"
|
||||
subscribing: "Prenumererar"
|
||||
publishing: "Publiceras"
|
||||
notResponding: "Svarar inte"
|
||||
instanceFollowing: "Följer på instans"
|
||||
instanceFollowers: "Följare av instans"
|
||||
instanceUsers: "Användare av denna instans"
|
||||
changePassword: "Ändra lösenord"
|
||||
security: "Säkerhet"
|
||||
retypedNotMatch: "Inmatningen matchar inte"
|
||||
currentPassword: "Nuvarande lösenord"
|
||||
newPassword: "Nytt lösenord"
|
||||
newPasswordRetype: "Bekräfta lösenord"
|
||||
attachFile: "Bifoga filer"
|
||||
more: "Mer!"
|
||||
featured: "Utvalda"
|
||||
usernameOrUserId: "Användarnamn eller användar-id"
|
||||
noSuchUser: "Kan inte hitta användaren"
|
||||
lookup: "Sökning"
|
||||
announcements: "Nyheter"
|
||||
imageUrl: "Bild-URL"
|
||||
remove: "Radera"
|
||||
removed: "Borttaget"
|
||||
removeAreYouSure: "Är du säker att du vill radera \"{x}\"?"
|
||||
deleteAreYouSure: "Är du säker att du vill radera \"{x}\"?"
|
||||
resetAreYouSure: "Vill du återställa?"
|
||||
saved: "Sparad"
|
||||
messaging: "Chatt"
|
||||
upload: "Ladda upp"
|
||||
keepOriginalUploading: "Behåll originalbild"
|
||||
nsfw: "Känsligt innehåll"
|
||||
pinnedNotes: "Fästad not"
|
||||
userList: "Listor"
|
||||
smtpHost: "Värd"
|
||||
smtpUser: "Användarnamn"
|
||||
smtpPass: "Lösenord"
|
||||
clearCache: "Rensa cache"
|
||||
user: "Användare"
|
||||
searchByGoogle: "Sök"
|
||||
_email:
|
||||
_follow:
|
||||
title: "följde dig"
|
||||
_mfm:
|
||||
mention: "Nämn"
|
||||
quote: "Citat"
|
||||
emoji: "Anpassa emoji"
|
||||
search: "Sök"
|
||||
_theme:
|
||||
keys:
|
||||
mention: "Nämn"
|
||||
renote: "Omnotera"
|
||||
_sfx:
|
||||
note: "Noter"
|
||||
notification: "Notifikationer"
|
||||
chat: "Chatt"
|
||||
_widgets:
|
||||
notifications: "Notifikationer"
|
||||
timeline: "Tidslinje"
|
||||
federation: "Federation"
|
||||
jobQueue: "Jobbkö"
|
||||
_cw:
|
||||
show: "Ladda mer"
|
||||
_visibility:
|
||||
followers: "Följare"
|
||||
_profile:
|
||||
username: "Användarnamn"
|
||||
_exportOrImport:
|
||||
followingList: "Följer"
|
||||
muteList: "Tysta"
|
||||
blockingList: "Blockera"
|
||||
userLists: "Listor"
|
||||
_charts:
|
||||
federation: "Federation"
|
||||
_pages:
|
||||
script:
|
||||
categories:
|
||||
list: "Listor"
|
||||
blocks:
|
||||
_join:
|
||||
arg1: "Listor"
|
||||
_randomPick:
|
||||
arg1: "Listor"
|
||||
_dailyRandomPick:
|
||||
arg1: "Listor"
|
||||
_seedRandomPick:
|
||||
arg2: "Listor"
|
||||
_pick:
|
||||
arg1: "Listor"
|
||||
_listLen:
|
||||
arg1: "Listor"
|
||||
types:
|
||||
array: "Listor"
|
||||
_notification:
|
||||
youWereFollowed: "följde dig"
|
||||
_types:
|
||||
follow: "Följer"
|
||||
mention: "Nämn"
|
||||
renote: "Omnotera"
|
||||
quote: "Citat"
|
||||
reaction: "Reaktioner"
|
||||
_actions:
|
||||
reply: "Svara"
|
||||
renote: "Omnotera"
|
||||
_deck:
|
||||
_columns:
|
||||
notifications: "Notifikationer"
|
||||
tl: "Tidslinje"
|
||||
list: "Listor"
|
||||
mentions: "Omnämningar"
|
|
@ -919,7 +919,6 @@ _sfx:
|
|||
antenna: "Прийом антени"
|
||||
channel: "Повідомлення каналу"
|
||||
_ago:
|
||||
unknown: "Невідомо"
|
||||
future: "Майбутнє"
|
||||
justNow: "Щойно"
|
||||
secondsAgo: "{n}с тому"
|
||||
|
|
|
@ -842,6 +842,7 @@ oneDay: "1 ngày"
|
|||
oneWeek: "1 tuần"
|
||||
reflectMayTakeTime: "Có thể mất một thời gian để điều này được áp dụng."
|
||||
failedToFetchAccountInformation: "Không thể lấy thông tin tài khoản"
|
||||
rateLimitExceeded: "Giới hạn quá mức"
|
||||
_emailUnavailable:
|
||||
used: "Địa chỉ email đã được sử dụng"
|
||||
format: "Địa chỉ email không hợp lệ"
|
||||
|
@ -1087,7 +1088,6 @@ _sfx:
|
|||
antenna: "Trạm phát sóng"
|
||||
channel: "Kênh"
|
||||
_ago:
|
||||
unknown: "Không rõ"
|
||||
future: "Tương lai"
|
||||
justNow: "Vừa xong"
|
||||
secondsAgo: "{n}s trước"
|
||||
|
@ -1131,6 +1131,7 @@ _2fa:
|
|||
registerKey: "Đăng ký một mã bảo vệ"
|
||||
step1: "Trước tiên, hãy cài đặt một ứng dụng xác minh (chẳng hạn như {a} hoặc {b}) trên thiết bị của bạn."
|
||||
step2: "Sau đó, quét mã QR hiển thị trên màn hình này."
|
||||
step2Url: "Bạn cũng có thể nhập URL này nếu sử dụng một chương trình máy tính:"
|
||||
step3: "Nhập mã token do ứng dụng của bạn cung cấp để hoàn tất thiết lập."
|
||||
step4: "Kể từ bây giờ, những lần đăng nhập trong tương lai sẽ yêu cầu mã token đăng nhập đó."
|
||||
securityKeyInfo: "Bên cạnh xác minh bằng vân tay hoặc mã PIN, bạn cũng có thể thiết lập xác minh thông qua khóa bảo mật phần cứng hỗ trợ FIDO2 để bảo mật hơn nữa cho tài khoản của mình."
|
||||
|
|
|
@ -1087,7 +1087,6 @@ _sfx:
|
|||
antenna: "天线接收"
|
||||
channel: "频道通知"
|
||||
_ago:
|
||||
unknown: "未知"
|
||||
future: "未来"
|
||||
justNow: "最近"
|
||||
secondsAgo: "{n}秒前"
|
||||
|
@ -1131,6 +1130,7 @@ _2fa:
|
|||
registerKey: "注册密钥"
|
||||
step1: "首先,在您的设备上安装验证应用,例如{a}或{b}。"
|
||||
step2: "然后,扫描屏幕上显示的二维码。"
|
||||
step2Url: "在桌面应用程序中输入以下URL:"
|
||||
step3: "输入您的应用提供的动态口令以完成设置。"
|
||||
step4: "从现在开始,任何登录操作都将要求您提供动态口令。"
|
||||
securityKeyInfo: "您可以设置使用支持FIDO2的硬件安全密钥、设备上的指纹或PIN来保护您的登录过程。"
|
||||
|
|
|
@ -1087,7 +1087,6 @@ _sfx:
|
|||
antenna: "天線接收"
|
||||
channel: "頻道通知"
|
||||
_ago:
|
||||
unknown: "未知"
|
||||
future: "未來"
|
||||
justNow: "剛剛"
|
||||
secondsAgo: "{n}秒前"
|
||||
|
@ -1131,6 +1130,7 @@ _2fa:
|
|||
registerKey: "註冊鍵"
|
||||
step1: "首先,在您的設備上安裝二步驗證程式,例如{a}或{b}。"
|
||||
step2: "然後,掃描螢幕上的QR code。"
|
||||
step2Url: "在桌面版應用中,請輸入以下的URL:"
|
||||
step3: "輸入您的App提供的權杖以完成設定。"
|
||||
step4: "從現在開始,任何登入操作都將要求您提供權杖。"
|
||||
securityKeyInfo: "您可以設定使用支援FIDO2的硬體安全鎖、終端設備的指纹認證或者PIN碼來登入。"
|
||||
|
|
10
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "misskey",
|
||||
"version": "12.110.1",
|
||||
"version": "12.111.1-test.1",
|
||||
"codename": "indigo",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -19,7 +19,7 @@
|
|||
"watch": "npm run dev",
|
||||
"dev": "node ./scripts/dev.js",
|
||||
"lint": "node ./scripts/lint.js",
|
||||
"cy:open": "cypress open",
|
||||
"cy:open": "cypress open --browser --e2e --config-file=cypress.config.ts",
|
||||
"cy:run": "cypress run",
|
||||
"e2e": "start-server-and-test start:test http://localhost:61812 cy:run",
|
||||
"mocha": "cd packages/backend && cross-env NODE_ENV=test TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" npx mocha",
|
||||
|
@ -41,10 +41,10 @@
|
|||
"devDependencies": {
|
||||
"@types/gulp": "4.0.9",
|
||||
"@types/gulp-rename": "2.0.1",
|
||||
"@typescript-eslint/parser": "5.18.0",
|
||||
"@typescript-eslint/parser": "5.27.1",
|
||||
"cross-env": "7.0.3",
|
||||
"cypress": "9.5.3",
|
||||
"cypress": "10.0.3",
|
||||
"start-server-and-test": "1.14.0",
|
||||
"typescript": "4.6.3"
|
||||
"typescript": "4.7.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"loader=./test/loader.js"
|
||||
],
|
||||
"slow": 1000,
|
||||
"timeout": 3000,
|
||||
"timeout": 10000,
|
||||
"exit": true
|
||||
}
|
||||
|
|
5
packages/backend/assets/notification-badges/LICENSE
Normal file
|
@ -0,0 +1,5 @@
|
|||
Font Awesome Icons
|
||||
-------------------------
|
||||
|
||||
Ⓒ Font Awesome
|
||||
CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
|
BIN
packages/backend/assets/notification-badges/at.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
packages/backend/assets/notification-badges/check.png
Normal file
After Width: | Height: | Size: 577 B |
After Width: | Height: | Size: 1.4 KiB |
BIN
packages/backend/assets/notification-badges/clock.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
packages/backend/assets/notification-badges/comments.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
packages/backend/assets/notification-badges/id-card-alt.png
Normal file
After Width: | Height: | Size: 844 B |
BIN
packages/backend/assets/notification-badges/null.png
Normal file
After Width: | Height: | Size: 174 B |
BIN
packages/backend/assets/notification-badges/plus.png
Normal file
After Width: | Height: | Size: 507 B |
BIN
packages/backend/assets/notification-badges/poll-h.png
Normal file
After Width: | Height: | Size: 689 B |
BIN
packages/backend/assets/notification-badges/quote-right.png
Normal file
After Width: | Height: | Size: 772 B |
BIN
packages/backend/assets/notification-badges/reply.png
Normal file
After Width: | Height: | Size: 930 B |
BIN
packages/backend/assets/notification-badges/retweet.png
Normal file
After Width: | Height: | Size: 798 B |
BIN
packages/backend/assets/notification-badges/user-plus.png
Normal file
After Width: | Height: | Size: 991 B |
|
@ -14,7 +14,7 @@
|
|||
"lodash": "^4.17.21"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bull-board/koa": "3.10.4",
|
||||
"@bull-board/koa": "3.11.1",
|
||||
"@discordapp/twemoji": "14.0.2",
|
||||
"@elastic/elasticsearch": "7.11.0",
|
||||
"@koa/cors": "3.1.0",
|
||||
|
@ -28,10 +28,9 @@
|
|||
"archiver": "5.3.1",
|
||||
"autobind-decorator": "2.4.0",
|
||||
"autwh": "0.1.0",
|
||||
"aws-sdk": "2.1135.0",
|
||||
"aws-sdk": "2.1152.0",
|
||||
"bcryptjs": "2.4.3",
|
||||
"blurhash": "1.1.5",
|
||||
"broadcast-channel": "4.12.0",
|
||||
"bull": "4.8.3",
|
||||
"cacheable-lookup": "6.0.4",
|
||||
"cbor": "8.1.0",
|
||||
|
@ -44,18 +43,18 @@
|
|||
"deep-email-validator": "0.1.21",
|
||||
"escape-regexp": "0.0.1",
|
||||
"feed": "4.2.2",
|
||||
"file-type": "17.1.1",
|
||||
"file-type": "17.1.2",
|
||||
"fluent-ffmpeg": "2.1.2",
|
||||
"got": "12.0.4",
|
||||
"got": "12.1.0",
|
||||
"hpagent": "0.1.2",
|
||||
"ip-cidr": "3.0.8",
|
||||
"ip-cidr": "3.0.10",
|
||||
"is-svg": "4.3.2",
|
||||
"js-yaml": "4.1.0",
|
||||
"jsdom": "19.0.0",
|
||||
"json5": "2.2.1",
|
||||
"json5-loader": "4.0.1",
|
||||
"jsonld": "5.2.0",
|
||||
"jsrsasign": "10.5.22",
|
||||
"jsonld": "6.0.0",
|
||||
"jsrsasign": "10.5.24",
|
||||
"koa": "2.13.4",
|
||||
"koa-bodyparser": "4.3.0",
|
||||
"koa-favicon": "2.1.0",
|
||||
|
@ -72,7 +71,7 @@
|
|||
"ms": "3.0.0-canary.1",
|
||||
"multer": "1.4.4",
|
||||
"nested-property": "4.0.0",
|
||||
"node-fetch": "3.2.4",
|
||||
"node-fetch": "3.2.6",
|
||||
"nodemailer": "6.7.5",
|
||||
"os-utils": "0.0.14",
|
||||
"parse5": "6.0.1",
|
||||
|
@ -101,14 +100,14 @@
|
|||
"strict-event-emitter-types": "2.0.0",
|
||||
"stringz": "2.1.0",
|
||||
"style-loader": "3.3.1",
|
||||
"summaly": "2.5.0",
|
||||
"summaly": "2.6.0",
|
||||
"syslog-pro": "1.0.0",
|
||||
"systeminformation": "5.11.15",
|
||||
"systeminformation": "5.11.16",
|
||||
"tinycolor2": "1.4.2",
|
||||
"tmp": "0.2.1",
|
||||
"ts-loader": "9.3.0",
|
||||
"ts-node": "10.8.0",
|
||||
"tsc-alias": "1.6.7",
|
||||
"ts-node": "10.8.1",
|
||||
"tsc-alias": "1.6.9",
|
||||
"tsconfig-paths": "4.0.0",
|
||||
"twemoji-parser": "14.0.0",
|
||||
"typeorm": "0.3.6",
|
||||
|
@ -117,7 +116,7 @@
|
|||
"uuid": "8.3.2",
|
||||
"web-push": "3.5.0",
|
||||
"websocket": "1.0.34",
|
||||
"ws": "8.6.0",
|
||||
"ws": "8.8.0",
|
||||
"xev": "3.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -145,7 +144,7 @@
|
|||
"@types/koa__multer": "2.0.4",
|
||||
"@types/koa__router": "8.0.11",
|
||||
"@types/mocha": "9.1.1",
|
||||
"@types/node": "17.0.35",
|
||||
"@types/node": "17.0.41",
|
||||
"@types/node-fetch": "3.0.3",
|
||||
"@types/nodemailer": "6.4.4",
|
||||
"@types/oauth": "0.9.1",
|
||||
|
@ -167,12 +166,11 @@
|
|||
"@types/web-push": "3.3.2",
|
||||
"@types/websocket": "1.0.5",
|
||||
"@types/ws": "8.5.3",
|
||||
"@typescript-eslint/eslint-plugin": "5.26.0",
|
||||
"@typescript-eslint/parser": "5.26.0",
|
||||
"typescript": "4.7.2",
|
||||
"eslint": "8.16.0",
|
||||
"@typescript-eslint/eslint-plugin": "5.27.1",
|
||||
"@typescript-eslint/parser": "5.27.1",
|
||||
"typescript": "4.7.3",
|
||||
"eslint": "8.17.0",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
|
||||
"cross-env": "7.0.3",
|
||||
"execa": "6.1.0"
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ export default function load() {
|
|||
mixin.authUrl = `${mixin.scheme}://${mixin.host}/auth`;
|
||||
mixin.driveUrl = `${mixin.scheme}://${mixin.host}/files`;
|
||||
mixin.userAgent = `Misskey/${meta.version} (${config.url})`;
|
||||
mixin.clientEntry = clientManifest['src/init.ts'].file.replace(/^_client_dist_\//, '');
|
||||
mixin.clientEntry = clientManifest['src/init.ts'];
|
||||
|
||||
if (!config.redis.prefix) config.redis.prefix = mixin.host;
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@ import { entities as charts } from '@/services/chart/entities.js';
|
|||
import { Webhook } from '@/models/entities/webhook.js';
|
||||
import { envOption } from '../env.js';
|
||||
import { dbLogger } from './logger.js';
|
||||
import { redisClient } from './redis.js';
|
||||
|
||||
const sqlLogger = dbLogger.createSubLogger('sql', 'gray', false);
|
||||
|
||||
|
@ -207,7 +208,15 @@ export const db = new DataSource({
|
|||
migrations: ['../../migration/*.js'],
|
||||
});
|
||||
|
||||
export async function initDb() {
|
||||
export async function initDb(force = false) {
|
||||
if (force) {
|
||||
if (db.isInitialized) {
|
||||
await db.destroy();
|
||||
}
|
||||
await db.initialize();
|
||||
return;
|
||||
}
|
||||
|
||||
if (db.isInitialized) {
|
||||
// nop
|
||||
} else {
|
||||
|
@ -217,6 +226,7 @@ export async function initDb() {
|
|||
|
||||
export async function resetDb() {
|
||||
const reset = async () => {
|
||||
await redisClient.FLUSHDB();
|
||||
const tables = await db.query(`SELECT relname AS "table"
|
||||
FROM pg_class C LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
|
||||
WHERE nspname NOT IN ('pg_catalog', 'information_schema')
|
||||
|
|
|
@ -6,6 +6,9 @@ const urlRegex = /^https?:\/\/[\w\/:%#@$&?!()\[\]~.,=+\-]+/;
|
|||
const urlRegexFull = /^https?:\/\/[\w\/:%#@$&?!()\[\]~.,=+\-]+$/;
|
||||
|
||||
export function fromHtml(html: string, hashtagNames?: string[]): string {
|
||||
// some AP servers like Pixelfed use br tags as well as newlines
|
||||
html = html.replace(/<br\s?\/?>\r?\n/gi, '\n');
|
||||
|
||||
const dom = parse5.parseFragment(html);
|
||||
|
||||
let text = '';
|
||||
|
|
|
@ -11,9 +11,14 @@ export function createTemp(): Promise<[string, () => void]> {
|
|||
|
||||
export function createTempDir(): Promise<[string, () => void]> {
|
||||
return new Promise<[string, () => void]>((res, rej) => {
|
||||
tmp.dir((e, path, cleanup) => {
|
||||
tmp.dir(
|
||||
{
|
||||
unsafeCleanup: true,
|
||||
},
|
||||
(e, path, cleanup) => {
|
||||
if (e) return rej(e);
|
||||
res([path, cleanup]);
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
9
packages/backend/src/misc/get-ip-hash.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
import IPCIDR from 'ip-cidr';
|
||||
|
||||
export function getIpHash(ip: string) {
|
||||
// because a single person may control many IPv6 addresses,
|
||||
// only a /64 subnet prefix of any IP will be taken into account.
|
||||
// (this means for IPv4 the entire address is used)
|
||||
const prefix = IPCIDR.createAddress(ip).mask(64);
|
||||
return 'ip-' + BigInt('0b' + prefix).toString(36);
|
||||
}
|
8
packages/backend/src/misc/is-mime-image.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { FILE_TYPE_BROWSERSAFE } from '@/const.js';
|
||||
|
||||
const dictionary = {
|
||||
'safe-file': FILE_TYPE_BROWSERSAFE,
|
||||
'sharp-convertible-image': ['image/jpeg', 'image/png', 'image/gif', 'image/apng', 'image/vnd.mozilla.apng', 'image/webp', 'image/svg+xml'],
|
||||
};
|
||||
|
||||
export const isMimeImage = (mime: string, type: keyof typeof dictionary): boolean => dictionary[type].includes(mime);
|
|
@ -29,7 +29,9 @@ export const DriveFileRepository = db.getRepository(DriveFile).extend({
|
|||
|
||||
getPublicProperties(file: DriveFile): DriveFile['properties'] {
|
||||
if (file.properties.orientation != null) {
|
||||
const properties = structuredClone(file.properties);
|
||||
// TODO
|
||||
//const properties = structuredClone(file.properties);
|
||||
const properties = JSON.parse(JSON.stringify(file.properties));
|
||||
if (file.properties.orientation >= 5) {
|
||||
[properties.width, properties.height] = [properties.height, properties.width];
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ export const InstanceRepository = db.getRepository(Instance).extend({
|
|||
maintainerName: instance.maintainerName,
|
||||
maintainerEmail: instance.maintainerEmail,
|
||||
iconUrl: instance.iconUrl,
|
||||
faviconUrl: instance.faviconUrl,
|
||||
infoUpdatedAt: instance.infoUpdatedAt ? instance.infoUpdatedAt.toISOString() : null,
|
||||
};
|
||||
},
|
||||
|
|
|
@ -136,6 +136,7 @@ async function populateMyReaction(note: Note, meId: User['id'], _hint_?: {
|
|||
|
||||
export const NoteRepository = db.getRepository(Note).extend({
|
||||
async isVisibleForMe(note: Note, meId: User['id'] | null): Promise<boolean> {
|
||||
// This code must always be synchronized with the checks in generateVisibilityQuery.
|
||||
// visibility が specified かつ自分が指定されていなかったら非表示
|
||||
if (note.visibility === 'specified') {
|
||||
if (meId == null) {
|
||||
|
@ -144,13 +145,7 @@ export const NoteRepository = db.getRepository(Note).extend({
|
|||
return true;
|
||||
} else {
|
||||
// 指定されているかどうか
|
||||
const specified = note.visibleUserIds.some((id: any) => meId === id);
|
||||
|
||||
if (specified) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return note.visibleUserIds.some((id: any) => meId === id);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -169,9 +164,12 @@ export const NoteRepository = db.getRepository(Note).extend({
|
|||
} else {
|
||||
// フォロワーかどうか
|
||||
const [following, user] = await Promise.all([
|
||||
Followings.findOneBy({
|
||||
Followings.count({
|
||||
where: {
|
||||
followeeId: note.userId,
|
||||
followerId: meId,
|
||||
},
|
||||
take: 1,
|
||||
}),
|
||||
Users.findOneByOrFail({ id: meId }),
|
||||
]);
|
||||
|
@ -183,7 +181,7 @@ export const NoteRepository = db.getRepository(Note).extend({
|
|||
in which case we can never know the following. Instead we have
|
||||
to assume that the users are following each other.
|
||||
*/
|
||||
return following != null || (note.userHost != null && user.host != null);
|
||||
return following > 0 || (note.userHost != null && user.host != null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,47 +61,58 @@ export const UserRepository = db.getRepository(User).extend({
|
|||
//#endregion
|
||||
|
||||
async getRelation(me: User['id'], target: User['id']) {
|
||||
const [following1, following2, followReq1, followReq2, toBlocking, fromBlocked, mute] = await Promise.all([
|
||||
Followings.findOneBy({
|
||||
return awaitAll({
|
||||
id: target,
|
||||
isFollowing: Followings.count({
|
||||
where: {
|
||||
followerId: me,
|
||||
followeeId: target,
|
||||
}),
|
||||
Followings.findOneBy({
|
||||
},
|
||||
take: 1,
|
||||
}).then(n => n > 0),
|
||||
isFollowed: Followings.count({
|
||||
where: {
|
||||
followerId: target,
|
||||
followeeId: me,
|
||||
}),
|
||||
FollowRequests.findOneBy({
|
||||
},
|
||||
take: 1,
|
||||
}).then(n => n > 0),
|
||||
hasPendingFollowRequestFromYou: FollowRequests.count({
|
||||
where: {
|
||||
followerId: me,
|
||||
followeeId: target,
|
||||
}),
|
||||
FollowRequests.findOneBy({
|
||||
},
|
||||
take: 1,
|
||||
}).then(n => n > 0),
|
||||
hasPendingFollowRequestToYou: FollowRequests.count({
|
||||
where: {
|
||||
followerId: target,
|
||||
followeeId: me,
|
||||
}),
|
||||
Blockings.findOneBy({
|
||||
},
|
||||
take: 1,
|
||||
}).then(n => n > 0),
|
||||
isBlocking: Blockings.count({
|
||||
where: {
|
||||
blockerId: me,
|
||||
blockeeId: target,
|
||||
}),
|
||||
Blockings.findOneBy({
|
||||
},
|
||||
take: 1,
|
||||
}).then(n => n > 0),
|
||||
isBlocked: Blockings.count({
|
||||
where: {
|
||||
blockerId: target,
|
||||
blockeeId: me,
|
||||
}),
|
||||
Mutings.findOneBy({
|
||||
},
|
||||
take: 1,
|
||||
}).then(n => n > 0),
|
||||
isMuted: Mutings.count({
|
||||
where: {
|
||||
muterId: me,
|
||||
muteeId: target,
|
||||
}),
|
||||
]);
|
||||
|
||||
return {
|
||||
id: target,
|
||||
isFollowing: following1 != null,
|
||||
hasPendingFollowRequestFromYou: followReq1 != null,
|
||||
hasPendingFollowRequestToYou: followReq2 != null,
|
||||
isFollowed: following2 != null,
|
||||
isBlocking: toBlocking != null,
|
||||
isBlocked: fromBlocked != null,
|
||||
isMuted: mute != null,
|
||||
};
|
||||
},
|
||||
take: 1,
|
||||
}).then(n => n > 0),
|
||||
});
|
||||
},
|
||||
|
||||
async getHasUnreadMessagingMessage(userId: User['id']): Promise<boolean> {
|
||||
|
|
|
@ -88,6 +88,11 @@ export const packedFederationInstanceSchema = {
|
|||
optional: false, nullable: true,
|
||||
format: 'url',
|
||||
},
|
||||
faviconUrl: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
format: 'url',
|
||||
},
|
||||
infoUpdatedAt: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
|
|
|
@ -305,11 +305,13 @@ export default function() {
|
|||
systemQueue.add('resyncCharts', {
|
||||
}, {
|
||||
repeat: { cron: '0 0 * * *' },
|
||||
removeOnComplete: true,
|
||||
});
|
||||
|
||||
systemQueue.add('cleanCharts', {
|
||||
}, {
|
||||
repeat: { cron: '0 0 * * *' },
|
||||
removeOnComplete: true,
|
||||
});
|
||||
|
||||
systemQueue.add('checkExpiredMutings', {
|
||||
|
|
|
@ -9,7 +9,7 @@ import { addFile } from '@/services/drive/add-file.js';
|
|||
import { format as dateFormat } from 'date-fns';
|
||||
import { Users, Emojis } from '@/models/index.js';
|
||||
import { } from '@/queue/types.js';
|
||||
import { createTempDir } from '@/misc/create-temp.js';
|
||||
import { createTemp, createTempDir } from '@/misc/create-temp.js';
|
||||
import { downloadUrl } from '@/misc/download-url.js';
|
||||
import config from '@/config/index.js';
|
||||
import { IsNull } from 'typeorm';
|
||||
|
|
|
@ -5,14 +5,52 @@ import { User, IRemoteUser, CacheableRemoteUser, CacheableUser } from '@/models/
|
|||
import { UserPublickey } from '@/models/entities/user-publickey.js';
|
||||
import { MessagingMessage } from '@/models/entities/messaging-message.js';
|
||||
import { Notes, Users, UserPublickeys, MessagingMessages } from '@/models/index.js';
|
||||
import { IObject, getApId } from './type.js';
|
||||
import { resolvePerson } from './models/person.js';
|
||||
import { Cache } from '@/misc/cache.js';
|
||||
import { uriPersonCache, userByIdCache } from '@/services/user-cache.js';
|
||||
import { IObject, getApId } from './type.js';
|
||||
import { resolvePerson } from './models/person.js';
|
||||
|
||||
const publicKeyCache = new Cache<UserPublickey | null>(Infinity);
|
||||
const publicKeyByUserIdCache = new Cache<UserPublickey | null>(Infinity);
|
||||
|
||||
export type UriParseResult = {
|
||||
/** wether the URI was generated by us */
|
||||
local: true;
|
||||
/** id in DB */
|
||||
id: string;
|
||||
/** hint of type, e.g. "notes", "users" */
|
||||
type: string;
|
||||
/** any remaining text after type and id, not including the slash after id. undefined if empty */
|
||||
rest?: string;
|
||||
} | {
|
||||
/** wether the URI was generated by us */
|
||||
local: false;
|
||||
/** uri in DB */
|
||||
uri: string;
|
||||
};
|
||||
|
||||
export function parseUri(value: string | IObject): UriParseResult {
|
||||
const uri = getApId(value);
|
||||
|
||||
// the host part of a URL is case insensitive, so use the 'i' flag.
|
||||
const localRegex = new RegExp('^' + escapeRegexp(config.url) + '/(\\w+)/(\\w+)(?:\/(.+))?', 'i');
|
||||
const matchLocal = uri.match(localRegex);
|
||||
|
||||
if (matchLocal) {
|
||||
return {
|
||||
local: true,
|
||||
type: matchLocal[1],
|
||||
id: matchLocal[2],
|
||||
rest: matchLocal[3],
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
local: false,
|
||||
uri,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export default class DbResolver {
|
||||
constructor() {
|
||||
}
|
||||
|
@ -21,60 +59,54 @@ export default class DbResolver {
|
|||
* AP Note => Misskey Note in DB
|
||||
*/
|
||||
public async getNoteFromApId(value: string | IObject): Promise<Note | null> {
|
||||
const parsed = this.parseUri(value);
|
||||
const parsed = parseUri(value);
|
||||
|
||||
if (parsed.local) {
|
||||
if (parsed.type !== 'notes') return null;
|
||||
|
||||
if (parsed.id) {
|
||||
return await Notes.findOneBy({
|
||||
id: parsed.id,
|
||||
});
|
||||
}
|
||||
|
||||
if (parsed.uri) {
|
||||
} else {
|
||||
return await Notes.findOneBy({
|
||||
uri: parsed.uri,
|
||||
});
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public async getMessageFromApId(value: string | IObject): Promise<MessagingMessage | null> {
|
||||
const parsed = this.parseUri(value);
|
||||
const parsed = parseUri(value);
|
||||
|
||||
if (parsed.local) {
|
||||
if (parsed.type !== 'notes') return null;
|
||||
|
||||
if (parsed.id) {
|
||||
return await MessagingMessages.findOneBy({
|
||||
id: parsed.id,
|
||||
});
|
||||
}
|
||||
|
||||
if (parsed.uri) {
|
||||
} else {
|
||||
return await MessagingMessages.findOneBy({
|
||||
uri: parsed.uri,
|
||||
});
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* AP Person => Misskey User in DB
|
||||
*/
|
||||
public async getUserFromApId(value: string | IObject): Promise<CacheableUser | null> {
|
||||
const parsed = this.parseUri(value);
|
||||
const parsed = parseUri(value);
|
||||
|
||||
if (parsed.local) {
|
||||
if (parsed.type !== 'users') return null;
|
||||
|
||||
if (parsed.id) {
|
||||
return await userByIdCache.fetchMaybe(parsed.id, () => Users.findOneBy({
|
||||
id: parsed.id,
|
||||
}).then(x => x ?? undefined)) ?? null;
|
||||
}
|
||||
|
||||
if (parsed.uri) {
|
||||
} else {
|
||||
return await uriPersonCache.fetch(parsed.uri, () => Users.findOneBy({
|
||||
uri: parsed.uri,
|
||||
}));
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -120,31 +152,4 @@ export default class DbResolver {
|
|||
key,
|
||||
};
|
||||
}
|
||||
|
||||
public parseUri(value: string | IObject): UriParseResult {
|
||||
const uri = getApId(value);
|
||||
|
||||
const localRegex = new RegExp('^' + escapeRegexp(config.url) + '/' + '(\\w+)' + '/' + '(\\w+)');
|
||||
const matchLocal = uri.match(localRegex);
|
||||
|
||||
if (matchLocal) {
|
||||
return {
|
||||
type: matchLocal[1],
|
||||
id: matchLocal[2],
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
uri,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type UriParseResult = {
|
||||
/** id in DB (local object only) */
|
||||
id?: string;
|
||||
/** uri in DB (remote object only) */
|
||||
uri?: string;
|
||||
/** hint of type (local object only, ex: notes, users) */
|
||||
type?: string
|
||||
};
|
||||
|
|
|
@ -3,8 +3,6 @@ import { Note } from '@/models/entities/note.js';
|
|||
import { toHtml } from '../../../mfm/to-html.js';
|
||||
|
||||
export default function(note: Note) {
|
||||
let html = note.text ? toHtml(mfm.parse(note.text), JSON.parse(note.mentionedRemoteUsers)) : null;
|
||||
if (html == null) html = '<p>.</p>';
|
||||
|
||||
return html;
|
||||
if (!note.text) return '';
|
||||
return toHtml(mfm.parse(note.text), JSON.parse(note.mentionedRemoteUsers));
|
||||
}
|
||||
|
|
|
@ -3,9 +3,9 @@ import promiseLimit from 'promise-limit';
|
|||
import config from '@/config/index.js';
|
||||
import Resolver from '../resolver.js';
|
||||
import post from '@/services/note/create.js';
|
||||
import { resolvePerson, updatePerson } from './person.js';
|
||||
import { resolvePerson } from './person.js';
|
||||
import { resolveImage } from './image.js';
|
||||
import { CacheableRemoteUser, IRemoteUser } from '@/models/entities/user.js';
|
||||
import { CacheableRemoteUser } from '@/models/entities/user.js';
|
||||
import { htmlToMfm } from '../misc/html-to-mfm.js';
|
||||
import { extractApHashtags } from './tag.js';
|
||||
import { unique, toArray, toSingle } from '@/prelude/array.js';
|
||||
|
@ -15,7 +15,7 @@ import { apLogger } from '../logger.js';
|
|||
import { DriveFile } from '@/models/entities/drive-file.js';
|
||||
import { deliverQuestionUpdate } from '@/services/note/polls/update.js';
|
||||
import { extractDbHost, toPuny } from '@/misc/convert-host.js';
|
||||
import { Emojis, Polls, MessagingMessages, Users } from '@/models/index.js';
|
||||
import { Emojis, Polls, MessagingMessages } from '@/models/index.js';
|
||||
import { Note } from '@/models/entities/note.js';
|
||||
import { IObject, getOneApId, getApId, getOneApHrefNullable, validPost, IPost, isEmoji, getApType } from '../type.js';
|
||||
import { Emoji } from '@/models/entities/emoji.js';
|
||||
|
@ -197,7 +197,14 @@ export async function createNote(value: string | IObject, resolver?: Resolver, s
|
|||
const cw = note.summary === '' ? null : note.summary;
|
||||
|
||||
// テキストのパース
|
||||
const text = typeof note._misskey_content !== 'undefined' ? note._misskey_content : (note.content ? htmlToMfm(note.content, note.tag) : null);
|
||||
let text: string | null = null;
|
||||
if (note.source?.mediaType === 'text/x.misskeymarkdown' && typeof note.source?.content === 'string') {
|
||||
text = note.source.content;
|
||||
} else if (typeof note._misskey_content !== 'undefined') {
|
||||
text = note._misskey_content;
|
||||
} else if (typeof note.content === 'string') {
|
||||
text = htmlToMfm(note.content, note.tag);
|
||||
}
|
||||
|
||||
// vote
|
||||
if (reply && reply.hasPoll) {
|
||||
|
|
|
@ -1,8 +1,20 @@
|
|||
import config from '@/config/index.js';
|
||||
import { ILocalUser, IRemoteUser } from '@/models/entities/user.js';
|
||||
import { Blocking } from '@/models/entities/blocking.js';
|
||||
|
||||
export default (blocker: ILocalUser, blockee: IRemoteUser) => ({
|
||||
/**
|
||||
* Renders a block into its ActivityPub representation.
|
||||
*
|
||||
* @param block The block to be rendered. The blockee relation must be loaded.
|
||||
*/
|
||||
export function renderBlock(block: Blocking) {
|
||||
if (block.blockee?.url == null) {
|
||||
throw new Error('renderBlock: missing blockee uri');
|
||||
}
|
||||
|
||||
return {
|
||||
type: 'Block',
|
||||
actor: `${config.url}/users/${blocker.id}`,
|
||||
object: blockee.uri,
|
||||
});
|
||||
id: `${config.url}/blocks/${block.id}`,
|
||||
actor: `${config.url}/users/${block.blockerId}`,
|
||||
object: block.blockee.uri,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,12 +4,11 @@ import { Users } from '@/models/index.js';
|
|||
|
||||
export default (follower: { id: User['id']; host: User['host']; uri: User['host'] }, followee: { id: User['id']; host: User['host']; uri: User['host'] }, requestId?: string) => {
|
||||
const follow = {
|
||||
id: requestId ?? `${config.url}/follows/${follower.id}/${followee.id}`,
|
||||
type: 'Follow',
|
||||
actor: Users.isLocalUser(follower) ? `${config.url}/users/${follower.id}` : follower.uri,
|
||||
object: Users.isLocalUser(followee) ? `${config.url}/users/${followee.id}` : followee.uri,
|
||||
} as any;
|
||||
|
||||
if (requestId) follow.id = requestId;
|
||||
|
||||
return follow;
|
||||
};
|
||||
|
|
|
@ -8,7 +8,7 @@ import { User } from '@/models/entities/user.js';
|
|||
export const renderActivity = (x: any): IActivity | null => {
|
||||
if (x == null) return null;
|
||||
|
||||
if (x !== null && typeof x === 'object' && x.id == null) {
|
||||
if (typeof x === 'object' && x.id == null) {
|
||||
x.id = `${config.url}/${uuid()}`;
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ export default async function renderNote(note: Note, dive = true, isTalk = false
|
|||
|
||||
const files = await getPromisedFiles(note.fileIds);
|
||||
|
||||
const text = note.text;
|
||||
const text = note.text ?? '';
|
||||
let poll: Poll | null = null;
|
||||
|
||||
if (note.hasPoll) {
|
||||
|
@ -90,7 +90,6 @@ export default async function renderNote(note: Note, dive = true, isTalk = false
|
|||
}
|
||||
|
||||
let apText = text;
|
||||
if (apText == null) apText = '';
|
||||
|
||||
if (quote) {
|
||||
apText += `\n\nRE: ${quote}`;
|
||||
|
@ -138,6 +137,10 @@ export default async function renderNote(note: Note, dive = true, isTalk = false
|
|||
summary,
|
||||
content,
|
||||
_misskey_content: text,
|
||||
source: {
|
||||
content: text,
|
||||
mediaType: "text/x.misskeymarkdown",
|
||||
},
|
||||
_misskey_quote: quote,
|
||||
quoteUrl: quote,
|
||||
published: note.createdAt.toISOString(),
|
||||
|
|
|
@ -3,9 +3,18 @@ import { getJson } from '@/misc/fetch.js';
|
|||
import { ILocalUser } from '@/models/entities/user.js';
|
||||
import { getInstanceActor } from '@/services/instance-actor.js';
|
||||
import { fetchMeta } from '@/misc/fetch-meta.js';
|
||||
import { extractDbHost } from '@/misc/convert-host.js';
|
||||
import { extractDbHost, isSelfHost } from '@/misc/convert-host.js';
|
||||
import { signedGet } from './request.js';
|
||||
import { IObject, isCollectionOrOrderedCollection, ICollection, IOrderedCollection } from './type.js';
|
||||
import { FollowRequests, Notes, NoteReactions, Polls, Users } from '@/models/index.js';
|
||||
import { parseUri } from './db-resolver.js';
|
||||
import renderNote from '@/remote/activitypub/renderer/note.js';
|
||||
import { renderLike } from '@/remote/activitypub/renderer/like.js';
|
||||
import { renderPerson } from '@/remote/activitypub/renderer/person.js';
|
||||
import renderQuestion from '@/remote/activitypub/renderer/question.js';
|
||||
import renderCreate from '@/remote/activitypub/renderer/create.js';
|
||||
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
|
||||
import renderFollow from '@/remote/activitypub/renderer/follow.js';
|
||||
|
||||
export default class Resolver {
|
||||
private history: Set<string>;
|
||||
|
@ -40,14 +49,25 @@ export default class Resolver {
|
|||
return value;
|
||||
}
|
||||
|
||||
if (value.includes('#')) {
|
||||
// URLs with fragment parts cannot be resolved correctly because
|
||||
// the fragment part does not get transmitted over HTTP(S).
|
||||
// Avoid strange behaviour by not trying to resolve these at all.
|
||||
throw new Error(`cannot resolve URL with fragment: ${value}`);
|
||||
}
|
||||
|
||||
if (this.history.has(value)) {
|
||||
throw new Error('cannot resolve already resolved one');
|
||||
}
|
||||
|
||||
this.history.add(value);
|
||||
|
||||
const meta = await fetchMeta();
|
||||
const host = extractDbHost(value);
|
||||
if (isSelfHost(host)) {
|
||||
return await this.resolveLocal(value);
|
||||
}
|
||||
|
||||
const meta = await fetchMeta();
|
||||
if (meta.blockedHosts.includes(host)) {
|
||||
throw new Error('Instance is blocked');
|
||||
}
|
||||
|
@ -70,4 +90,44 @@ export default class Resolver {
|
|||
|
||||
return object;
|
||||
}
|
||||
|
||||
private resolveLocal(url: string): Promise<IObject> {
|
||||
const parsed = parseUri(url);
|
||||
if (!parsed.local) throw new Error('resolveLocal: not local');
|
||||
|
||||
switch (parsed.type) {
|
||||
case 'notes':
|
||||
return Notes.findOneByOrFail({ id: parsed.id })
|
||||
.then(note => {
|
||||
if (parsed.rest === 'activity') {
|
||||
// this refers to the create activity and not the note itself
|
||||
return renderActivity(renderCreate(renderNote(note)));
|
||||
} else {
|
||||
return renderNote(note);
|
||||
}
|
||||
});
|
||||
case 'users':
|
||||
return Users.findOneByOrFail({ id: parsed.id })
|
||||
.then(user => renderPerson(user as ILocalUser));
|
||||
case 'questions':
|
||||
// Polls are indexed by the note they are attached to.
|
||||
return Promise.all([
|
||||
Notes.findOneByOrFail({ id: parsed.id }),
|
||||
Polls.findOneByOrFail({ noteId: parsed.id }),
|
||||
])
|
||||
.then(([note, poll]) => renderQuestion({ id: note.userId }, note, poll));
|
||||
case 'likes':
|
||||
return NoteReactions.findOneByOrFail({ id: parsed.id }).then(reaction => renderActivity(renderLike(reaction, { uri: null })));
|
||||
case 'follows':
|
||||
// rest should be <followee id>
|
||||
if (parsed.rest == null || !/^\w+$/.test(parsed.rest)) throw new Error('resolveLocal: invalid follow URI');
|
||||
|
||||
return Promise.all(
|
||||
[parsed.id, parsed.rest].map(id => Users.findOneByOrFail({ id }))
|
||||
)
|
||||
.then(([follower, followee]) => renderActivity(renderFollow(follower, followee, url)));
|
||||
default:
|
||||
throw new Error(`resolveLocal: type ${type} unhandled`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,7 +106,10 @@ export const isPost = (object: IObject): object is IPost =>
|
|||
|
||||
export interface IPost extends IObject {
|
||||
type: 'Note' | 'Question' | 'Article' | 'Audio' | 'Document' | 'Image' | 'Page' | 'Video' | 'Event';
|
||||
_misskey_content?: string;
|
||||
source?: {
|
||||
content: string;
|
||||
mediaType: string;
|
||||
};
|
||||
_misskey_quote?: string;
|
||||
quoteUrl?: string;
|
||||
_misskey_talk: boolean;
|
||||
|
@ -114,7 +117,10 @@ export interface IPost extends IObject {
|
|||
|
||||
export interface IQuestion extends IObject {
|
||||
type: 'Note' | 'Question';
|
||||
_misskey_content?: string;
|
||||
source?: {
|
||||
content: string;
|
||||
mediaType: string;
|
||||
};
|
||||
_misskey_quote?: string;
|
||||
quoteUrl?: string;
|
||||
oneOf?: IQuestionChoice[];
|
||||
|
|
|
@ -15,9 +15,10 @@ import { inbox as processInbox } from '@/queue/index.js';
|
|||
import { isSelfHost } from '@/misc/convert-host.js';
|
||||
import { Notes, Users, Emojis, NoteReactions } from '@/models/index.js';
|
||||
import { ILocalUser, User } from '@/models/entities/user.js';
|
||||
import { In, IsNull } from 'typeorm';
|
||||
import { In, IsNull, Not } from 'typeorm';
|
||||
import { renderLike } from '@/remote/activitypub/renderer/like.js';
|
||||
import { getUserKeypair } from '@/misc/keypair-store.js';
|
||||
import renderFollow from '@/remote/activitypub/renderer/follow.js';
|
||||
|
||||
// Init router
|
||||
const router = new Router();
|
||||
|
@ -224,4 +225,30 @@ router.get('/likes/:like', async ctx => {
|
|||
setResponseType(ctx);
|
||||
});
|
||||
|
||||
// follow
|
||||
router.get('/follows/:follower/:followee', async ctx => {
|
||||
// This may be used before the follow is completed, so we do not
|
||||
// check if the following exists.
|
||||
|
||||
const [follower, followee] = await Promise.all([
|
||||
Users.findOneBy({
|
||||
id: ctx.params.follower,
|
||||
host: IsNull(),
|
||||
}),
|
||||
Users.findOneBy({
|
||||
id: ctx.params.followee,
|
||||
host: Not(IsNull()),
|
||||
}),
|
||||
]);
|
||||
|
||||
if (follower == null || followee == null) {
|
||||
ctx.status = 404;
|
||||
return;
|
||||
}
|
||||
|
||||
ctx.body = renderActivity(renderFollow(follower, followee));
|
||||
ctx.set('Cache-Control', 'public, max-age=180');
|
||||
setResponseType(ctx);
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import Koa from 'koa';
|
||||
import { performance } from 'perf_hooks';
|
||||
import { limiter } from './limiter.js';
|
||||
import Koa from 'koa';
|
||||
import { CacheableLocalUser, User } from '@/models/entities/user.js';
|
||||
import endpoints, { IEndpoint } from './endpoints.js';
|
||||
import { AccessToken } from '@/models/entities/access-token.js';
|
||||
import { getIpHash } from '@/misc/get-ip-hash.js';
|
||||
import { limiter } from './limiter.js';
|
||||
import endpoints, { IEndpointMeta } from './endpoints.js';
|
||||
import { ApiError } from './error.js';
|
||||
import { apiLogger } from './logger.js';
|
||||
import { AccessToken } from '@/models/entities/access-token.js';
|
||||
|
||||
const accessDenied = {
|
||||
message: 'Access denied.',
|
||||
|
@ -15,6 +16,7 @@ const accessDenied = {
|
|||
|
||||
export default async (endpoint: string, user: CacheableLocalUser | null | undefined, token: AccessToken | null | undefined, data: any, ctx?: Koa.Context) => {
|
||||
const isSecure = user != null && token == null;
|
||||
const isModerator = user != null && (user.isModerator || user.isAdmin);
|
||||
|
||||
const ep = endpoints.find(e => e.name === endpoint);
|
||||
|
||||
|
@ -31,6 +33,32 @@ export default async (endpoint: string, user: CacheableLocalUser | null | undefi
|
|||
throw new ApiError(accessDenied);
|
||||
}
|
||||
|
||||
if (ep.meta.limit) {
|
||||
// koa will automatically load the `X-Forwarded-For` header if `proxy: true` is configured in the app.
|
||||
let limitActor: string;
|
||||
if (user) {
|
||||
limitActor = user.id;
|
||||
} else {
|
||||
limitActor = getIpHash(ctx!.ip);
|
||||
}
|
||||
|
||||
const limit = Object.assign({}, ep.meta.limit);
|
||||
|
||||
if (!limit.key) {
|
||||
limit.key = ep.name;
|
||||
}
|
||||
|
||||
// Rate limit
|
||||
await limiter(limit as IEndpointMeta['limit'] & { key: NonNullable<string> }, limitActor).catch(e => {
|
||||
throw new ApiError({
|
||||
message: 'Rate limit exceeded. Please try again later.',
|
||||
code: 'RATE_LIMIT_EXCEEDED',
|
||||
id: 'd5826d14-3982-4d2e-8011-b9e9f02499ef',
|
||||
httpStatusCode: 429,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (ep.meta.requireCredential && user == null) {
|
||||
throw new ApiError({
|
||||
message: 'Credential required.',
|
||||
|
@ -53,7 +81,7 @@ export default async (endpoint: string, user: CacheableLocalUser | null | undefi
|
|||
throw new ApiError(accessDenied, { reason: 'You are not the admin.' });
|
||||
}
|
||||
|
||||
if (ep.meta.requireModerator && !user!.isAdmin && !user!.isModerator) {
|
||||
if (ep.meta.requireModerator && !isModerator) {
|
||||
throw new ApiError(accessDenied, { reason: 'You are not a moderator.' });
|
||||
}
|
||||
|
||||
|
@ -65,18 +93,6 @@ export default async (endpoint: string, user: CacheableLocalUser | null | undefi
|
|||
});
|
||||
}
|
||||
|
||||
if (ep.meta.requireCredential && ep.meta.limit && !user!.isAdmin && !user!.isModerator) {
|
||||
// Rate limit
|
||||
await limiter(ep as IEndpoint & { meta: { limit: NonNullable<IEndpoint['meta']['limit']> } }, user!).catch(e => {
|
||||
throw new ApiError({
|
||||
message: 'Rate limit exceeded. Please try again later.',
|
||||
code: 'RATE_LIMIT_EXCEEDED',
|
||||
id: 'd5826d14-3982-4d2e-8011-b9e9f02499ef',
|
||||
httpStatusCode: 429,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Cast non JSON input
|
||||
if (ep.meta.requireFile && ep.params.properties) {
|
||||
for (const k of Object.keys(ep.params.properties)) {
|
||||
|
@ -104,20 +120,20 @@ export default async (endpoint: string, user: CacheableLocalUser | null | undefi
|
|||
if (e instanceof ApiError) {
|
||||
throw e;
|
||||
} else {
|
||||
apiLogger.error(`Internal error occurred in ${ep.name}: ${e?.message}`, {
|
||||
apiLogger.error(`Internal error occurred in ${ep.name}: ${e.message}`, {
|
||||
ep: ep.name,
|
||||
ps: data,
|
||||
e: {
|
||||
message: e?.message,
|
||||
code: e?.name,
|
||||
stack: e?.stack,
|
||||
message: e.message,
|
||||
code: e.name,
|
||||
stack: e.stack,
|
||||
},
|
||||
});
|
||||
throw new ApiError(null, {
|
||||
e: {
|
||||
message: e?.message,
|
||||
code: e?.name,
|
||||
stack: e?.stack,
|
||||
message: e.message,
|
||||
code: e.name,
|
||||
stack: e.stack,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ import { Followings } from '@/models/index.js';
|
|||
import { Brackets, SelectQueryBuilder } from 'typeorm';
|
||||
|
||||
export function generateVisibilityQuery(q: SelectQueryBuilder<any>, me?: { id: User['id'] } | null) {
|
||||
// This code must always be synchronized with the checks in Notes.isVisibleForMe.
|
||||
if (me == null) {
|
||||
q.andWhere(new Brackets(qb => { qb
|
||||
.where(`note.visibility = 'public'`)
|
||||
|
@ -11,7 +12,7 @@ export function generateVisibilityQuery(q: SelectQueryBuilder<any>, me?: { id: U
|
|||
} else {
|
||||
const followingQuery = Followings.createQueryBuilder('following')
|
||||
.select('following.followeeId')
|
||||
.where('following.followerId = :followerId', { followerId: me.id });
|
||||
.where('following.followerId = :meId');
|
||||
|
||||
q.andWhere(new Brackets(qb => { qb
|
||||
// 公開投稿である
|
||||
|
@ -20,21 +21,22 @@ export function generateVisibilityQuery(q: SelectQueryBuilder<any>, me?: { id: U
|
|||
.orWhere(`note.visibility = 'home'`);
|
||||
}))
|
||||
// または 自分自身
|
||||
.orWhere('note.userId = :userId1', { userId1: me.id })
|
||||
.orWhere('note.userId = :meId')
|
||||
// または 自分宛て
|
||||
.orWhere(`'{"${me.id}"}' <@ note.visibleUserIds`)
|
||||
.orWhere(':meId = ANY(note.visibleUserIds)')
|
||||
.orWhere(':meId = ANY(note.mentions)')
|
||||
.orWhere(new Brackets(qb => { qb
|
||||
// または フォロワー宛ての投稿であり、
|
||||
.where('note.visibility = \'followers\'')
|
||||
.where(`note.visibility = 'followers'`)
|
||||
.andWhere(new Brackets(qb => { qb
|
||||
// 自分がフォロワーである
|
||||
.where(`note.userId IN (${ followingQuery.getQuery() })`)
|
||||
// または 自分の投稿へのリプライ
|
||||
.orWhere('note.replyUserId = :userId3', { userId3: me.id });
|
||||
.orWhere('note.replyUserId = :meId');
|
||||
}));
|
||||
}));
|
||||
}));
|
||||
|
||||
q.setParameters(followingQuery.getParameters());
|
||||
q.setParameters({ meId: me.id });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@ export async function readNotification(
|
|||
userId: User['id'],
|
||||
notificationIds: Notification['id'][]
|
||||
) {
|
||||
if (notificationIds.length === 0) return;
|
||||
|
||||
// Update documents
|
||||
await Notifications.update({
|
||||
id: In(notificationIds),
|
||||
|
|
|
@ -99,6 +99,7 @@ import * as ep___charts_user_notes from './endpoints/charts/user/notes.js';
|
|||
import * as ep___charts_user_reactions from './endpoints/charts/user/reactions.js';
|
||||
import * as ep___charts_users from './endpoints/charts/users.js';
|
||||
import * as ep___clips_addNote from './endpoints/clips/add-note.js';
|
||||
import * as ep___clips_removeNote from './endpoints/clips/remove-note.js';
|
||||
import * as ep___clips_create from './endpoints/clips/create.js';
|
||||
import * as ep___clips_delete from './endpoints/clips/delete.js';
|
||||
import * as ep___clips_list from './endpoints/clips/list.js';
|
||||
|
@ -409,6 +410,7 @@ const eps = [
|
|||
['charts/user/reactions', ep___charts_user_reactions],
|
||||
['charts/users', ep___charts_users],
|
||||
['clips/add-note', ep___clips_addNote],
|
||||
['clips/remove-note', ep___clips_removeNote],
|
||||
['clips/create', ep___clips_create],
|
||||
['clips/delete', ep___clips_delete],
|
||||
['clips/list', ep___clips_list],
|
||||
|
@ -654,7 +656,6 @@ export interface IEndpointMeta {
|
|||
/**
|
||||
* エンドポイントのリミテーションに関するやつ
|
||||
* 省略した場合はリミテーションは無いものとして解釈されます。
|
||||
* また、withCredential が false の場合はリミテーションを行うことはできません。
|
||||
*/
|
||||
readonly limit?: {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Signins, UserProfiles, Users } from '@/models/index.js';
|
||||
import define from '../../define.js';
|
||||
import { Users } from '@/models/index.js';
|
||||
|
||||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
@ -23,9 +23,12 @@ export const paramDef = {
|
|||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default define(meta, paramDef, async (ps, me) => {
|
||||
const user = await Users.findOneBy({ id: ps.userId });
|
||||
const [user, profile] = await Promise.all([
|
||||
Users.findOneBy({ id: ps.userId }),
|
||||
UserProfiles.findOneBy({ userId: ps.userId })
|
||||
]);
|
||||
|
||||
if (user == null) {
|
||||
if (user == null || profile == null) {
|
||||
throw new Error('user not found');
|
||||
}
|
||||
|
||||
|
@ -34,8 +37,37 @@ export default define(meta, paramDef, async (ps, me) => {
|
|||
throw new Error('cannot show info of admin');
|
||||
}
|
||||
|
||||
if (!_me.isAdmin) {
|
||||
return {
|
||||
...user,
|
||||
token: user.token != null ? '<MASKED>' : user.token,
|
||||
isModerator: user.isModerator,
|
||||
isSilenced: user.isSilenced,
|
||||
isSuspended: user.isSuspended,
|
||||
};
|
||||
}
|
||||
|
||||
const maskedKeys = ['accessToken', 'accessTokenSecret', 'refreshToken'];
|
||||
Object.keys(profile.integrations).forEach(integration => {
|
||||
maskedKeys.forEach(key => profile.integrations[integration][key] = '<MASKED>');
|
||||
});
|
||||
|
||||
const signins = await Signins.findBy({ userId: user.id });
|
||||
|
||||
return {
|
||||
email: profile.email,
|
||||
emailVerified: profile.emailVerified,
|
||||
autoAcceptFollowed: profile.autoAcceptFollowed,
|
||||
noCrawle: profile.noCrawle,
|
||||
alwaysMarkNsfw: profile.alwaysMarkNsfw,
|
||||
carefulBot: profile.carefulBot,
|
||||
injectFeaturedNote: profile.injectFeaturedNote,
|
||||
receiveAnnouncementEmail: profile.receiveAnnouncementEmail,
|
||||
integrations: profile.integrations,
|
||||
mutedWords: profile.mutedWords,
|
||||
mutedInstances: profile.mutedInstances,
|
||||
mutingNotificationTypes: profile.mutingNotificationTypes,
|
||||
isModerator: user.isModerator,
|
||||
isSilenced: user.isSilenced,
|
||||
isSuspended: user.isSuspended,
|
||||
signins,
|
||||
};
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import define from '../define.js';
|
||||
import { Announcements, AnnouncementReads } from '@/models/index.js';
|
||||
import define from '../define.js';
|
||||
import { makePaginationQuery } from '../common/make-pagination-query.js';
|
||||
|
||||
export const meta = {
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
import define from '../../define.js';
|
||||
import { ClipNotes, Clips } from '@/models/index.js';
|
||||
import { ApiError } from '../../error.js';
|
||||
import { getNote } from '../../common/getters.js';
|
||||
|
||||
export const meta = {
|
||||
tags: ['account', 'notes', 'clips'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
kind: 'write:account',
|
||||
|
||||
errors: {
|
||||
noSuchClip: {
|
||||
message: 'No such clip.',
|
||||
code: 'NO_SUCH_CLIP',
|
||||
id: 'b80525c6-97f7-49d7-a42d-ebccd49cfd52',
|
||||
},
|
||||
|
||||
noSuchNote: {
|
||||
message: 'No such note.',
|
||||
code: 'NO_SUCH_NOTE',
|
||||
id: 'aff017de-190e-434b-893e-33a9ff5049d8',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
clipId: { type: 'string', format: 'misskey:id' },
|
||||
noteId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['clipId', 'noteId'],
|
||||
} as const;
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default define(meta, paramDef, async (ps, user) => {
|
||||
const clip = await Clips.findOneBy({
|
||||
id: ps.clipId,
|
||||
userId: user.id,
|
||||
});
|
||||
|
||||
if (clip == null) {
|
||||
throw new ApiError(meta.errors.noSuchClip);
|
||||
}
|
||||
|
||||
const note = await getNote(ps.noteId).catch(e => {
|
||||
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
|
||||
throw e;
|
||||
});
|
||||
|
||||
await ClipNotes.delete({
|
||||
noteId: note.id,
|
||||
clipId: clip.id,
|
||||
});
|
||||
});
|
|
@ -1,6 +1,6 @@
|
|||
import define from '../define.js';
|
||||
import { fetchMeta } from '@/misc/fetch-meta.js';
|
||||
import { DriveFiles } from '@/models/index.js';
|
||||
import define from '../define.js';
|
||||
|
||||
export const meta = {
|
||||
tags: ['drive', 'account'],
|
||||
|
|
|
@ -9,6 +9,8 @@ export const meta = {
|
|||
|
||||
kind: 'read:drive',
|
||||
|
||||
description: 'Find the notes to which the given file is attached.',
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
optional: false, nullable: false,
|
||||
|
|
|
@ -8,6 +8,8 @@ export const meta = {
|
|||
|
||||
kind: 'read:drive',
|
||||
|
||||
description: 'Check if a given file exists.',
|
||||
|
||||
res: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
|
|
|
@ -20,6 +20,8 @@ export const meta = {
|
|||
|
||||
kind: 'write:drive',
|
||||
|
||||
description: 'Upload a new drive file.',
|
||||
|
||||
res: {
|
||||
type: 'object',
|
||||
optional: false, nullable: false,
|
||||
|
|
|
@ -11,6 +11,8 @@ export const meta = {
|
|||
|
||||
kind: 'write:drive',
|
||||
|
||||
description: 'Delete an existing drive file.',
|
||||
|
||||
errors: {
|
||||
noSuchFile: {
|
||||
message: 'No such file.',
|
||||
|
|
|
@ -8,6 +8,8 @@ export const meta = {
|
|||
|
||||
kind: 'read:drive',
|
||||
|
||||
description: 'Search for a drive file by a hash of the contents.',
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
optional: false, nullable: false,
|
||||
|
|
|
@ -9,6 +9,8 @@ export const meta = {
|
|||
|
||||
kind: 'read:drive',
|
||||
|
||||
description: 'Search for a drive file by the given parameters.',
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
optional: false, nullable: false,
|
||||
|
|
|
@ -10,6 +10,8 @@ export const meta = {
|
|||
|
||||
kind: 'read:drive',
|
||||
|
||||
description: 'Show the properties of a drive file.',
|
||||
|
||||
res: {
|
||||
type: 'object',
|
||||
optional: false, nullable: false,
|
||||
|
|
|
@ -11,6 +11,8 @@ export const meta = {
|
|||
|
||||
kind: 'write:drive',
|
||||
|
||||
description: 'Update the properties of a drive file.',
|
||||
|
||||
errors: {
|
||||
invalidFileName: {
|
||||
message: 'Invalid file name.',
|
||||
|
|
|
@ -13,6 +13,8 @@ export const meta = {
|
|||
max: 60,
|
||||
},
|
||||
|
||||
description: 'Request the server to download a new drive file from the specified URL.',
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
kind: 'write:drive',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import define from '../define.js';
|
||||
import { createExportCustomEmojisJob } from '@/queue/index.js';
|
||||
import ms from 'ms';
|
||||
import { createExportCustomEmojisJob } from '@/queue/index.js';
|
||||
import define from '../define.js';
|
||||
|
||||
export const meta = {
|
||||
secure: true,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { MoreThan } from 'typeorm';
|
||||
import { USER_ONLINE_THRESHOLD } from '@/const.js';
|
||||
import { Users } from '@/models/index.js';
|
||||
import { MoreThan } from 'typeorm';
|
||||
import define from '../define.js';
|
||||
|
||||
export const meta = {
|
||||
|
|