Merge branch 'develop' into feature/default-hashtag-timeline

This commit is contained in:
Tatsuya Koishi 2024-02-10 10:56:17 +09:00
commit 1c075f6068
289 changed files with 3711 additions and 1906 deletions

View file

@ -160,14 +160,14 @@ id: 'aidx'
# Job concurrency per worker
#deliverJobConcurrency: 128
#inboxJobConcurrency: 16
#relashionshipJobConcurrency: 16
# What's relashionshipJob?:
#relationshipJobConcurrency: 16
# What's relationshipJob?:
# Follow, unfollow, block and unblock(ings) while following-imports, etc. or account migrations.
# Job rate limiter
#deliverJobPerSec: 128
#inboxJobPerSec: 32
#relashionshipJobPerSec: 64
#relationshipJobPerSec: 64
# Job attempts
#deliverJobMaxAttempts: 12

View file

@ -0,0 +1,28 @@
name: Check Misskey JS version
on:
push:
branches: [ develop ]
paths:
- packages/misskey-js/package.json
- package.json
pull_request:
branches: [ develop ]
paths:
- packages/misskey-js/package.json
- package.json
jobs:
check-version:
# ルートの package.json と packages/misskey-js/package.json のバージョンが一致しているかを確認する
name: Check version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Check version
run: |
if [ "$(jq -r '.version' package.json)" != "$(jq -r '.version' packages/misskey-js/package.json)" ]; then
echo "Version mismatch!"
exit 1
fi

View file

@ -0,0 +1,23 @@
name: deploy-test-environment
on:
#push:
workflow_dispatch:
inputs:
repository:
description: 'Repository to deploy (optional)'
type: string
required: false
branch_or_hash:
description: 'Branch or Commit hash to deploy (optional)'
type: string
required: false
jobs:
deploy-test-environment:
uses: joinmisskey/misskey-tga/.github/workflows/deploy-test-environment.yml@main
with:
repository: ${{ github.event.inputs.repository }}
branch_or_hash: ${{ github.event.inputs.branch_or_hash }}
secrets:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}

View file

@ -23,7 +23,7 @@ jobs:
private_key: ${{ secrets.DEPLOYBOT_PRIVATE_KEY }}
- name: Slash Command Dispatch
uses: peter-evans/slash-command-dispatch@v3
uses: peter-evans/slash-command-dispatch@v4
env:
TOKEN: ${{ steps.generate_token.outputs.token }}
with:

View file

@ -61,7 +61,7 @@ jobs:
- name: Test
run: pnpm --filter backend test-and-coverage
- name: Upload to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./packages/backend/coverage/coverage-final.json
@ -111,7 +111,7 @@ jobs:
- name: Test
run: pnpm --filter backend test-and-coverage:e2e
- name: Upload to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./packages/backend/coverage/coverage-final.json

View file

@ -53,7 +53,7 @@ jobs:
- name: Test
run: pnpm --filter frontend test-and-coverage
- name: Upload Coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./packages/frontend/coverage/coverage-final.json

View file

@ -50,21 +50,7 @@ jobs:
CI: true
- name: Upload Coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./packages/misskey-js/coverage/coverage-final.json
check-version:
# ルートの package.json と packages/misskey-js/package.json のバージョンが一致しているかを確認する
name: Check version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Check version
run: |
if [ "$(jq -r '.version' package.json)" != "$(jq -r '.version' packages/misskey-js/package.json)" ]; then
echo "Version mismatch!"
exit 1
fi

View file

@ -21,6 +21,9 @@
- Feat: [mCaptcha](https://github.com/mCaptcha/mCaptcha)のサポートを追加
- Fix: リストライムラインの「リノートを表示」が正しく機能しない問題を修正
- Feat: Add support for TrueMail
- Fix: リモートユーザーのリアクション一覧がすべて見えてしまうのを修正
* すべてのリモートユーザーのリアクション一覧を見えないようにします
- Enhance: モデレーターはすべてのユーザーのリアクション一覧を見られるように
### Client
- Feat: 新しいゲームを追加
@ -50,7 +53,18 @@
- Fix: v2023.12.0で追加された「モデレーターがユーザーのアイコンもしくはバナー画像を未設定状態にできる機能」が管理画面上で正しく表示されていない問題を修正
- Fix: AiScriptの`readline`関数が不正な値を返すことがある問題のv2023.12.0時点での修正がPlay以外に適用されていないのを修正
- Fix: v2023.12.1で追加された`$[clickable ...]`および`onClickEv`が正しく機能していないのを修正
- Fix: Renoteのキーボードショートカットが機能していなかった問題を修正
- Fix: 投稿フォームでアンケートの日時指定をした状態で再読み込みをすると期日が復元されない問題を修正
- Fix: アンケートを設定したノートを「削除して編集」をするとアンケートの期日が引き継がれず、リセットされてしまう問題を修正
- Fix: デッキのプロファイル作成時に名前を空にできる問題を修正
- Fix: テーマ作成時に名称が空欄でも作成できてしまう問題を修正
- Fix: プラグインで`Plugin:register_note_post_interruptor`を使用すると、ノートが投稿できなくなる問題を修正
- Enhance: ページ遷移時にPlayerを閉じるように
- Fix: iOSで大きな画像を変換してアップロードできない問題を修正
- Fix: 「アニメーション画像を再生しない」もしくは「データセーバー(アイコン)」を有効にしていても、アイコンデコレーションのアニメーションが停止されない問題を修正
- Fix: 画像をクロップするとクロップ後の解像度が異様に低くなる問題の修正
- Fix: 画像をクロップ時、正常に完了できない問題の修正
- Fix: キャプションが空の画像をクロップするとキャプションにnullという文字列が入ってしまう問題の修正
### Server
- Enhance: 連合先のレートリミットに引っかかった際にリトライするようになりました
@ -64,6 +78,8 @@
- Fix: `notes/create`で、`text`が空白文字のみで構成されていてかつリノート、ファイルまたは投票を含んでいるリクエストに対するレスポンスの`text`が`""`から`null`になるように変更
- Fix: ipv4とipv6の両方が利用可能な環境でallowedPrivateNetworksが設定されていた場合プライベートipの検証ができていなかった問題を修正
- Fix: properly handle cc followers
- Fix: ジョブに関する設定の名前を修正 relashionshipJobPerSec -> relationshipJobPerSec
- Fix: コントロールパネル->モデレーション->「誰でも新規登録できるようにする」の初期値をONからOFFに変更 #13122
### Service Worker
- Enhance: オフライン表示のデザインを改善・多言語対応

30
cypress/e2e/router.cy.js Normal file
View file

@ -0,0 +1,30 @@
describe('Router transition', () => {
describe('Redirect', () => {
// サーバの初期化。ルートのテストに関しては各describeごとに1度だけ実行で十分だと思う使いまわした方が早い
before(() => {
cy.resetState();
// インスタンス初期セットアップ
cy.registerUser('admin', 'pass', true);
// ユーザー作成
cy.registerUser('alice', 'alice1234');
cy.login('alice', 'alice1234');
// アカウント初期設定ウィザード
// 表示に時間がかかるのでデフォルト秒数だとタイムアウトする
cy.get('[data-cy-user-setup] [data-cy-modal-window-close]', { timeout: 12000 }).click();
cy.wait(500);
cy.get('[data-cy-modal-dialog-ok]').click();
});
it('redirect to user profile', () => {
// テストのためだけに用意されたリダイレクト用ルートに飛ぶ
cy.visit('/redirect-test');
// プロフィールページのURLであることを確認する
cy.url().should('include', '/@alice')
});
});
});

View file

@ -130,6 +130,7 @@ overwriteFromPinnedEmojis: "Sobreescriu des dels emojis fixats"
reactionSettingDescription2: "Arrossega per reordenar, fes clic per suprimir, prem \"+\" per afegir."
rememberNoteVisibility: "Recorda la configuració de visibilitat de les notes"
attachCancel: "Eliminar el fitxer adjunt"
deleteFile: "Esborrar l'arxiu "
markAsSensitive: "Marcar com a NSFW"
unmarkAsSensitive: "Deixar de marcar com a sensible"
enterFileName: "Defineix nom del fitxer"
@ -1039,6 +1040,12 @@ rolesAssignedToMe: "Rols assignats "
resetPasswordConfirm: "Vols canviar la teva contrasenya?"
sensitiveWords: "Paraules sensibles"
sensitiveWordsDescription: "La visibilitat de totes les notes que continguin qualsevol de les paraules configurades seran, automàticament, afegides a \"Inici\". Pots llistar diferents paraules separant les per línies noves."
sensitiveWordsDescription2: "Fent servir espais crearà expressions AND si l'expressió s'envolta amb barres inclinades es converteix en una expressió regular."
hiddenTags: "Etiquetes ocultes"
hiddenTagsDescription: "La visibilitat de totes les notes que continguin qualsevol de les paraules configurades seran, automàticament, afegides a \"Inici\". Pots llistar diferents paraules separant les per línies noves."
notesSearchNotAvailable: "La cerca de notes no es troba disponible."
license: "Llicència"
unfavoriteConfirm: "Esborrar dels favorits?"
myClips: "Els meus retalls"
drivecleaner: "Netejador de Disc"
retryAllQueuesNow: "Prova de nou d'executar totes les cues"
@ -1048,6 +1055,14 @@ enableChartsForRemoteUser: "Generar gràfiques d'usuaris remots"
enableChartsForFederatedInstances: "Generar gràfiques d'instàncies remotes"
showClipButtonInNoteFooter: "Afegir \"Retall\" al menú d'acció de la nota"
reactionsDisplaySize: "Mida de les reaccions"
limitWidthOfReaction: "Limitar l'amplada màxima de la reacció i mostrar-les en una mida reduïda "
noteIdOrUrl: "ID o URL de la nota"
video: "Vídeo"
videos: "Vídeos "
audio: "So"
audioFiles: "So"
dataSaver: "Economitzador de dades"
accountMigration: "Migració del compte"
accountMoved: "Aquest usuari té un compte nou:"
accountMovedShort: "Aquest compte ha sigut migrat"
operationForbidden: "Operació no permesa "
@ -1098,9 +1113,56 @@ branding: "Marca"
enableServerMachineStats: "Publicar estadístiques del maquinari del servidor"
enableIdenticonGeneration: "Activar la generació d'icones d'identificació "
turnOffToImprovePerformance: "Desactivant aquesta opció es pot millorar el rendiment."
createInviteCode: "Crear codi d'invitació "
createWithOptions: "Crear invitació amb opcions"
createCount: "Comptador d'invitacions "
inviteCodeCreated: "Invitació creada"
inviteLimitExceeded: "Has sobrepassat el límit d'invitacions que pots crear."
createLimitRemaining: "Et queden {limit} invitacions restants"
inviteLimitResetCycle: "Cada {time} {limit} invitacions."
expirationDate: "Data de venciment"
noExpirationDate: "Sense data de venciment"
inviteCodeUsedAt: "Codi d'invitació fet servir el"
registeredUserUsingInviteCode: "Codi d'invitació fet servir per l'usuari "
waitingForMailAuth: "Esperant la verificació per correu electrònic "
inviteCodeCreator: "Invitació creada per"
usedAt: "Utilitzada el"
unused: "Sense utilitzar"
used: "Utilitzada"
expired: "Caducat"
doYouAgree: "Estàs d'acord?"
beSureToReadThisAsItIsImportant: "Llegeix això perquè és molt important."
iHaveReadXCarefullyAndAgree: "He llegit {x} i estic d'acord."
dialog: "Diàleg "
icon: "Icona"
forYou: "Per a tu"
currentAnnouncements: "Informes actuals"
pastAnnouncements: "Informes passats"
youHaveUnreadAnnouncements: "Tens informes per llegir."
useSecurityKey: "Segueix les instruccions del teu navegador O dispositiu per fer servir el teu passkey."
replies: "Respondre"
renotes: "Impulsa"
loadReplies: "Mostrar les respostes"
loadConversation: "Mostrar la conversació "
pinnedList: "Llista fixada"
keepScreenOn: "Mantenir la pantalla encesa"
verifiedLink: "La propietat de l'enllaç ha sigut verificada"
notifyNotes: "Notificar quan hi hagi notes noves"
unnotifyNotes: "Deixar de notificar quan hi hagi notes noves"
authentication: "Autenticació "
authenticationRequiredToContinue: "Si us plau autentificat per continuar"
dateAndTime: "Data i hora"
showRenotes: "Mostrar impulsos"
edited: "Editat"
notificationRecieveConfig: "Paràmetres de notificacions"
mutualFollow: "Seguidor mutu"
fileAttachedOnly: "Només notes amb adjunts"
showRepliesToOthersInTimeline: "Mostrar les respostes a altres a la línia de temps"
hideRepliesToOthersInTimeline: "Amagar les respostes a altres a la línia de temps"
showRepliesToOthersInTimelineAll: "Mostrar les respostes a altres a usuaris que segueixes a la línia de temps"
hideRepliesToOthersInTimelineAll: "Ocultar les teves respostes a tots els usuaris que segueixes a la línia de temps"
confirmShowRepliesAll: "Aquesta opció no té marxa enrere. Vols mostrar les teves respostes a tots els que segueixes a la teva línia de temps?"
confirmHideRepliesAll: "Aquesta opció no té marxa enrere. Vols ocultar les teves respostes a tots els usuaris que segueixes a la línia de temps?"
externalServices: "Serveis externs"
impressum: "Impressum"
impressumUrl: "Adreça URL impressum"
@ -1131,7 +1193,25 @@ seasonalScreenEffect: "Efectes de pantalla segons les estacions"
decorate: "Decorar"
addMfmFunction: "Afegeix funcions MFM"
enableQuickAddMfmFunction: "Activar accés ràpid per afegir funcions MFM"
bubbleGame: "Bubble Game"
sfx: "Efectes de so"
soundWillBePlayed: "Es reproduiran efectes de so"
showReplay: "Veure reproducció"
replay: "Reproduir"
replaying: "Reproduint"
ranking: "Classificació"
lastNDays: "Últims {n} dies"
backToTitle: "Torna al títol"
hemisphere: "Geolocalització"
withSensitive: "Incloure notes amb fitxers sensibles"
userSaysSomethingSensitive: "La publicació de {name} conte material sensible"
enableHorizontalSwipe: "Lliscar per canviar de pestanya"
_bubbleGame:
howToPlay: "Com es juga"
_howToPlay:
section1: "Ajusta la posició i deixa caure l'objecte dintre la caixa."
section2: "Quan dos objectes del mateix tipus es toquen, canviaran en un objecte diferent i guanyares punts."
section3: "El joc s'acabarà quan els objectes sobresurtin de la caixa. Intenta aconseguir la puntuació més gran possible fusionant objectes mentre impedeixes que sobresurtin de la caixa!"
_announcement:
forExistingUsers: "Anunci per usuaris registrats"
forExistingUsersDescription: "Aquest avís només es mostrarà als usuaris existents fins al moment de la publicació. Si no també es mostrarà als usuaris que es registrin després de la publicació."
@ -1153,8 +1233,318 @@ _initialAccountSetting:
privacySetting: "Configuració de seguretat"
theseSettingsCanEditLater: "Aquests ajustos es poden canviar més tard."
youCanEditMoreSettingsInSettingsPageLater: "A més d'això, es poden fer diferents configuracions a través de la pàgina de configuració. Assegureu-vos de comprovar-ho més tard."
followUsers: "Prova de seguir usuaris que t'interessin per construir la teva línia de temps."
pushNotificationDescription: "Activant les notificacions emergents et permetrà rebre notificacions de {name} directament al teu dispositiu."
initialAccountSettingCompleted: "Configuració del perfil completada!"
haveFun: "Disfruta {name}!"
youCanContinueTutorial: "Pots continuar amb un tutorial per aprendre a Fer servir {name} (MissKey) o tu pots estalviar i començar a fer-lo servir ja."
startTutorial: "Començar el tutorial"
skipAreYouSure: "Et vols saltar la configuració del perfil?"
laterAreYouSure: "Vols continuar la configuració del perfil més tard?"
_initialTutorial:
launchTutorial: "Començar tutorial"
title: "Tutorial"
wellDone: "Ben fet!"
skipAreYouSure: "Sortir del tutorial?"
_landing:
title: "Benvingut al tutorial"
description: "Aquí aprendràs el bàsic per poder fer servir Misskey i les seves característiques."
_note:
title: "Què és una Nota?"
description: "Les publicacions a Misskey es diuen 'Notes'. Les Notes s'ordenen cronològicament a la línia de temps i s'actualitzen de forma automàtica."
reply: "Fes clic en aquest botó per contestar a un missatge. També és possible contestar a una contestació, continuant la conversació en forma de fil."
renote: "Pots compartir una Nota a la teva pròpia línia de temps. Inclús pots citar-les amb els teus comentaris."
reaction: "Pots afegir reaccions a les Notes. Entrarem més en detall a la pròxima pàgina."
menu: "Pots veure els detalls de les Notes, copiar enllaços i fer diferents accions."
_reaction:
title: "Què són les Reaccions?"
description: "Es poden reaccionar a les Notes amb diferents emoticones. Les reaccions et permeten expressar matisos que hi són més enllà d'un simple m'agrada."
letsTryReacting: "Es poden afegir reaccions fent clic al botó '+'. Prova reaccionant a aquesta nota!"
reactToContinue: "Afegeix una reacció per continuar."
reactNotification: "Rebràs notificacions en temps real quan un usuari reaccioni a les teves notes."
reactDone: "Pots desfer una reacció fent clic al botó '-'."
_timeline:
title: "El concepte de les línies de temps"
description1: "Misskey mostra diferents línies de temps basades en l'ús (algunes poden no estar disponibles depenent de la política del servidor)"
home: "Pots veure notes dels comptes que segueixes"
local: "Pots veure les notes dels usuaris del servidor."
social: "Es mostren les notes de les línies de temps d'Inici i Local."
global: "Pots veure les notes de tots els servidors connectats."
description2: "Pots canviar la línia de temps en qualsevol moment fent servir la barra de la pantalla superior."
description3: "A més hi ha línies de temps per llistes i per canals. Si vols saber més {link}."
_postNote:
title: "Configuració de la publicació de les notes"
description1: "Quan públiques una nota a Misskey hi ha diferents opcions disponibles. El formulari de publicació es veu així"
_visibility:
description: "Pots limitar qui pot veure les teves notes."
public: "La teva nota serà visible per a tots els usuaris."
home: "Publicar només a línia de temps d'Inici. La gent que visiti el teu perfil o mitjançant les remotes també la podran veure."
followers: "Només visible per a seguidors. Només els teus seguidors la podran veure i ningú més. Ningú més podrà fer renotes."
direct: "Només visible per a alguns seguidors, el destinatari rebre una notificació. Es pot fer servir com una alternativa als missatges directes."
doNotSendConfidencialOnDirect1: "Tingues cura quan enviïs informació sensible."
doNotSendConfidencialOnDirect2: "Els administradors del servidor poden veure tot el que escrius. Ves compte quan enviïs informació sensible en enviar notes directes a altres usuaris en servidors de poca confiança."
localOnly: "Publicar amb aquesta opció activada farà que la nota no federi amb altres servidors. Els usuaris d'altres servidors no podran veure la nota directament, sense importar les opcions de visualització."
_cw:
title: "Avís de Contingut (CW)"
description: "En comptes del cos de la nota es mostrarà el que s'escrigui al camp de 'comentaris'. Fent clic a 'Llegir més' es mostrarà el cos."
_exampleNote:
cw: "Això et farà venir gana!"
note: "Acabo de menjar-me un donut de xocolata 🍩😋"
useCases: "Això es fa servir per seguir normes del servidor sobre certes notes o per ocultar contingut sensible O revelador."
_howToMakeAttachmentsSensitive:
title: "Com marcar adjunts com a contingut sensible?"
description: "Per adjunts que sigui requerit per les normes del servidor o que puguin contenir material sensible, s'ha d'afegir l'opció 'sensible'."
tryThisFile: "Prova de marcar la imatge adjunta en aquest formulari com a sensible!"
_exampleNote:
note: "Oops! L'he fet bona en obrir la tapa de Nocilla..."
method: "Per marcar un adjunt com a sensible, fes clic a la miniatura de l'adjunt, obre el menú i fes clic a 'Marcar com a sensible'."
sensitiveSucceeded: "Quan adjuntis fitxers si us plau marca la sensibilitat seguint les normes del servidor."
doItToContinue: "Marca el fitxer adjunt com a sensible per poder continuar."
_done:
title: "Has completat el tutorial 🎉"
description: "Les funcions explicades aquí és una petita mostra. Per una explicació més detallada de com fer servir MissKey consulta {link}."
_timelineDescription:
home: "A la línia de temps d'Inici pots veure les notes dels usuaris que segueixes."
local: "A la línia de temps Local pots veure les notes de tots els usuaris d'aquest servidor."
social: "La línia de temps Social mostren les notes de les línies de temps d'Inici i Local."
global: "A la línia de temps Global pots veure les notes de tots els servidors connectats."
_serverRules:
description: "Un conjunt de regles que seran mostrades abans de registrar-se. Es recomanable configurar un resum dels termes d'ús."
_serverSettings:
iconUrl: "URL de la icona"
appIconDescription: "Especifica la icona que es mostrarà quan el {host} es mostri en una aplicació."
appIconUsageExample: "Per exemple com a PWA, o quan es mostri com un favorit a la pàgina d'inici del telèfon mòbil"
appIconStyleRecommendation: "Com la icona pot ser retallada com un cercle o un quadrat, es recomana fer servir una icona amb un marge acolorit que l'envolti."
appIconResolutionMustBe: "La resolució mínima és {resolution}."
manifestJsonOverride: "Sobreescriure manifest.json"
shortName: "Nom curt"
shortNameDescription: "Una abreviatura del nom de la instància que es poguí mostrar en cas que el nom oficial sigui massa llarg"
fanoutTimelineDescription: "Quan es troba activat millora bastant el rendiment quan es recuperen les línies de temps i redueix la carrega de la base de dades. Com a contrapunt, l'ús de memòria de Redis es veurà incrementada. Considera d'estabilitat aquesta opció en cas de tenir un servidor amb poca memòria o si tens problemes de inestabilitat."
fanoutTimelineDbFallback: "Carregar de la base de dades"
fanoutTimelineDbFallbackDescription: "Quan s'activa, la línia de temps fa servir la base de dades per consultes adicionals si la línia de temps no es troba a la memòria cau. Si és desactiva la càrrega del servidor és veure reduïda, però també és reduirà el nombre de línies de temps que és poden obtenir."
_accountMigration:
moveFrom: "Migrar un altre compte a aquest"
moveFromSub: "Crear un àlies per un altre compte"
moveFromLabel: "Compte original #{n}"
moveFromDescription: "Has de crear un àlies del compte que vols migrar en aquest compte.\nFes servir aquest format per posar el compte que vols migrar: @nomusuari@servidor.exemple.com\nPer esborrar l'àlies deixa el camp en blanc (no és recomanable de fer)"
moveTo: "Migrar aquest compte a un altre"
moveToLabel: "Compte al qual es vol migrar:"
moveCannotBeUndone: "Les migracions dels comptes no es poden desfer."
moveAccountDescription: "Això migrarà la teva compte a un altre diferent.\n ・Els seguidors d'aquest compte és passaran al compte nou de forma automàtica\n ・Es deixaran de seguir a tots els usuaris que es segueixen actualment en aquest compte\n ・No es poden crear notes noves, etc. en aquest compte\n\nSi bé la migració de seguidors es automàtica, has de preparar alguns pasos manualment per migrar la llista d'usuaris que segueixes. Per fer això has d'exportar els seguidors que després importaraes al compte nou mitjançant el menú de configuració. El mateix procediment s'ha de seguir per less teves llistes i els teus usuaris silenciats i bloquejats.\n\n(Aquesta explicació s'aplica a Misskey v13.12.0 i posteriors. Altres aplicacions, com Mastodon, poden funcionar diferent.)"
moveAccountHowTo: "Per fer la migració, primer has de crear un àlies per aquest compte al compte al qual vols migrar.\nDesprés de crear l'àlies, introdueix el compte al qual vols migrar amb el format següent: @nomusuari@servidor.exemple.com"
startMigration: "Migrar"
migrationConfirm: "Vols migrar aquest compte a {account}? Una vegada comenci la migració no es podrà parar O fer marxa enrere i no podràs tornar a fer servir aquest compte mai més."
movedAndCannotBeUndone: "Aquest compte ha migrat.\nLes migracions no es poden desfer."
postMigrationNote: "Aquest compte deixarà de seguir tots els comptes que segueix 24 hores després de germinar la migració.\nEl nombre de seguidors i seguits passarà a ser de zero. Per evitar que els teus seguidors no puguin veure les publicacions marcades com a només seguidors continuaren seguint aquest compte."
movedTo: "Nou compte:"
_achievements:
earnedAt: "Desbloquejat el"
_types:
_notes1:
title: "Aquí, configurant el meu msky"
description: "Publica la teva primera Nota"
flavor: "Passa-t'ho bé fent servir Miskey!"
_notes10:
title: "Algunes notes"
description: "Publica 10 notes"
_notes100:
title: "Un piló de notes"
description: "Publica 100 notes"
_notes500:
title: "Cobert de notes"
description: "Publica 500 notes"
_notes1000:
title: "Un piló de notes"
description: "1 000 notes publicades"
_notes5000:
title: "Desbordament de notes"
description: "5 000 notes publicades"
_notes10000:
title: "Supernota"
description: "10 000 notes publicades"
_notes20000:
title: "Necessito... Més... Notes!"
description: "20 000 notes publicades"
_notes30000:
title: "Notes notes notes!"
description: "30 000 notes publicades"
_notes40000:
title: "Fàbrica de notes"
description: "40 000 notes publicades"
_notes50000:
title: "Planeta de notes"
description: "50 000 notes publicades"
_notes60000:
title: "Quàsar de notes"
description: "60 000 notes publicades"
_notes70000:
title: "Forat negre de notes"
description: "70 000 notes publicades"
_notes80000:
title: "Galàxia de notes"
description: "80 000 notes publicades"
_notes90000:
title: "Univers de notes"
description: "90 000 notes publicades"
_notes100000:
title: "ALL YOUR NOTE ARE BELONG TO US"
description: "100 000 notes publicades"
flavor: "Segur que tens moltes coses a dir?"
_login3:
title: "Principiant I"
description: "Vas iniciar sessió fa tres dies"
flavor: "Des d'avui diguem Misskist"
_login7:
title: "Principiant II"
description: "Vas iniciar sessió fa set dies"
flavor: "Ja saps com va funcionant tot?"
_login15:
title: "Principiant III"
description: "Vas iniciar sessió fa quinze dies"
_login30:
title: "Misskist I"
description: "Vas iniciar sessió fa trenta dies"
_login60:
title: "Misskist II"
description: "Vas iniciar sessió fa seixanta dies"
_login100:
title: "Misskist III"
description: "Vas iniciar sessió fa cent dies"
flavor: "Misskist violent"
_login200:
title: "Regular I"
description: "Vas iniciar sessió fa dos-cents dies"
_login300:
title: "Regular II"
description: "Vas iniciar sessió fa tres-cents dies"
_login400:
title: "Regular III"
description: "Vas iniciar sessió fa quatre-cents dies"
_login500:
title: "Expert I"
description: "Vas iniciar sessió fa cinc-cents dies"
flavor: "Amics, he dit massa vegades que soc un amant de les notes"
_login600:
title: "Expert II"
description: "Vas iniciar sessió fa sis-cents dies"
_login700:
title: "Expert III"
description: "Vas iniciar sessió fa set-cents dies"
_login800:
title: "Mestre de les Notes I"
description: "Vas iniciar sessió fa vuit-cents dies "
_login900:
title: "Mestre de les Notes II"
description: "Vas iniciar sessió fa nou-cents dies"
_login1000:
title: "Mestre de les Notes III"
description: "Vas iniciar sessió fa mil dies"
flavor: "Gràcies per fer servir MissKey!"
_noteClipped1:
title: "He de retallar-te!"
description: "Retalla la teva primera nota"
_noteFavorited1:
title: "Quan miro les estrelles"
description: "La primera vegada que vaig registrar el meu favorit"
_myNoteFavorited1:
title: "Vull una estrella"
description: "La meva nota va ser registrada com favorita per una de les altres persones"
_profileFilled:
title: "Estic a punt"
description: "Vaig fer la configuració de perfil"
_markedAsCat:
title: "Soc un gat"
description: "He establert el meu compte com si fos un Gat"
flavor: "Encara no tinc nom"
_following1:
title: "És el meu primer seguiment"
description: "És la primera vegada que et segueixo"
_following10:
title: "Segueix-me... Segueix-me..."
description: "Seguir 10 usuaris"
_following50:
title: "Molts amics"
description: "Seguir 50 comptes"
_following100:
title: "100 amics"
description: "Segueixes 100 comptes"
_following300:
title: "Sobrecàrrega d'amics"
description: "Segueixes 300 comptes"
_followers1:
title: "Primer seguidor"
description: "1 seguidor guanyat"
_followers10:
title: "Segueix-me!"
description: "10 seguidors guanyats"
_followers50:
title: "Venen en manada"
description: "50 seguidors guanyats"
_followers100:
title: "Popular"
description: "100 seguidors guanyats"
_followers300:
title: "Si us plau, d'un en un!"
description: "300 seguidors guanyats"
_followers500:
title: "Torre de ràdio"
description: "500 seguidors guanyats"
_followers1000:
title: "Influenciador"
description: "1 000 seguidors guanyats"
_collectAchievements30:
title: "Col·leccionista d'èxits "
description: "Desbloqueja 30 assoliments"
_viewAchievements3min:
title: "M'agraden els èxits "
description: "Mira la teva llista d'assoliments durant més de 3 minuts"
_iLoveMisskey:
title: "Estimo Misskey"
description: "Publica \"I ❤ #Misskey\""
flavor: "L'equip de desenvolupament de Misskey agraeix el vostre suport!"
_foundTreasure:
title: "A la Recerca del Tresor"
description: "Has trobat el tresor amagat"
_client30min:
title: "Parem una estona"
description: "Mantingues obert Misskey per 30 minuts"
_client60min:
title: "A totes amb Misskey"
description: "Mantingues Misskey obert per 60 minuts"
_noteDeletedWithin1min:
title: "No et preocupis"
description: "Esborra una nota al minut de publicar-la"
_postedAtLateNight:
title: "Nocturn"
description: "Publica una nota a altes hores de la nit "
flavor: "És hora d'anar a dormir."
_open3windows:
title: "Multi finestres"
description: "I va obrir més de tres finestres"
_driveFolderCircularReference:
title: "Consulteu la secció de bucle"
_role:
permission: "Permisos de rol"
descriptionOfPermission: "Els <b>Moderadors</b> poden fer operacions bàsiques de moderació.\nEls <b>Administradors</b> poden canviar tots els ajustos del servidor."
assignTarget: "Assignar "
descriptionOfAssignTarget: "<b>Manual</b> per canviar manualment qui és part d'aquest rol i qui no.\n<b>Condicional</b> per afegir o eliminar de manera automàtica els usuaris d'aquest rol basat en una determinada condició."
manual: "Manual"
manualRoles: "Rols manuals"
conditional: "Condicional"
conditionalRoles: "Rols condicionals"
condition: "Condició"
isConditionalRole: "Aquest és un rol condicional"
isPublic: "Rol públic"
descriptionOfIsPublic: "Aquest rol es mostrarà al perfil dels usuaris al que se'ls assigni."
options: "Opcions"
policies: "Polítiques"
baseRole: "Plantilla de rols"
useBaseValue: "Fer servir els valors de la plantilla de rols"
chooseRoleToAssign: "Selecciona els rols a assignar"
iconUrl: "URL de la icona "
asBadge: "Mostrar com a insígnia "
descriptionOfAsBadge: "La icona d'aquest rol es mostrarà al costat dels noms d'usuaris que tinguin assignats aquest rol."
isExplorable: "Fer el rol explorable"
priority: "Prioritat"
_priority:
low: "Baixa"
@ -1274,6 +1664,7 @@ _webhookSettings:
_moderationLogTypes:
suspend: "Suspèn"
resetPassword: "Restableix la contrasenya"
createInvitation: "Crear codi d'invitació "
_reversi:
total: "Total"

View file

@ -122,7 +122,10 @@ add: "Hinzufügen"
reaction: "Reaktionen"
reactions: "Reaktionen"
emojiPicker: "Emoji auswählen"
pinnedEmojisForReactionSettingDescription: "Wähle die Emojis aus, um sie an zu pinnen"
pinnedEmojisForReactionSettingDescription: "Lege Emojis fest, die angepinnt werden sollen, um sie beim Reagieren als Erstes anzuzeigen."
pinnedEmojisSettingDescription: "Lege Emojis fest, die angepinnt werden sollen, um sie in der Emoji-Auswahl als Erstes anzuzeigen"
overwriteFromPinnedEmojisForReaction: "Überschreiben mit den Reaktions-Einstellungen"
overwriteFromPinnedEmojis: "Überschreiben mit den allgemeinen Einstellungen"
reactionSettingDescription2: "Ziehe um Anzuordnen, klicke um zu löschen, drücke „+“ um hinzuzufügen"
rememberNoteVisibility: "Notizsichtbarkeit merken"
attachCancel: "Anhang entfernen"
@ -263,6 +266,7 @@ removed: "Erfolgreich gelöscht"
removeAreYouSure: "Möchtest du „{x}“ wirklich entfernen?"
deleteAreYouSure: "Möchtest du „{x}“ wirklich löschen?"
resetAreYouSure: "Wirklich zurücksetzen?"
areYouSure: "Bist du sicher?"
saved: "Erfolgreich gespeichert"
messaging: "Chat"
upload: "Hochladen"
@ -357,7 +361,7 @@ enableLocalTimeline: "Lokale Chronik aktivieren"
enableGlobalTimeline: "Globale Chronik aktivieren"
disablingTimelinesInfo: "Administratoren und Moderatoren haben immer Zugriff auf alle Chroniken, auch wenn diese deaktiviert sind."
registration: "Registrieren"
enableRegistration: "Registration neuer Benutzer erlauben"
enableRegistration: "Registrierung neuer Benutzer erlauben"
invite: "Einladen"
driveCapacityPerLocalAccount: "Drive-Kapazität pro lokalem Benutzerkonto"
driveCapacityPerRemoteAccount: "Drive-Kapazität pro Benutzer fremder Instanzen"
@ -375,8 +379,11 @@ hcaptcha: "hCaptcha"
enableHcaptcha: "hCaptcha aktivieren"
hcaptchaSiteKey: "Site key"
hcaptchaSecretKey: "Secret key"
mcaptcha: "mCaptcha"
enableMcaptcha: "mCaptcha aktivieren"
mcaptchaSiteKey: "Site key"
mcaptchaSecretKey: "Secret key"
mcaptchaInstanceUrl: "mCaptcha Instanz-URL"
recaptcha: "reCAPTCHA"
enableRecaptcha: "reCAPTCHA aktivieren"
recaptchaSiteKey: "Site key"
@ -434,7 +441,7 @@ lastUsed: "Zuletzt benutzt"
lastUsedAt: "Zuletzt verwendet: {t}"
unregister: "Deaktivieren"
passwordLessLogin: "Passwortloses Anmelden"
passwordLessLoginDescription: "Ermöglicht passwortfreies Einloggen, nur via Security-Token oder Passkey"
passwordLessLoginDescription: "Ermöglicht passwortloses Einloggen mit einem Security-Token oder Passkey"
resetPassword: "Passwort zurücksetzen"
newPasswordIs: "Das neue Passwort ist „{password}“"
reduceUiAnimation: "Animationen der Benutzeroberfläche reduzieren"
@ -1171,6 +1178,9 @@ signupPendingError: "Beim Überprüfen der Mailadresse ist etwas schiefgelaufen.
cwNotationRequired: "Ist \"Inhaltswarnung verwenden\" aktiviert, muss eine Beschreibung gegeben werden."
doReaction: "Reagieren"
code: "Code"
decorate: "Dekorieren"
addMfmFunction: "MFM hinzufügen"
sfx: "Soundeffekte"
lastNDays: "Letzten {n} Tage"
_announcement:
forExistingUsers: "Nur für existierende Nutzer"
@ -1211,6 +1221,24 @@ _initialTutorial:
description: "Hier kannst du sehen, wie Misskey funktioniert"
_note:
title: "Was sind Notizen?"
description: "Beiträge auf Misskey heißen \"Notizen\". Notizen werden chronologisch in der Chronik angeordnet und in Echtzeit aktualisiert."
reply: "Klicke auf diesen Button, um auf eine Nachricht zu antworten. Es ist auch möglich, auf Antworten zu antworten und die Unterhaltung wie einen Thread fortzusetzen."
_reaction:
title: "Was sind Reaktionen?"
reactToContinue: "Füge eine Reaktion hinzu, um fortzufahren."
reactNotification: "Du erhältst Echtzeit-Benachrichtigungen, wenn jemand auf deine Notiz reagiert."
_postNote:
_visibility:
description: "Du kannst einschränken, wer deine Notiz sehen kann."
public: "Deine Notiz wird für alle Nutzer sichtbar sein."
doNotSendConfidencialOnDirect1: "Sei vorsichtig, wenn du sensible Informationen verschickst!"
_cw:
title: "Inhaltswarnung"
_done:
title: "Du hast das Tutorial abgeschlossen! 🎉"
_timelineDescription:
local: "In der lokalen Chronik siehst du Notizen von allen Benutzern auf diesem Server."
global: "In der globalen Chronik siehst du Notizen von allen föderierten Servern."
_serverRules:
description: "Eine Reihe von Regeln, die vor der Registrierung angezeigt werden. Eine Zusammenfassung der Nutzungsbedingungen anzuzeigen ist empfohlen."
_serverSettings:
@ -1224,6 +1252,7 @@ _serverSettings:
shortNameDescription: "Ein Kürzel für den Namen der Instanz, der angezeigt werden kann, falls der volle Instanzname lang ist."
fanoutTimelineDescription: "Ist diese Option aktiviert, kann eine erhebliche Verbesserung im Abrufen von Chroniken und eine Reduzierung der Datenbankbelastung erzielt werden, im Gegenzug zu einer Steigerung in der Speichernutzung von Redis. Bei geringem Serverspeicher oder Serverinstabilität kann diese Option deaktiviert werden."
fanoutTimelineDbFallback: "Auf die Datenbank zurückfallen"
fanoutTimelineDbFallbackDescription: "Ist diese Option aktiviert, wird die Chronik auf zusätzliche Abfragen in der Datenbank zurückgreifen, wenn sich die Chronik nicht im Cache befindet. Eine Deaktivierung führt zu geringerer Serverlast, aber schränkt den Zeitraum der abrufbaren Chronik ein. "
_accountMigration:
moveFrom: "Von einem anderen Konto zu diesem migrieren"
moveFromSub: "Alias für ein anderes Konto erstellen"
@ -1481,6 +1510,8 @@ _achievements:
_smashTestNotificationButton:
title: "Testüberfluss"
description: "Betätige den Benachrichtigungstest mehrfach innerhalb einer extrem kurzen Zeitspanne"
_tutorialCompleted:
description: "Tutorial abgeschlossen"
_role:
new: "Rolle erstellen"
edit: "Rolle bearbeiten"
@ -1535,8 +1566,8 @@ _role:
webhookMax: "Maximale Anzahl an Webhooks"
clipMax: "Maximale Anzahl an Clips"
noteEachClipsMax: "Maximale Anzahl an Notizen innerhalb eines Clips"
userListMax: "Maximale Anzahl an Benutzern in einer Benutzerliste"
userEachUserListsMax: "Maximale Anzahl an Benutzerlisten"
userListMax: "Maximale Anzahl an Benutzerlisten"
userEachUserListsMax: "Maximale Anzahl an Benutzern in einer Benutzerliste"
rateLimitFactor: "Versuchsanzahl"
descriptionOfRateLimitFactor: "Je niedriger desto weniger restriktiv, je höher destro restriktiver."
canHideAds: "Kann Werbung ausblenden"
@ -2250,5 +2281,9 @@ _externalResourceInstaller:
title: "Das Farbschema konnte nicht installiert werden"
description: "Während der Installation des Farbschemas ist ein Problem aufgetreten. Bitte versuche es erneut. Detaillierte Fehlerinformationen können über die Javascript-Konsole abgerufen werden."
_reversi:
blackOrWhite: "Schwarz/Weiß"
rules: "Regeln"
black: "Schwarz"
white: "Weiß"
total: "Gesamt"

View file

@ -649,7 +649,7 @@ smtpHost: "Host"
smtpPort: "Port"
smtpUser: "Username"
smtpPass: "Password"
emptyToDisableSmtpAuth: "Leave username and password empty to disable SMTP verification"
emptyToDisableSmtpAuth: "Leave username and password empty to disable SMTP authentication"
smtpSecure: "Use implicit SSL/TLS for SMTP connections"
smtpSecureInfo: "Turn this off when using STARTTLS"
testEmail: "Test email delivery"

View file

@ -399,7 +399,7 @@ antennaKeywords: "Mots clés à recevoir"
antennaExcludeKeywords: "Mots clés à exclure"
antennaKeywordsDescription: "Séparer avec des espaces pour la condition AND. Séparer avec un saut de ligne pour une condition OR."
notifyAntenna: "Me notifier pour les nouvelles notes"
withFileAntenna: "Notes ayant des attachements uniquement"
withFileAntenna: "Notes ayant des fichiers joints uniquement"
enableServiceworker: "Activer ServiceWorker"
antennaUsersDescription: "Saisissez un seul nom dutilisateur·rice par ligne"
caseSensitive: "Sensible à la casse"

2
locales/index.d.ts vendored
View file

@ -4894,7 +4894,7 @@ export interface Locale extends ILocale {
*/
"readConfirmText": ParameterizedString<"title">;
/**
* UXを損ねる可能性が高いため使
* UXを損ねる可能性が高いため使
*/
"shouldNotBeUsedToPresentPermanentInfo": string;
/**

View file

@ -102,7 +102,7 @@ defaultNoteVisibility: "Privacy predefinita delle note"
follow: "Segui"
followRequest: "Richiesta di follow"
followRequests: "Richieste di follow"
unfollow: "Interrompi following"
unfollow: "Smetti di seguire"
followRequestPending: "Richiesta in approvazione"
enterEmoji: "Inserisci emoji"
renote: "Rinota"
@ -380,9 +380,11 @@ hcaptcha: "hCaptcha"
enableHcaptcha: "Abilita hCaptcha"
hcaptchaSiteKey: "Chiave del sito"
hcaptchaSecretKey: "Chiave segreta"
mcaptcha: "mCaptcha"
enableMcaptcha: "Abilita hCaptcha"
mcaptchaSiteKey: "Chiave del sito"
mcaptchaSecretKey: "Chiave segreta"
mcaptchaInstanceUrl: "URL della istanza mCaptcha"
recaptcha: "reCAPTCHA"
enableRecaptcha: "Abilita reCAPTCHA"
recaptchaSiteKey: "Chiave del sito"
@ -630,6 +632,7 @@ medium: "Medio"
small: "Piccolo"
generateAccessToken: "Genera token di accesso"
permission: "Autorizzazioni "
adminPermission: "Privilegi amministrativi"
enableAll: "Abilita tutto"
disableAll: "Disabilita tutto"
tokenRequested: "Autorizza accesso al profilo"
@ -673,6 +676,7 @@ useGlobalSettingDesc: "Quando attiva, verranno utilizzate le impostazioni notifi
other: "Ulteriori"
regenerateLoginToken: "Genera di nuovo un token di connessione"
regenerateLoginTokenDescription: "Genera un nuovo token di autenticazione. Solitamente questa operazione non è necessaria: quando si genera un nuovo token, tutti i dispositivi vanno disconnessi."
theKeywordWhenSearchingForCustomEmoji: "Questa sarà la parola chiave durante la ricerca di emoji personalizzate"
setMultipleBySeparatingWithSpace: "È possibile creare multiple voci separate da spazi."
fileIdOrUrl: "ID o URL del file"
behavior: "Comportamento"
@ -869,7 +873,7 @@ pubSub: "Publish/Subscribe del profilo"
lastCommunication: "La comunicazione più recente"
resolved: "Risolto"
unresolved: "Non risolto"
breakFollow: "Interrompi follow"
breakFollow: "Impedire di seguirmi"
breakFollowConfirm: "Vuoi davvero che questo profilo smetta di seguirti?"
itsOn: "Abilitato"
itsOff: "Disabilitato"
@ -885,6 +889,8 @@ makeReactionsPublicDescription: "La lista delle reazioni che avete fatto è a di
classic: "Classico"
muteThread: "Silenzia conversazione"
unmuteThread: "Riattiva la conversazione"
followingVisibility: "Visibilità dei profili seguiti"
followersVisibility: "Visibilità dei profili che ti seguono"
continueThread: "Altre conversazioni"
deleteAccountConfirm: "Così verrà eliminato il profilo. Vuoi procedere?"
incorrectPassword: "La password è errata."
@ -1053,6 +1059,8 @@ limitWidthOfReaction: "Limita la larghezza delle reazioni e ridimensionale"
noteIdOrUrl: "ID della Nota o URL"
video: "Video"
videos: "Video"
audio: "Audio"
audioFiles: "Audio"
dataSaver: "Risparmia dati"
accountMigration: "Migrazione del profilo"
accountMoved: "Questo profilo ha migrato altrove:"
@ -1183,7 +1191,27 @@ remainingN: "Rimangono: {n}"
overwriteContentConfirm: "Vuoi davvero sostituire l'attuale contenuto?"
seasonalScreenEffect: "Schermate in base alla stagione"
decorate: "Decora"
addMfmFunction: "Aggiungi decorazioni"
enableQuickAddMfmFunction: "Attiva il selettore di funzioni MFM"
bubbleGame: "Bubble Game"
sfx: "Effetti sonori"
soundWillBePlayed: "Verrà riprodotto il suono"
showReplay: "Vedi i replay"
replay: "Replay"
replaying: "Replay in corso"
ranking: "Classifica"
lastNDays: "Ultimi {n} giorni"
backToTitle: "Torna al titolo"
hemisphere: "Geolocalizzazione"
withSensitive: "Mostra le Note con allegati espliciti"
userSaysSomethingSensitive: "Note da {name} con allegati espliciti"
enableHorizontalSwipe: "Trascina per invertire i tab"
_bubbleGame:
howToPlay: "Come giocare"
_howToPlay:
section1: "Regola la posizione e rilascia l'oggetto nella casella."
section2: "Ottieni un punteggio, quando due oggetti dello stesso tipo si toccano e si trasformano in un oggetto diverso."
section3: "Se gli oggetti traboccano dalla scatola, il gioco finisce. Cerca di ottenere un punteggio elevato fondendo gli oggetti, evitando che escano dalla scatola!"
_announcement:
forExistingUsers: "Solo ai profili attuali"
forExistingUsersDescription: "L'annuncio sarà visibile solo ai profili esistenti in questo momento. Se disabilitato, sarà visibile anche ai profili che verranno creati dopo la pubblicazione di questo annuncio."
@ -1554,6 +1582,13 @@ _achievements:
_tutorialCompleted:
title: "Attestato di partecipazione al corso per principianti di Misskey"
description: "Ha completato il tutorial"
_bubbleGameExplodingHead:
title: "🤯"
description: "Estrai l'oggetto più grande dal Bubble Game"
_bubbleGameDoubleExplodingHead:
title: "Doppio 🤯"
description: "Due oggetti più grossi contemporaneamente nel Bubble Game"
flavor: "Ha le dimensioni di una bento-box 🤯 🤯"
_role:
new: "Nuovo ruolo"
edit: "Modifica ruolo"
@ -1644,6 +1679,7 @@ _emailUnavailable:
disposable: "Indirizzo email non utilizzabile"
mx: "Server email non corretto"
smtp: "Il server email non risponde"
banned: "Non puoi registrarti con questo indirizzo email"
_ffVisibility:
public: "Pubblica"
followers: "Mostra solo ai follower"
@ -1935,6 +1971,26 @@ _permissions:
"write:flash": "Modifica Play"
"read:flash-likes": "Visualizza lista di Play piaciuti"
"write:flash-likes": "Modifica lista di Play piaciuti"
"read:admin:abuse-user-reports": "Mostra i report dai profili utente"
"write:admin:delete-account": "Elimina l'account utente"
"write:admin:delete-all-files-of-a-user": "Elimina i file dell'account utente"
"read:admin:index-stats": "Visualizza informazioni sugli indici del database"
"read:admin:table-stats": "Visualizza informazioni sulle tabelle del database"
"read:admin:user-ips": "Visualizza indirizzi IP degli account"
"read:admin:meta": "Visualizza i metadati dell'istanza"
"write:admin:reset-password": "Ripristina la password dell'account utente"
"write:admin:resolve-abuse-user-report": "Risolvere le segnalazioni dagli account utente"
"write:admin:send-email": "Spedire email"
"read:admin:server-info": "Vedere le informazioni sul server"
"read:admin:show-moderation-log": "Vedere lo storico di moderazione"
"read:admin:show-user": "Vedere le informazioni private degli account utente"
"read:admin:show-users": "Vedere le informazioni private degli account utente"
"write:admin:suspend-user": "Sospendere i profili"
"write:admin:unset-user-avatar": "Rimuovere la foto profilo dai profili"
"write:admin:unset-user-banner": "Rimuovere l'immagine testata dai profili"
"write:admin:unsuspend-user": "Togliere la sospensione ai profili"
"write:admin:meta": "Modificare i metadati dell'istanza"
"write:admin:user-note": "Scrivere annotazioni di moderazione"
_auth:
shareAccessTitle: "Permessi dell'applicazione"
shareAccess: "Vuoi autorizzare {name} ad accedere al tuo profilo?"

View file

@ -1223,7 +1223,7 @@ _announcement:
tooManyActiveAnnouncementDescription: "アクティブなお知らせが多いため、UXが低下する可能性があります。終了したお知らせはアーカイブすることを検討してください。"
readConfirmTitle: "既読にしますか?"
readConfirmText: "「{title}」の内容を読み、既読にします。"
shouldNotBeUsedToPresentPermanentInfo: "特に新規ユーザーのUXを損ねる可能性が高いため、ストック情報ではなくフロー情報の掲示にお知らせを使用することを推奨します。"
shouldNotBeUsedToPresentPermanentInfo: "特に新規ユーザーのUXを損ねる可能性が高いため、常時掲示するための情報ではなく、即時性が求められる情報の掲示のためにお知らせを使用することを推奨します。"
dialogAnnouncementUxWarn: "ダイアログ形式のお知らせが同時に2つ以上ある場合、UXに悪影響を及ぼす可能性が非常に高いため、使用は慎重に行うことを推奨します。"
silence: "非通知"
silenceDescription: "オンにすると、このお知らせは通知されず、既読にする必要もなくなります。"

View file

@ -40,7 +40,7 @@ favorites: "질겨찾기"
unfavorite: "질겨찾기서 어ᇝ애기"
favorited: "질겨찾기에 담앗십니다."
alreadyFavorited: "벌시로 질겨찾기에 담기 잇십니다."
cantFavorite: "질겨찾기에 몬 담십니다."
cantFavorite: "질겨찾기에 몬 담십니다."
pin: "프로필에 붙이기"
unpin: "프로필서 띠기"
copyContent: "내용 복사하기"
@ -124,6 +124,7 @@ reactions: "반엉"
reactionSettingDescription2: "꺼시서 두고, 누질라서 뭉캐고, +’럴 누질라서 옇십니다."
rememberNoteVisibility: "공개 범위럴 기억하기"
attachCancel: "붙임 빼기"
deleteFile: "파일 뭉캐기"
markAsSensitive: "수ᇚ힘 설정"
unmarkAsSensitive: "수ᇚ힘 무루기"
enterFileName: "파일 이럼 서기"
@ -463,6 +464,8 @@ onlyOneFileCanBeAttached: "메시지엔 파일 하나까제밖에 몬 넣십니
invitations: "초대하기"
invitationCode: "초대장"
checking: "학인하고 잇십니다"
tooShort: "억수로 짜립니다"
tooLong: "억수로 집니다"
passwordMatched: "맞십니다"
passwordNotMatched: "안 맞십니다"
signinFailed: "로그인 몬 했십니다. 고 이름이랑 비밀번호 제대로 썼는가 확인해 주이소."
@ -515,7 +518,7 @@ objectStoragePrefixDesc: "요 Prefix 디렉토리 안에다가 파일이 들어
objectStorageEndpoint: "Endpoint"
objectStorageEndpointDesc: "AWS S3을 쓸라멘 요는 비워두고, 아이멘은 그 서비스 가이드에 맞게 endpoint를 넣어 주이소. '<host>' 내지 '<host>:<port>'처럼 넣십니다."
objectStorageRegion: "Region"
objectStorageRegionDesc: "'xx-east-1' 같은 region 이름을 옇어 주이소. 써먹을 서비스에 region 개념 같은 게 읎다! 카면은 대신에 'us-east-1'을 옇어 놓으이소. AWS 설정 파일이나 환경 변수를 갖다 끌어다 쓸 거면은 요는 비워 두이소."
objectStorageRegionDesc: "'xx-east-1' 같은 region 이름을 옇어 주이소. 만약에 내 서비스엔 region 같은 개념이 읎다, 카면은 대신에 'us-east-1'라고 해 두이소. AWS 설정 파일이나 환경 변수를 끌어다 쓰겠다믄 요는 비워 두이소."
objectStorageUseSSL: "SSL 쓰기"
objectStorageUseSSLDesc: "API 호출할 때 HTTPS 안 쓸거면은 꺼 두이소"
objectStorageUseProxy: "연결에 프락시 사용"
@ -538,7 +541,7 @@ volume: "음량"
masterVolume: "대빵 음량"
notUseSound: "음소거하기"
useSoundOnlyWhenActive: "Misskey가 활성화되어 있을 때만 소리 내기"
details: "좀 더"
details: "자세히"
chooseEmoji: "이모지 선택"
unableToProcess: "작업 다 몬 했십니다"
recentUsed: "최근 쓴 놈"
@ -571,7 +574,11 @@ userSilenced: "요 게정은... 수ᇚ혀 있십니다."
relays: "릴레이"
addRelay: "릴레이 옇기"
addedRelays: "옇은 릴레이"
deletedNote: "뭉캔 걸"
enableInfiniteScroll: "알아서 더 보기"
useCw: "내용 수ᇚ후기"
description: "설멩"
describeFile: "캡션 옇기"
author: "맨던 사람"
manage: "간리"
emailServer: "전자우펜 서버"
@ -600,6 +607,7 @@ renotesCount: "리노트한 수"
renotedCount: "리노트덴 수"
followingCount: "팔로우 수"
followersCount: "팔로워 수"
noteFavoritesCount: "질겨찾기한 노트 수"
clips: "클립 맨걸기"
clearCache: "캐시 비우기"
unlikeConfirm: "좋네예럴 무룹니꺼?"
@ -608,6 +616,7 @@ user: "사용자"
administration: "간리"
on: "킴"
off: "껌"
hide: "수ᇚ후기"
clickToFinishEmailVerification: "[{ok}]럴 누질라서 전자우펜 정멩얼 껕내이소."
searchByGoogle: "찾기"
tenMinutes: "십 분"
@ -626,9 +635,11 @@ role: "옉할"
noRole: "옉할이 없십니다"
thisPostMayBeAnnoyingCancel: "아이예"
likeOnly: "좋네예마"
myClips: "내 클립"
icon: "아바타"
replies: "답하기"
renotes: "리노트"
attach: "옇기"
_initialAccountSetting:
startTutorial: "길라잡이 하기"
_initialTutorial:
@ -641,9 +652,52 @@ _initialTutorial:
title: "길라잡이가 껕낫십니다!🎉"
_achievements:
_types:
_notes1:
description: "첫 노트럴 섯어예"
_notes10:
description: "노트럴 10번 섰어예"
_notes100:
description: "노트럴 100번 섰어예"
_notes500:
description: "노트럴 500번 섰어예"
_notes1000:
description: "노트럴 1,000번 섰어예"
_notes5000:
description: "노트럴 5,000번 섰어예"
_notes10000:
description: "노트럴 10,000번 섰어예"
_notes20000:
description: "노트럴 20,000번 섰어예"
_notes30000:
description: "노트럴 30,000번 섰어예"
_notes40000:
description: "노트럴 40,000번 섰어예"
_notes50000:
description: "노트럴 50,000번 섰어예"
_notes60000:
description: "노트럴 60,000번 섰어예"
_notes70000:
description: "노트럴 70,000번 섰어예"
_notes80000:
description: "노트럴 80,000번 섰어예"
_notes90000:
description: "노트럴 90,000번 섰어예"
_notes100000:
description: "노트럴 100,000번 섰어예"
_noteClipped1:
description: "첫 노트럴 클립햇어예"
_noteFavorited1:
description: "첫 노트럴 질겨찾기에 담앗어예"
_myNoteFavorited1:
description: "다런 사람이 내 노트럴 질겨찾기에 담앗십니다"
_iLoveMisskey:
description: "“I ❤ #Misskey”럴 섰어예"
_postedAt0min0sec:
description: "0분 0초에 노트를 섰어예"
_tutorialCompleted:
description: "길라잡이럴 껕냇십니다"
_gallery:
my: "내 걸"
liked: "좋네예한 걸"
like: "좋네예!"
unlike: "좋네예 무루기"
@ -654,7 +708,12 @@ _serverDisconnectedBehavior:
reload: "알아서 새로곤침"
_channel:
removeBanner: "배너 뭉캐기"
usersCount: "{n}명 참여"
notesCount: "노트 {n}개"
_menuDisplay:
hide: "수ᇚ후기"
_theme:
description: "설멩"
keys:
mention: "멘션"
_sfx:
@ -663,6 +722,9 @@ _sfx:
_2fa:
step3Title: "학인 기호럴 서기"
renewTOTPCancel: "뎃어예"
_permissions:
"read:favorites": "질겨찾기 보기"
"write:favorites": "질겨찾기 곤치기"
_widgets:
profile: "프로필"
instanceInfo: "서버 정보"
@ -674,7 +736,10 @@ _widgets:
_userList:
chooseList: "리스트 개리기"
_cw:
hide: "수ᇚ후기"
show: "더 볼래예"
chars: "걸자 {count}개"
files: "파일 {count}개"
_visibility:
home: "덜머리"
followers: "팔로워"
@ -682,6 +747,7 @@ _profile:
name: "이럼"
username: "사용자 이럼"
_exportOrImport:
favoritedNotes: "질겨찾기한 노트"
clips: "클립 맨걸기"
followingList: "팔로잉"
muteList: "수ᇚ후기"
@ -692,16 +758,20 @@ _charts:
_timelines:
home: "덜머리"
_play:
my: "내 플레이"
script: "스크립트"
summary: "설멩"
_pages:
like: "좋네예"
unlike: "좋네예 무루기"
my: "내 페이지"
blocks:
image: "이미지"
_note:
id: "노트 아이디"
_notification:
youWereFollowed: "새 팔로워가 잇십니다"
newNote: "새 걸"
_types:
follow: "팔로잉"
mention: "멘션"

View file

@ -279,7 +279,7 @@ uploadFromUrl: "URL 업로드"
uploadFromUrlDescription: "업로드하려는 파일의 URL"
uploadFromUrlRequested: "업로드를 요청했습니다"
uploadFromUrlMayTakeTime: "업로드가 완료될 때까지 시간이 소요될 수 있습니다."
explore: "발견하기"
explore: "둘러보기"
messageRead: "읽음"
noMoreHistory: "이것보다 과거의 기록이 없습니다"
startMessaging: "대화 시작하기"
@ -1022,7 +1022,7 @@ internalServerError: "내부 서버 오류"
internalServerErrorDescription: "내부 서버에서 예기치 않은 오류가 발생했습니다."
copyErrorInfo: "오류 정보 복사"
joinThisServer: "이 서버에 가입"
exploreOtherServers: "다른 서버 둘러보기"
exploreOtherServers: "다른 서버 기"
letsLookAtTimeline: "타임라인 구경하기"
disableFederationConfirm: "정말로 연합을 끄시겠습니까?"
disableFederationConfirmWarn: "연합을 끄더라도 게시물이 비공개로 전환되는 것은 아닙니다. 대부분의 경우 연합을 비활성화할 필요가 없습니다."
@ -1797,7 +1797,7 @@ _instanceMute:
title: "지정한 서버의 노트를 숨깁니다."
heading: "뮤트할 서버"
_theme:
explore: "테마 찾아보기"
explore: "테마 둘러보기"
install: "테마 설치"
manage: "테마 관리"
code: "테마 코드"
@ -2022,7 +2022,7 @@ _permissions:
"write:report-abuse": "위반 내용 신고하기"
_auth:
shareAccessTitle: "어플리케이션의 접근 허가"
shareAccess: "\"{name}\" 이 계정에 접근하는 것을 허용하시겠습니까?"
shareAccess: "{name}’에서 계정에 접근하는 것을 허용하시겠습니까?"
shareAccessAsk: "이 애플리케이션이 계정에 접근하는 것을 허용하시겠습니까?"
permission: "{name}에서 다음 권한을 요청하였습니다"
permissionAsk: "이 앱은 다음의 권한을 요청합니다"
@ -2482,6 +2482,11 @@ _reversi:
freeMatch: "프리매치"
lookingForPlayer: "상대를 찾고 있습니다"
gameCanceled: "대국이 취소되었습니다"
shareToTlTheGameWhenStart: "대국 시작 시 타임라인에 대국을 게시"
iStartedAGame: "대국이 시작되었습니다! #MisskeyReversi"
opponentHasSettingsChanged: "상대방이 설정을 변경했습니다"
allowIrregularRules: "규칙변경 허가 (완전 자유)"
disallowIrregularRules: "규칙변경 없음"
_offlineScreen:
title: "오프라인 - 서버에 접속할 수 없습니다"
header: "서버에 접속할 수 없습니다"

View file

@ -1207,6 +1207,10 @@ userSaysSomethingSensitive: "含 {name} 敏感文件的帖子"
enableHorizontalSwipe: "滑动切换标签页"
_bubbleGame:
howToPlay: "游戏说明"
_howToPlay:
section1: "对准位置将Emoji投入盒子。"
section2: "相同的Emoji相互接触合成后会得到新的Emoji以此获得分数。"
section3: "如果Emoji从箱子中溢出游戏将会结束。在防止Emoji溢出的同时不断合成新的Emoji来获取更高的分数吧"
_announcement:
forExistingUsers: "仅限现有用户"
forExistingUsersDescription: "若启用,该公告将仅对创建此公告时存在的用户可见。 如果禁用,则在创建此公告后注册的用户也可以看到该公告。"
@ -1579,6 +1583,10 @@ _achievements:
description: "完成了教学"
_bubbleGameExplodingHead:
title: "🤯"
description: "你合成出了游戏里最大的Emoji"
_bubbleGameDoubleExplodingHead:
title: "两个🤯"
description: "你合成出了2个游戏里最大的Emoji"
_role:
new: "创建角色"
edit: "编辑角色"
@ -2437,9 +2445,41 @@ _hemisphere:
caption: "在某些客户端设置中用来确定季节"
_reversi:
reversi: "黑白棋"
gameSettings: "对局设置"
blackOrWhite: "先手/后手"
blackIs: "{name}执黑(先手)"
rules: "规则"
thisGameIsStartedSoon: "对局即将开始"
waitingForOther: "等待对手准备"
waitingForMe: "等待你的准备"
waitingBoth: "请准备"
ready: "准备就绪"
cancelReady: "重新准备"
opponentTurn: "对手的回合"
myTurn: "你的回合"
turnOf: "{name}的回合"
pastTurnOf: "{name}的回合"
timeout: "超时"
drawn: "平局"
won: "{name}获胜"
black: "黑"
white: "白"
total: "总计"
turnCount: "第{count}回合"
myGames: "我的对局"
allGames: "所有对局"
ended: "结束"
playing: "对局中"
canPutEverywhere: "无限制放置模式"
timeLimitForEachTurn: "1回合的时间限制"
freeMatch: "自由匹配"
lookingForPlayer: "正在寻找对手"
gameCanceled: "对局被取消了"
shareToTlTheGameWhenStart: "开始时在时间线发布对局"
iStartedAGame: "对局开始!#MisskeyReversi"
opponentHasSettingsChanged: "对手更改了设定"
allowIrregularRules: "允许非常规规则(完全自由)"
disallowIrregularRules: "禁止非常规规则"
_offlineScreen:
title: "离线——无法连接到服务器"
header: "无法连接到服务器"

View file

@ -1221,7 +1221,7 @@ _announcement:
tooManyActiveAnnouncementDescription: "有過多公告可能會影響使用者體驗。請考慮歸檔已結束的公告。"
readConfirmTitle: "標記為已讀嗎?"
readConfirmText: "閱讀「{title}」的內容並標記為已讀。"
shouldNotBeUsedToPresentPermanentInfo: "由於可能會破壞使用者體驗,尤其是對於新使用者而言,我們建議使用公告來發布有時效性的資訊而不是固定不變的資訊。"
shouldNotBeUsedToPresentPermanentInfo: "為了避免損害新用戶的使用體驗,建議使用公告來發布即時性的訊息,而不是用於固定不變的資訊。"
dialogAnnouncementUxWarn: "如果同時有 2 個以上對話方塊形式的公告存在,對於使用者體驗很可能會有不良的影響,因此建議謹慎使用。"
silence: "不發送通知"
silenceDescription: "啟用此選項後,將不會發送此公告的通知,並且無需將其標記為已讀。"

View file

@ -1,6 +1,6 @@
{
"name": "misskey",
"version": "2024.2.0-beta.7",
"version": "2024.2.0-beta.10",
"codename": "nasubi",
"repository": {
"type": "git",

View file

@ -3,6 +3,6 @@ import { genOpenapiSpec } from './built/server/api/openapi/gen-spec.js'
import { writeFileSync } from "node:fs";
const config = loadConfig();
const spec = genOpenapiSpec(config);
const spec = genOpenapiSpec(config, true);
writeFileSync('./built/api.json', JSON.stringify(spec), 'utf-8');

View file

@ -0,0 +1,16 @@
/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
export class FixMetaDisableRegistration1706791962000 {
name = 'FixMetaDisableRegistration1706791962000'
async up(queryRunner) {
await queryRunner.query(`alter table meta alter column "disableRegistration" set default true;`);
}
async down(queryRunner) {
await queryRunner.query(`alter table meta alter column "disableRegistration" set default false;`);
}
}

View file

@ -67,9 +67,9 @@
"dependencies": {
"@aws-sdk/client-s3": "3.412.0",
"@aws-sdk/lib-storage": "3.412.0",
"@bull-board/api": "5.10.2",
"@bull-board/fastify": "5.10.2",
"@bull-board/ui": "5.10.2",
"@bull-board/api": "5.14.0",
"@bull-board/fastify": "5.14.0",
"@bull-board/ui": "5.14.0",
"@discordapp/twemoji": "15.0.2",
"@fastify/accepts": "4.3.0",
"@fastify/cookie": "9.3.1",
@ -85,11 +85,11 @@
"@nestjs/core": "10.2.10",
"@nestjs/testing": "10.2.10",
"@peertube/http-signature": "1.7.0",
"@simplewebauthn/server": "9.0.0",
"@simplewebauthn/server": "9.0.1",
"@sinonjs/fake-timers": "11.2.2",
"@smithy/node-http-handler": "2.1.10",
"@swc/cli": "0.1.63",
"@swc/core": "1.3.105",
"@swc/core": "1.3.107",
"@twemoji/parser": "15.0.0",
"accepts": "1.3.8",
"ajv": "8.12.0",
@ -98,7 +98,7 @@
"bcryptjs": "2.4.3",
"blurhash": "2.0.5",
"body-parser": "1.20.2",
"bullmq": "5.1.4",
"bullmq": "5.1.5",
"cacheable-lookup": "7.0.0",
"cbor": "9.0.1",
"chalk": "5.3.0",
@ -115,7 +115,7 @@
"file-type": "19.0.0",
"fluent-ffmpeg": "2.1.2",
"form-data": "4.0.0",
"got": "14.0.0",
"got": "14.1.0",
"happy-dom": "10.0.3",
"hpagent": "1.2.0",
"http-link-header": "1.1.1",
@ -147,7 +147,7 @@
"otpauth": "9.2.2",
"parse5": "7.1.2",
"pg": "8.11.3",
"pkce-challenge": "4.0.1",
"pkce-challenge": "4.1.0",
"probe-image-size": "7.2.3",
"promise-limit": "2.7.0",
"pug": "3.0.2",
@ -168,12 +168,12 @@
"slacc": "0.0.10",
"strict-event-emitter-types": "2.0.0",
"stringz": "2.1.0",
"systeminformation": "5.21.23",
"systeminformation": "5.21.24",
"tinycolor2": "1.6.0",
"tmp": "0.2.1",
"tsc-alias": "1.8.8",
"tsconfig-paths": "4.2.0",
"typeorm": "0.3.19",
"typeorm": "0.3.20",
"typescript": "5.3.3",
"ulid": "2.3.0",
"vary": "1.1.2",
@ -184,7 +184,7 @@
"devDependencies": {
"@jest/globals": "29.7.0",
"@misskey-dev/eslint-plugin": "1.0.0",
"@nestjs/platform-express": "10.3.0",
"@nestjs/platform-express": "10.3.1",
"@simplewebauthn/typescript-types": "8.3.4",
"@swc/jest": "0.2.31",
"@types/accepts": "1.3.7",
@ -203,13 +203,13 @@
"@types/jsrsasign": "10.5.12",
"@types/mime-types": "2.1.4",
"@types/ms": "0.7.34",
"@types/node": "20.11.5",
"@types/node": "20.11.10",
"@types/node-fetch": "3.0.3",
"@types/nodemailer": "6.4.14",
"@types/oauth": "0.9.4",
"@types/oauth2orize": "1.11.3",
"@types/oauth2orize-pkce": "0.1.2",
"@types/pg": "8.10.9",
"@types/pg": "8.11.0",
"@types/pug": "2.0.10",
"@types/punycode": "2.1.3",
"@types/qrcode": "1.5.5",

View file

@ -78,10 +78,10 @@ type Source = {
deliverJobConcurrency?: number;
inboxJobConcurrency?: number;
relashionshipJobConcurrency?: number;
relationshipJobConcurrency?: number;
deliverJobPerSec?: number;
inboxJobPerSec?: number;
relashionshipJobPerSec?: number;
relationshipJobPerSec?: number;
deliverJobMaxAttempts?: number;
inboxJobMaxAttempts?: number;
@ -143,10 +143,10 @@ export type Config = {
outgoingAddressFamily: 'ipv4' | 'ipv6' | 'dual' | undefined;
deliverJobConcurrency: number | undefined;
inboxJobConcurrency: number | undefined;
relashionshipJobConcurrency: number | undefined;
relationshipJobConcurrency: number | undefined;
deliverJobPerSec: number | undefined;
inboxJobPerSec: number | undefined;
relashionshipJobPerSec: number | undefined;
relationshipJobPerSec: number | undefined;
deliverJobMaxAttempts: number | undefined;
inboxJobMaxAttempts: number | undefined;
proxyRemoteFiles: boolean | undefined;
@ -249,10 +249,10 @@ export function loadConfig(): Config {
outgoingAddressFamily: config.outgoingAddressFamily,
deliverJobConcurrency: config.deliverJobConcurrency,
inboxJobConcurrency: config.inboxJobConcurrency,
relashionshipJobConcurrency: config.relashionshipJobConcurrency,
relationshipJobConcurrency: config.relationshipJobConcurrency,
deliverJobPerSec: config.deliverJobPerSec,
inboxJobPerSec: config.inboxJobPerSec,
relashionshipJobPerSec: config.relashionshipJobPerSec,
relationshipJobPerSec: config.relationshipJobPerSec,
deliverJobMaxAttempts: config.deliverJobMaxAttempts,
inboxJobMaxAttempts: config.inboxJobMaxAttempts,
proxyRemoteFiles: config.proxyRemoteFiles,

View file

@ -96,7 +96,7 @@ export class AccountMoveService {
await this.apDeliverManagerService.deliverToFollowers(src, moveAct);
// Publish meUpdated event
const iObj = await this.userEntityService.pack<true, true>(src.id, src, { detail: true, includeSecrets: true });
const iObj = await this.userEntityService.pack(src.id, src, { schema: 'MeDetailed', includeSecrets: true });
this.globalEventService.publishMainStream(src.id, 'meUpdated', iObj);
// Unfollow after 24 hours

View file

@ -40,6 +40,8 @@ export class EmailService {
public async sendEmail(to: string, subject: string, html: string, text: string) {
const meta = await this.metaService.fetch(true);
if (!meta.enableEmail) return;
const iconUrl = `${this.config.url}/static-assets/mi-white.png`;
const emailSettingUrl = `${this.config.url}/settings/email`;

View file

@ -54,15 +54,15 @@ export interface MainEventTypes {
reply: Packed<'Note'>;
renote: Packed<'Note'>;
follow: Packed<'UserDetailedNotMe'>;
followed: Packed<'User'>;
unfollow: Packed<'User'>;
meUpdated: Packed<'User'>;
followed: Packed<'UserLite'>;
unfollow: Packed<'UserDetailedNotMe'>;
meUpdated: Packed<'MeDetailed'>;
pageEvent: {
pageId: MiPage['id'];
event: string;
var: any;
userId: MiUser['id'];
user: Packed<'User'>;
user: Packed<'UserDetailed'>;
};
urlUploadFinished: {
marker?: string | null;
@ -92,7 +92,7 @@ export interface MainEventTypes {
};
driveFileCreated: Packed<'DriveFile'>;
readAntenna: MiAntenna;
receiveFollowRequest: Packed<'User'>;
receiveFollowRequest: Packed<'UserLite'>;
announcementCreated: {
announcement: Packed<'Announcement'>;
};
@ -140,8 +140,8 @@ type NoteStreamEventTypes = {
};
export interface UserListEventTypes {
userAdded: Packed<'User'>;
userRemoved: Packed<'User'>;
userAdded: Packed<'UserLite'>;
userRemoved: Packed<'UserLite'>;
}
export interface AntennaEventTypes {

View file

@ -4,7 +4,7 @@
*/
import { Inject, Injectable } from '@nestjs/common';
import { IsNull } from 'typeorm';
import { IsNull, Not } from 'typeorm';
import type { MiLocalUser } from '@/models/User.js';
import type { UsersRepository } from '@/models/_.js';
import { MemorySingleCache } from '@/misc/cache.js';
@ -27,6 +27,14 @@ export class InstanceActorService {
this.cache = new MemorySingleCache<MiLocalUser>(Infinity);
}
@bindThis
public async realLocalUsersPresent(): Promise<boolean> {
return await this.usersRepository.existsBy({
host: IsNull(),
username: Not(ACTOR_USERNAME),
});
}
@bindThis
public async getInstanceActor(): Promise<MiLocalUser> {
const cached = this.cache.get();

View file

@ -16,6 +16,7 @@ import { MiUserKeypair } from '@/models/UserKeypair.js';
import { MiUsedUsername } from '@/models/UsedUsername.js';
import generateUserToken from '@/misc/generate-native-user-token.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { InstanceActorService } from '@/core/InstanceActorService.js';
import { bindThis } from '@/decorators.js';
import UsersChart from '@/core/chart/charts/users.js';
import { UtilityService } from '@/core/UtilityService.js';
@ -37,6 +38,7 @@ export class SignupService {
private userEntityService: UserEntityService,
private idService: IdService,
private metaService: MetaService,
private instanceActorService: InstanceActorService,
private usersChart: UsersChart,
) {
}
@ -81,7 +83,7 @@ export class SignupService {
throw new Error('USED_USERNAME');
}
const isTheFirstUser = (await this.usersRepository.countBy({ host: IsNull() })) === 0;
const isTheFirstUser = !await this.instanceActorService.realLocalUsersPresent();
if (!opts.ignorePreservedUsernames && !isTheFirstUser) {
const instance = await this.metaService.fetch(true);

View file

@ -109,13 +109,13 @@ export class UserBlockingService implements OnModuleInit {
if (this.userEntityService.isLocalUser(followee)) {
this.userEntityService.pack(followee, followee, {
detail: true,
schema: 'MeDetailed',
}).then(packed => this.globalEventService.publishMainStream(followee.id, 'meUpdated', packed));
}
if (this.userEntityService.isLocalUser(follower) && !silent) {
this.userEntityService.pack(followee, follower, {
detail: true,
schema: 'UserDetailedNotMe',
}).then(async packed => {
this.globalEventService.publishMainStream(follower.id, 'unfollow', packed);

View file

@ -293,9 +293,9 @@ export class UserFollowingService implements OnModuleInit {
if (this.userEntityService.isLocalUser(follower) && !silent) {
// Publish follow event
this.userEntityService.pack(followee.id, follower, {
detail: true,
schema: 'UserDetailedNotMe',
}).then(async packed => {
this.globalEventService.publishMainStream(follower.id, 'follow', packed as Packed<'UserDetailedNotMe'>);
this.globalEventService.publishMainStream(follower.id, 'follow', packed);
const webhooks = (await this.webhookService.getActiveWebhooks()).filter(x => x.userId === follower.id && x.on.includes('follow'));
for (const webhook of webhooks) {
@ -360,7 +360,7 @@ export class UserFollowingService implements OnModuleInit {
if (!silent && this.userEntityService.isLocalUser(follower)) {
// Publish unfollow event
this.userEntityService.pack(followee.id, follower, {
detail: true,
schema: 'UserDetailedNotMe',
}).then(async packed => {
this.globalEventService.publishMainStream(follower.id, 'unfollow', packed);
@ -500,7 +500,7 @@ export class UserFollowingService implements OnModuleInit {
this.userEntityService.pack(follower.id, followee).then(packed => this.globalEventService.publishMainStream(followee.id, 'receiveFollowRequest', packed));
this.userEntityService.pack(followee.id, followee, {
detail: true,
schema: 'MeDetailed',
}).then(packed => this.globalEventService.publishMainStream(followee.id, 'meUpdated', packed));
// 通知を作成
@ -548,7 +548,7 @@ export class UserFollowingService implements OnModuleInit {
});
this.userEntityService.pack(followee.id, followee, {
detail: true,
schema: 'MeDetailed',
}).then(packed => this.globalEventService.publishMainStream(followee.id, 'meUpdated', packed));
}
@ -576,7 +576,7 @@ export class UserFollowingService implements OnModuleInit {
}
this.userEntityService.pack(followee.id, followee, {
detail: true,
schema: 'MeDetailed',
}).then(packed => this.globalEventService.publishMainStream(followee.id, 'meUpdated', packed));
}
@ -696,7 +696,7 @@ export class UserFollowingService implements OnModuleInit {
@bindThis
private async publishUnfollow(followee: Both, follower: Local): Promise<void> {
const packedFollowee = await this.userEntityService.pack(followee.id, follower, {
detail: true,
schema: 'UserDetailedNotMe',
});
this.globalEventService.publishMainStream(follower.id, 'unfollow', packedFollowee);

View file

@ -225,20 +225,37 @@ export class ApPersonService implements OnModuleInit {
return null;
}
private async resolveAvatarAndBanner(user: MiRemoteUser, icon: any, image: any): Promise<Pick<MiRemoteUser, 'avatarId' | 'bannerId' | 'avatarUrl' | 'bannerUrl' | 'avatarBlurhash' | 'bannerBlurhash'>> {
private async resolveAvatarAndBanner(user: MiRemoteUser, icon: any, image: any): Promise<Partial<Pick<MiRemoteUser, 'avatarId' | 'bannerId' | 'avatarUrl' | 'bannerUrl' | 'avatarBlurhash' | 'bannerBlurhash'>>> {
if (user == null) throw new Error('failed to create user: user is null');
const [avatar, banner] = await Promise.all([icon, image].map(img => {
if (img == null) return null;
if (user == null) throw new Error('failed to create user: user is null');
// if we have an explicitly missing image, return an
// explicitly-null set of values
if ((img == null) || (typeof img === 'object' && img.url == null)) {
return { id: null, url: null, blurhash: null };
}
return this.apImageService.resolveImage(user, img).catch(() => null);
}));
/*
we don't want to return nulls on errors! if the database fields
are already null, nothing changes; if the database has old
values, we should keep those. The exception is if the remote has
actually removed the images: in that case, the block above
returns the special {id:null}&c value, and we return those
*/
return {
avatarId: avatar?.id ?? null,
bannerId: banner?.id ?? null,
avatarUrl: avatar ? this.driveFileEntityService.getPublicUrl(avatar, 'avatar') : null,
bannerUrl: banner ? this.driveFileEntityService.getPublicUrl(banner) : null,
avatarBlurhash: avatar?.blurhash ?? null,
bannerBlurhash: banner?.blurhash ?? null,
...( avatar ? {
avatarId: avatar.id,
avatarUrl: avatar.url ? this.driveFileEntityService.getPublicUrl(avatar, 'avatar') : null,
avatarBlurhash: avatar.blurhash,
} : {}),
...( banner ? {
bannerId: banner.id,
bannerUrl: banner.url ? this.driveFileEntityService.getPublicUrl(banner) : null,
bannerBlurhash: banner.blurhash,
} : {}),
};
}

View file

@ -94,6 +94,29 @@ type ToJsonSchema<S> = {
};
export function getJsonSchema<S extends Schema>(schema: S): ToJsonSchema<Unflatten<ChartResult<S>>> {
const unflatten = (str: string, parent: Record<string, any>) => {
const keys = str.split('.');
const key = keys.shift();
const nextKey = keys[0];
if (key == null) return;
if (parent.properties[key] == null) {
parent.properties[key] = nextKey ? {
type: 'object',
properties: {},
required: [],
} : {
type: 'array',
items: {
type: 'number',
},
};
}
if (nextKey) unflatten(keys.join('.'), parent.properties[key] as Record<string, any>);
};
const jsonSchema = {
type: 'object',
properties: {} as Record<string, unknown>,
@ -101,10 +124,7 @@ export function getJsonSchema<S extends Schema>(schema: S): ToJsonSchema<Unflatt
};
for (const k in schema) {
jsonSchema.properties[k] = {
type: 'array',
items: { type: 'number' },
};
unflatten(k, jsonSchema);
}
return jsonSchema as ToJsonSchema<Unflatten<ChartResult<S>>>;

View file

@ -38,13 +38,13 @@ export class AbuseUserReportEntityService {
targetUserId: report.targetUserId,
assigneeId: report.assigneeId,
reporter: this.userEntityService.pack(report.reporter ?? report.reporterId, null, {
detail: true,
schema: 'UserDetailedNotMe',
}),
targetUser: this.userEntityService.pack(report.targetUser ?? report.targetUserId, null, {
detail: true,
schema: 'UserDetailedNotMe',
}),
assignee: report.assigneeId ? this.userEntityService.pack(report.assignee ?? report.assigneeId, null, {
detail: true,
schema: 'UserDetailedNotMe',
}) : null,
forwarded: report.forwarded,
});

View file

@ -37,7 +37,7 @@ export class BlockingEntityService {
createdAt: this.idService.parse(blocking.id).date.toISOString(),
blockeeId: blocking.blockeeId,
blockee: this.userEntityService.pack(blocking.blockeeId, me, {
detail: true,
schema: 'UserDetailedNotMe',
}),
});
}

View file

@ -42,7 +42,7 @@ export class FlashEntityService {
createdAt: this.idService.parse(flash.id).date.toISOString(),
updatedAt: flash.updatedAt.toISOString(),
userId: flash.userId,
user: this.userEntityService.pack(flash.user ?? flash.userId, me), // { detail: true } すると無限ループするので注意
user: this.userEntityService.pack(flash.user ?? flash.userId, me), // { schema: 'UserDetailed' } すると無限ループするので注意
title: flash.title,
summary: flash.summary,
script: flash.script,

View file

@ -89,10 +89,10 @@ export class FollowingEntityService {
followeeId: following.followeeId,
followerId: following.followerId,
followee: opts.populateFollowee ? this.userEntityService.pack(following.followee ?? following.followeeId, me, {
detail: true,
schema: 'UserDetailedNotMe',
}) : undefined,
follower: opts.populateFollower ? this.userEntityService.pack(following.follower ?? following.followerId, me, {
detail: true,
schema: 'UserDetailedNotMe',
}) : undefined,
});
}

View file

@ -37,7 +37,7 @@ export class ModerationLogEntityService {
info: log.info,
userId: log.userId,
user: this.userEntityService.pack(log.user ?? log.userId, null, {
detail: true,
schema: 'UserDetailedNotMe',
}),
});
}

View file

@ -39,7 +39,7 @@ export class MutingEntityService {
expiresAt: muting.expiresAt ? muting.expiresAt.toISOString() : null,
muteeId: muting.muteeId,
mutee: this.userEntityService.pack(muting.muteeId, me, {
detail: true,
schema: 'UserDetailedNotMe',
}),
});
}

View file

@ -164,7 +164,7 @@ export class NoteEntityService implements OnModuleInit {
return {
multiple: poll.multiple,
expiresAt: poll.expiresAt,
expiresAt: poll.expiresAt?.toISOString() ?? null,
choices,
};
}
@ -324,9 +324,7 @@ export class NoteEntityService implements OnModuleInit {
id: note.id,
createdAt: this.idService.parse(note.id).date.toISOString(),
userId: note.userId,
user: this.userEntityService.pack(note.user ?? note.userId, me, {
detail: false,
}),
user: this.userEntityService.pack(note.user ?? note.userId, me),
text: text,
cw: note.cw,
visibility: note.visibility,

View file

@ -62,7 +62,7 @@ export class NotificationEntityService implements OnModuleInit {
},
hint?: {
packedNotes: Map<MiNote['id'], Packed<'Note'>>;
packedUsers: Map<MiUser['id'], Packed<'User'>>;
packedUsers: Map<MiUser['id'], Packed<'UserLite'>>;
},
): Promise<Packed<'Notification'>> {
const notification = src;
@ -76,9 +76,7 @@ export class NotificationEntityService implements OnModuleInit {
const userIfNeed = 'notifierId' in notification ? (
hint?.packedUsers != null
? hint.packedUsers.get(notification.notifierId)
: this.userEntityService.pack(notification.notifierId, { id: meId }, {
detail: false,
})
: this.userEntityService.pack(notification.notifierId, { id: meId })
) : undefined;
const role = notification.type === 'roleAssigned' ? await this.roleEntityService.pack(notification.roleId) : undefined;
@ -131,9 +129,7 @@ export class NotificationEntityService implements OnModuleInit {
const users = userIds.length > 0 ? await this.usersRepository.find({
where: { id: In(userIds) },
}) : [];
const packedUsersArray = await this.userEntityService.packMany(users, { id: meId }, {
detail: false,
});
const packedUsersArray = await this.userEntityService.packMany(users, { id: meId });
const packedUsers = new Map(packedUsersArray.map(p => [p.id, p]));
// 既に解決されたフォローリクエストの通知を除外
@ -161,7 +157,7 @@ export class NotificationEntityService implements OnModuleInit {
},
hint?: {
packedNotes: Map<MiNote['id'], Packed<'Note'>>;
packedUsers: Map<MiUser['id'], Packed<'User'>>;
packedUsers: Map<MiUser['id'], Packed<'UserLite'>>;
},
): Promise<Packed<'Notification'>> {
const notification = src;
@ -175,18 +171,14 @@ export class NotificationEntityService implements OnModuleInit {
const userIfNeed = 'notifierId' in notification ? (
hint?.packedUsers != null
? hint.packedUsers.get(notification.notifierId)
: this.userEntityService.pack(notification.notifierId, { id: meId }, {
detail: false,
})
: this.userEntityService.pack(notification.notifierId, { id: meId })
) : undefined;
if (notification.type === 'reaction:grouped') {
const reactions = await Promise.all(notification.reactions.map(async reaction => {
const user = hint?.packedUsers != null
? hint.packedUsers.get(reaction.userId)!
: await this.userEntityService.pack(reaction.userId, { id: meId }, {
detail: false,
});
: await this.userEntityService.pack(reaction.userId, { id: meId });
return {
user,
reaction: reaction.reaction,
@ -206,9 +198,7 @@ export class NotificationEntityService implements OnModuleInit {
return packedUser;
}
return this.userEntityService.pack(userId, { id: meId }, {
detail: false,
});
return this.userEntityService.pack(userId, { id: meId });
}));
return await awaitAll({
id: notification.id,
@ -275,9 +265,7 @@ export class NotificationEntityService implements OnModuleInit {
const users = userIds.length > 0 ? await this.usersRepository.find({
where: { id: In(userIds) },
}) : [];
const packedUsersArray = await this.userEntityService.packMany(users, { id: meId }, {
detail: false,
});
const packedUsersArray = await this.userEntityService.packMany(users, { id: meId });
const packedUsers = new Map(packedUsersArray.map(p => [p.id, p]));
// 既に解決されたフォローリクエストの通知を除外

View file

@ -90,7 +90,7 @@ export class PageEntityService {
createdAt: this.idService.parse(page.id).date.toISOString(),
updatedAt: page.updatedAt.toISOString(),
userId: page.userId,
user: this.userEntityService.pack(page.user ?? page.userId, me), // { detail: true } すると無限ループするので注意
user: this.userEntityService.pack(page.user ?? page.userId, me), // { schema: 'UserDetailed' } すると無限ループするので注意
content: page.content,
variables: page.variables,
title: page.title,

View file

@ -38,7 +38,7 @@ export class RenoteMutingEntityService {
createdAt: this.idService.parse(muting.id).date.toISOString(),
muteeId: muting.muteeId,
mutee: this.userEntityService.pack(muting.muteeId, me, {
detail: true,
schema: 'UserDetailedNotMe',
}),
});
}

View file

@ -30,14 +30,6 @@ import type { NoteEntityService } from './NoteEntityService.js';
import type { DriveFileEntityService } from './DriveFileEntityService.js';
import type { PageEntityService } from './PageEntityService.js';
type IsUserDetailed<Detailed extends boolean> = Detailed extends true ? Packed<'UserDetailed'> : Packed<'UserLite'>;
type IsMeAndIsUserDetailed<ExpectsMe extends boolean | null, Detailed extends boolean> =
Detailed extends true ?
ExpectsMe extends true ? Packed<'MeDetailed'> :
ExpectsMe extends false ? Packed<'UserDetailedNotMe'> :
Packed<'UserDetailed'> :
Packed<'UserLite'>;
const Ajv = _Ajv.default;
const ajv = new Ajv();
@ -303,33 +295,34 @@ export class UserEntityService implements OnModuleInit {
return `${this.config.url}/users/${userId}`;
}
public async pack<ExpectsMe extends boolean | null = null, D extends boolean = false>(
public async pack<S extends 'MeDetailed' | 'UserDetailedNotMe' | 'UserDetailed' | 'UserLite' = 'UserLite'>(
src: MiUser['id'] | MiUser,
me?: { id: MiUser['id']; } | null | undefined,
options?: {
detail?: D,
schema?: S,
includeSecrets?: boolean,
userProfile?: MiUserProfile,
},
): Promise<IsMeAndIsUserDetailed<ExpectsMe, D>> {
): Promise<Packed<S>> {
const opts = Object.assign({
detail: false,
schema: 'UserLite',
includeSecrets: false,
}, options);
const user = typeof src === 'object' ? src : await this.usersRepository.findOneByOrFail({ id: src });
const isDetailed = opts.schema !== 'UserLite';
const meId = me ? me.id : null;
const isMe = meId === user.id;
const iAmModerator = me ? await this.roleService.isModerator(me as MiUser) : false;
const relation = meId && !isMe && opts.detail ? await this.getRelation(meId, user.id) : null;
const pins = opts.detail ? await this.userNotePiningsRepository.createQueryBuilder('pin')
const relation = meId && !isMe && isDetailed ? await this.getRelation(meId, user.id) : null;
const pins = isDetailed ? await this.userNotePiningsRepository.createQueryBuilder('pin')
.where('pin.userId = :userId', { userId: user.id })
.innerJoinAndSelect('pin.note', 'note')
.orderBy('pin.id', 'DESC')
.getMany() : [];
const profile = opts.detail ? (opts.userProfile ?? await this.userProfilesRepository.findOneByOrFail({ userId: user.id })) : null;
const profile = isDetailed ? (opts.userProfile ?? await this.userProfilesRepository.findOneByOrFail({ userId: user.id })) : null;
const followingCount = profile == null ? null :
(profile.followingVisibility === 'public') || isMe ? user.followingCount :
@ -341,15 +334,15 @@ export class UserEntityService implements OnModuleInit {
(profile.followersVisibility === 'followers') && (relation && relation.isFollowing) ? user.followersCount :
null;
const isModerator = isMe && opts.detail ? this.roleService.isModerator(user) : null;
const isAdmin = isMe && opts.detail ? this.roleService.isAdministrator(user) : null;
const unreadAnnouncements = isMe && opts.detail ?
const isModerator = isMe && isDetailed ? this.roleService.isModerator(user) : null;
const isAdmin = isMe && isDetailed ? this.roleService.isAdministrator(user) : null;
const unreadAnnouncements = isMe && isDetailed ?
(await this.announcementService.getUnreadAnnouncements(user)).map((announcement) => ({
createdAt: this.idService.parse(announcement.id).date.toISOString(),
...announcement,
})) : null;
const notificationsInfo = isMe && opts.detail ? await this.getNotificationsInfo(user.id) : null;
const notificationsInfo = isMe && isDetailed ? await this.getNotificationsInfo(user.id) : null;
const packed = {
id: user.id,
@ -385,7 +378,7 @@ export class UserEntityService implements OnModuleInit {
displayOrder: r.displayOrder,
}))) : undefined,
...(opts.detail ? {
...(isDetailed ? {
url: profile!.url,
uri: user.uri,
movedTo: user.movedToUri ? this.apPersonService.resolvePerson(user.movedToUri).then(user => user.id).catch(() => null) : null,
@ -416,7 +409,7 @@ export class UserEntityService implements OnModuleInit {
}),
pinnedPageId: profile!.pinnedPageId,
pinnedPage: profile!.pinnedPageId ? this.pageEntityService.pack(profile!.pinnedPageId, me) : null,
publicReactions: profile!.publicReactions,
publicReactions: this.isLocalUser(user) ? profile!.publicReactions : false, // https://github.com/misskey-dev/misskey/issues/12964
followersVisibility: profile!.followersVisibility,
followingVisibility: profile!.followingVisibility,
twoFactorEnabled: profile!.twoFactorEnabled,
@ -443,7 +436,7 @@ export class UserEntityService implements OnModuleInit {
moderationNote: iAmModerator ? (profile!.moderationNote ?? '') : undefined,
} : {}),
...(opts.detail && isMe ? {
...(isDetailed && isMe ? {
avatarId: user.avatarId,
bannerId: user.bannerId,
isModerator: isModerator,
@ -515,19 +508,19 @@ export class UserEntityService implements OnModuleInit {
notify: relation.following?.notify ?? 'none',
withReplies: relation.following?.withReplies ?? false,
} : {}),
} as Promiseable<Packed<'User'>> as Promiseable<IsMeAndIsUserDetailed<ExpectsMe, D>>;
} as Promiseable<Packed<S>>;
return await awaitAll(packed);
}
public packMany<D extends boolean = false>(
public packMany<S extends 'MeDetailed' | 'UserDetailedNotMe' | 'UserDetailed' | 'UserLite' = 'UserLite'>(
users: (MiUser['id'] | MiUser)[],
me?: { id: MiUser['id'] } | null | undefined,
options?: {
detail?: D,
schema?: S,
includeSecrets?: boolean,
},
): Promise<IsUserDetailed<D>[]> {
): Promise<Packed<S>[]> {
return Promise.all(users.map(u => this.pack(u, me, options)));
}
}

View file

@ -6,7 +6,7 @@
// structredCloneが遅いため
// SEE: http://var.blog.jp/archives/86038606.html
type Cloneable = string | number | boolean | null | { [key: string]: Cloneable } | Cloneable[];
type Cloneable = string | number | boolean | null | undefined | { [key: string]: Cloneable } | Cloneable[];
export function deepClone<T extends Cloneable>(x: T): T {
if (typeof x === 'object') {
@ -14,7 +14,7 @@ export function deepClone<T extends Cloneable>(x: T): T {
if (Array.isArray(x)) return x.map(deepClone) as T;
const obj = {} as Record<string, Cloneable>;
for (const [k, v] of Object.entries(x)) {
obj[k] = deepClone(v);
obj[k] = v === undefined ? undefined : deepClone(v);
}
return obj as T;
} else {

View file

@ -25,7 +25,7 @@ import { packedBlockingSchema } from '@/models/json-schema/blocking.js';
import { packedNoteReactionSchema } from '@/models/json-schema/note-reaction.js';
import { packedHashtagSchema } from '@/models/json-schema/hashtag.js';
import { packedInviteCodeSchema } from '@/models/json-schema/invite-code.js';
import { packedPageSchema } from '@/models/json-schema/page.js';
import { packedPageSchema, packedPageBlockSchema } from '@/models/json-schema/page.js';
import { packedNoteFavoriteSchema } from '@/models/json-schema/note-favorite.js';
import { packedChannelSchema } from '@/models/json-schema/channel.js';
import { packedAntennaSchema } from '@/models/json-schema/antenna.js';
@ -37,7 +37,7 @@ import { packedEmojiDetailedSchema, packedEmojiSimpleSchema } from '@/models/jso
import { packedFlashSchema } from '@/models/json-schema/flash.js';
import { packedAnnouncementSchema } from '@/models/json-schema/announcement.js';
import { packedSigninSchema } from '@/models/json-schema/signin.js';
import { packedRoleLiteSchema, packedRoleSchema } from '@/models/json-schema/role.js';
import { packedRoleLiteSchema, packedRoleSchema, packedRolePoliciesSchema } from '@/models/json-schema/role.js';
import { packedAdSchema } from '@/models/json-schema/ad.js';
import { packedReversiGameLiteSchema, packedReversiGameDetailedSchema } from '@/models/json-schema/reversi-game.js';
@ -67,6 +67,7 @@ export const refs = {
Hashtag: packedHashtagSchema,
InviteCode: packedInviteCodeSchema,
Page: packedPageSchema,
PageBlock: packedPageBlockSchema,
Channel: packedChannelSchema,
QueueCount: packedQueueCountSchema,
Antenna: packedAntennaSchema,
@ -79,12 +80,16 @@ export const refs = {
Signin: packedSigninSchema,
RoleLite: packedRoleLiteSchema,
Role: packedRoleSchema,
RolePolicies: packedRolePoliciesSchema,
ReversiGameLite: packedReversiGameLiteSchema,
ReversiGameDetailed: packedReversiGameDetailedSchema,
};
export type Packed<x extends keyof typeof refs> = SchemaType<typeof refs[x]>;
export type KeyOf<x extends keyof typeof refs> = PropertiesToUnion<typeof refs[x]>;
type PropertiesToUnion<p extends Schema> = p['properties'] extends NonNullable<Obj> ? keyof p['properties'] : never;
type TypeStringef = 'null' | 'boolean' | 'integer' | 'number' | 'string' | 'array' | 'object' | 'any';
type StringDefToType<T extends TypeStringef> =
T extends 'null' ? null :
@ -114,6 +119,7 @@ export interface Schema extends OfSchema {
readonly example?: any;
readonly format?: string;
readonly ref?: keyof typeof refs;
readonly selfRef?: boolean;
readonly enum?: ReadonlyArray<string | null>;
readonly default?: (this['type'] extends TypeStringef ? StringDefToType<this['type']> : any) | null;
readonly maxLength?: number;

View file

@ -38,7 +38,7 @@ export class MiAnnouncement {
length: 256, nullable: false,
default: 'info',
})
public icon: string;
public icon: 'info' | 'warning' | 'error' | 'success';
// normal ... お知らせページ掲載
// banner ... お知らせページ掲載 + バナー表示
@ -47,7 +47,7 @@ export class MiAnnouncement {
length: 256, nullable: false,
default: 'normal',
})
public display: string;
public display: 'normal' | 'banner' | 'dialog';
@Column('boolean', {
default: false,

View file

@ -37,10 +37,12 @@ export const packedAnnouncementSchema = {
icon: {
type: 'string',
optional: false, nullable: false,
enum: ['info', 'warning', 'error', 'success'],
},
display: {
type: 'string',
optional: false, nullable: false,
enum: ['dialog', 'normal', 'banner'],
},
needConfirmationToRead: {
type: 'boolean',

View file

@ -25,7 +25,7 @@ export const packedBlockingSchema = {
blockee: {
type: 'object',
optional: false, nullable: false,
ref: 'UserDetailed',
ref: 'UserDetailedNotMe',
},
},
} as const;

View file

@ -30,12 +30,12 @@ export const packedFollowingSchema = {
followee: {
type: 'object',
optional: true, nullable: false,
ref: 'UserDetailed',
ref: 'UserDetailedNotMe',
},
follower: {
type: 'object',
optional: true, nullable: false,
ref: 'UserDetailed',
ref: 'UserDetailedNotMe',
},
},
} as const;

View file

@ -30,7 +30,7 @@ export const packedMutingSchema = {
mutee: {
type: 'object',
optional: false, nullable: false,
ref: 'UserDetailed',
ref: 'UserDetailedNotMe',
},
},
} as const;

View file

@ -69,6 +69,7 @@ export const packedNoteSchema = {
visibility: {
type: 'string',
optional: false, nullable: false,
enum: ['public', 'home', 'followers', 'specified'],
},
mentions: {
type: 'array',
@ -117,6 +118,48 @@ export const packedNoteSchema = {
poll: {
type: 'object',
optional: true, nullable: true,
properties: {
expiresAt: {
type: 'string',
optional: true, nullable: true,
format: 'date-time',
},
multiple: {
type: 'boolean',
optional: false, nullable: false,
},
choices: {
type: 'array',
optional: false, nullable: false,
items: {
type: 'object',
optional: false, nullable: false,
properties: {
isVoted: {
type: 'boolean',
optional: false, nullable: false,
},
text: {
type: 'string',
optional: false, nullable: false,
},
votes: {
type: 'number',
optional: false, nullable: false,
},
},
},
},
},
},
emojis: {
type: 'object',
optional: true, nullable: false,
additionalProperties: {
anyOf: [{
type: 'string',
}],
},
},
channelId: {
type: 'string',
@ -162,9 +205,23 @@ export const packedNoteSchema = {
type: 'string',
optional: false, nullable: true,
},
reactionEmojis: {
type: 'object',
optional: false, nullable: false,
additionalProperties: {
anyOf: [{
type: 'string',
}],
},
},
reactions: {
type: 'object',
optional: false, nullable: false,
additionalProperties: {
anyOf: [{
type: 'number',
}],
},
},
renoteCount: {
type: 'number',
@ -196,7 +253,7 @@ export const packedNoteSchema = {
},
myReaction: {
type: 'object',
type: 'string',
optional: true, nullable: true,
},
},

View file

@ -5,7 +5,7 @@
import { notificationTypes } from '@/types.js';
export const packedNotificationSchema = {
const baseSchema = {
type: 'object',
properties: {
id: {
@ -23,68 +23,368 @@ export const packedNotificationSchema = {
optional: false, nullable: false,
enum: [...notificationTypes, 'reaction:grouped', 'renote:grouped'],
},
user: {
type: 'object',
ref: 'UserLite',
optional: true, nullable: true,
},
userId: {
type: 'string',
optional: true, nullable: true,
format: 'id',
},
note: {
type: 'object',
ref: 'Note',
optional: true, nullable: true,
},
reaction: {
type: 'string',
optional: true, nullable: true,
},
achievement: {
type: 'string',
optional: true, nullable: false,
},
body: {
type: 'string',
optional: true, nullable: true,
},
header: {
type: 'string',
optional: true, nullable: true,
},
icon: {
type: 'string',
optional: true, nullable: true,
},
reactions: {
type: 'array',
optional: true, nullable: true,
items: {
type: 'object',
properties: {
user: {
type: 'object',
ref: 'UserLite',
optional: false, nullable: false,
},
reaction: {
type: 'string',
optional: false, nullable: false,
},
},
required: ['user', 'reaction'],
},
} as const;
export const packedNotificationSchema = {
type: 'object',
oneOf: [{
type: 'object',
properties: {
...baseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['note'],
},
},
users: {
type: 'array',
optional: true, nullable: true,
items: {
user: {
type: 'object',
ref: 'UserLite',
optional: false, nullable: false,
},
userId: {
type: 'string',
optional: false, nullable: false,
format: 'id',
},
note: {
type: 'object',
ref: 'Note',
optional: false, nullable: false,
},
},
},
}, {
type: 'object',
properties: {
...baseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['mention'],
},
user: {
type: 'object',
ref: 'UserLite',
optional: false, nullable: false,
},
userId: {
type: 'string',
optional: false, nullable: false,
format: 'id',
},
note: {
type: 'object',
ref: 'Note',
optional: false, nullable: false,
},
},
}, {
type: 'object',
properties: {
...baseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['reply'],
},
user: {
type: 'object',
ref: 'UserLite',
optional: false, nullable: false,
},
userId: {
type: 'string',
optional: false, nullable: false,
format: 'id',
},
note: {
type: 'object',
ref: 'Note',
optional: false, nullable: false,
},
},
}, {
type: 'object',
properties: {
...baseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['renote'],
},
user: {
type: 'object',
ref: 'UserLite',
optional: false, nullable: false,
},
userId: {
type: 'string',
optional: false, nullable: false,
format: 'id',
},
note: {
type: 'object',
ref: 'Note',
optional: false, nullable: false,
},
},
}, {
type: 'object',
properties: {
...baseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['quote'],
},
user: {
type: 'object',
ref: 'UserLite',
optional: false, nullable: false,
},
userId: {
type: 'string',
optional: false, nullable: false,
format: 'id',
},
note: {
type: 'object',
ref: 'Note',
optional: false, nullable: false,
},
},
}, {
type: 'object',
properties: {
...baseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['reaction'],
},
user: {
type: 'object',
ref: 'UserLite',
optional: false, nullable: false,
},
userId: {
type: 'string',
optional: false, nullable: false,
format: 'id',
},
note: {
type: 'object',
ref: 'Note',
optional: false, nullable: false,
},
reaction: {
type: 'string',
optional: false, nullable: false,
},
},
}, {
type: 'object',
properties: {
...baseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['pollEnded'],
},
user: {
type: 'object',
ref: 'UserLite',
optional: false, nullable: false,
},
userId: {
type: 'string',
optional: false, nullable: false,
format: 'id',
},
note: {
type: 'object',
ref: 'Note',
optional: false, nullable: false,
},
},
}, {
type: 'object',
properties: {
...baseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['follow'],
},
user: {
type: 'object',
ref: 'UserLite',
optional: false, nullable: false,
},
userId: {
type: 'string',
optional: false, nullable: false,
format: 'id',
},
},
}, {
type: 'object',
properties: {
...baseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['receiveFollowRequest'],
},
user: {
type: 'object',
ref: 'UserLite',
optional: false, nullable: false,
},
userId: {
type: 'string',
optional: false, nullable: false,
format: 'id',
},
},
}, {
type: 'object',
properties: {
...baseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['followRequestAccepted'],
},
user: {
type: 'object',
ref: 'UserLite',
optional: false, nullable: false,
},
userId: {
type: 'string',
optional: false, nullable: false,
format: 'id',
},
},
}, {
type: 'object',
properties: {
...baseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['roleAssigned'],
},
role: {
type: 'object',
ref: 'Role',
optional: false, nullable: false,
},
},
}, {
type: 'object',
properties: {
...baseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['achievementEarned'],
},
achievement: {
type: 'string',
optional: false, nullable: false,
},
},
}, {
type: 'object',
properties: {
...baseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['app'],
},
body: {
type: 'string',
optional: false, nullable: false,
},
header: {
type: 'string',
optional: false, nullable: false,
},
icon: {
type: 'string',
optional: false, nullable: false,
},
},
}, {
type: 'object',
properties: {
...baseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['reaction:grouped'],
},
note: {
type: 'object',
ref: 'Note',
optional: false, nullable: false,
},
reactions: {
type: 'array',
optional: false, nullable: false,
items: {
type: 'object',
properties: {
user: {
type: 'object',
ref: 'UserLite',
optional: false, nullable: false,
},
reaction: {
type: 'string',
optional: false, nullable: false,
},
},
required: ['user', 'reaction'],
},
},
},
}, {
type: 'object',
properties: {
...baseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['renote:grouped'],
},
note: {
type: 'object',
ref: 'Note',
optional: false, nullable: false,
},
users: {
type: 'array',
optional: false, nullable: false,
items: {
type: 'object',
ref: 'UserLite',
optional: false, nullable: false,
},
},
},
}, {
type: 'object',
properties: {
...baseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['test'],
},
},
}],
} as const;

View file

@ -3,6 +3,108 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
const blockBaseSchema = {
type: 'object',
properties: {
id: {
type: 'string',
optional: false, nullable: false,
},
type: {
type: 'string',
optional: false, nullable: false,
},
},
} as const;
const textBlockSchema = {
type: 'object',
properties: {
...blockBaseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['text'],
},
text: {
type: 'string',
optional: false, nullable: false,
},
},
} as const;
const sectionBlockSchema = {
type: 'object',
properties: {
...blockBaseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['section'],
},
title: {
type: 'string',
optional: false, nullable: false,
},
children: {
type: 'array',
optional: false, nullable: false,
items: {
type: 'object',
optional: false, nullable: false,
ref: 'PageBlock',
selfRef: true,
},
},
},
} as const;
const imageBlockSchema = {
type: 'object',
properties: {
...blockBaseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['image'],
},
fileId: {
type: 'string',
optional: false, nullable: true,
},
},
} as const;
const noteBlockSchema = {
type: 'object',
properties: {
...blockBaseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['note'],
},
detailed: {
type: 'boolean',
optional: false, nullable: false,
},
note: {
type: 'string',
optional: false, nullable: true,
},
},
} as const;
export const packedPageBlockSchema = {
type: 'object',
oneOf: [
textBlockSchema,
sectionBlockSchema,
imageBlockSchema,
noteBlockSchema,
],
} as const;
export const packedPageSchema = {
type: 'object',
properties: {
@ -38,6 +140,7 @@ export const packedPageSchema = {
items: {
type: 'object',
optional: false, nullable: false,
ref: 'PageBlock',
},
},
variables: {

View file

@ -25,7 +25,7 @@ export const packedRenoteMutingSchema = {
mutee: {
type: 'object',
optional: false, nullable: false,
ref: 'UserDetailed',
ref: 'UserDetailedNotMe',
},
},
} as const;

View file

@ -1,26 +1,103 @@
const rolePolicyValue = {
export const packedRolePoliciesSchema = {
type: 'object',
optional: false, nullable: false,
properties: {
value: {
oneOf: [
{
type: 'integer',
optional: false, nullable: false,
},
{
type: 'boolean',
optional: false, nullable: false,
},
],
gtlAvailable: {
type: 'boolean',
optional: false, nullable: false,
},
priority: {
ltlAvailable: {
type: 'boolean',
optional: false, nullable: false,
},
canPublicNote: {
type: 'boolean',
optional: false, nullable: false,
},
canInvite: {
type: 'boolean',
optional: false, nullable: false,
},
inviteLimit: {
type: 'integer',
optional: false, nullable: false,
},
useDefault: {
inviteLimitCycle: {
type: 'integer',
optional: false, nullable: false,
},
inviteExpirationTime: {
type: 'integer',
optional: false, nullable: false,
},
canManageCustomEmojis: {
type: 'boolean',
optional: false, nullable: false,
},
canManageAvatarDecorations: {
type: 'boolean',
optional: false, nullable: false,
},
canSearchNotes: {
type: 'boolean',
optional: false, nullable: false,
},
canUseTranslator: {
type: 'boolean',
optional: false, nullable: false,
},
canHideAds: {
type: 'boolean',
optional: false, nullable: false,
},
driveCapacityMb: {
type: 'integer',
optional: false, nullable: false,
},
alwaysMarkNsfw: {
type: 'boolean',
optional: false, nullable: false,
},
pinLimit: {
type: 'integer',
optional: false, nullable: false,
},
antennaLimit: {
type: 'integer',
optional: false, nullable: false,
},
wordMuteLimit: {
type: 'integer',
optional: false, nullable: false,
},
webhookLimit: {
type: 'integer',
optional: false, nullable: false,
},
clipLimit: {
type: 'integer',
optional: false, nullable: false,
},
noteEachClipsLimit: {
type: 'integer',
optional: false, nullable: false,
},
userListLimit: {
type: 'integer',
optional: false, nullable: false,
},
userEachUserListsLimit: {
type: 'integer',
optional: false, nullable: false,
},
rateLimitFactor: {
type: 'integer',
optional: false, nullable: false,
},
avatarDecorationLimit: {
type: 'integer',
optional: false, nullable: false,
},
},
} as const;
@ -121,31 +198,28 @@ export const packedRoleSchema = {
policies: {
type: 'object',
optional: false, nullable: false,
properties: {
pinLimit: rolePolicyValue,
canInvite: rolePolicyValue,
clipLimit: rolePolicyValue,
canHideAds: rolePolicyValue,
inviteLimit: rolePolicyValue,
antennaLimit: rolePolicyValue,
gtlAvailable: rolePolicyValue,
ltlAvailable: rolePolicyValue,
webhookLimit: rolePolicyValue,
canPublicNote: rolePolicyValue,
userListLimit: rolePolicyValue,
wordMuteLimit: rolePolicyValue,
alwaysMarkNsfw: rolePolicyValue,
canSearchNotes: rolePolicyValue,
driveCapacityMb: rolePolicyValue,
rateLimitFactor: rolePolicyValue,
inviteLimitCycle: rolePolicyValue,
noteEachClipsLimit: rolePolicyValue,
inviteExpirationTime: rolePolicyValue,
canManageCustomEmojis: rolePolicyValue,
userEachUserListsLimit: rolePolicyValue,
canManageAvatarDecorations: rolePolicyValue,
canUseTranslator: rolePolicyValue,
avatarDecorationLimit: rolePolicyValue,
additionalProperties: {
anyOf: [{
type: 'object',
properties: {
value: {
oneOf: [
{
type: 'integer',
},
{
type: 'boolean',
},
],
},
priority: {
type: 'integer',
},
useDefault: {
type: 'boolean',
},
},
}],
},
},
usersCount: {

View file

@ -590,104 +590,7 @@ export const packedMeDetailedOnlySchema = {
policies: {
type: 'object',
nullable: false, optional: false,
properties: {
gtlAvailable: {
type: 'boolean',
nullable: false, optional: false,
},
ltlAvailable: {
type: 'boolean',
nullable: false, optional: false,
},
canPublicNote: {
type: 'boolean',
nullable: false, optional: false,
},
canInvite: {
type: 'boolean',
nullable: false, optional: false,
},
inviteLimit: {
type: 'number',
nullable: false, optional: false,
},
inviteLimitCycle: {
type: 'number',
nullable: false, optional: false,
},
inviteExpirationTime: {
type: 'number',
nullable: false, optional: false,
},
canManageCustomEmojis: {
type: 'boolean',
nullable: false, optional: false,
},
canManageAvatarDecorations: {
type: 'boolean',
nullable: false, optional: false,
},
canSearchNotes: {
type: 'boolean',
nullable: false, optional: false,
},
canUseTranslator: {
type: 'boolean',
nullable: false, optional: false,
},
canHideAds: {
type: 'boolean',
nullable: false, optional: false,
},
driveCapacityMb: {
type: 'number',
nullable: false, optional: false,
},
alwaysMarkNsfw: {
type: 'boolean',
nullable: false, optional: false,
},
pinLimit: {
type: 'number',
nullable: false, optional: false,
},
antennaLimit: {
type: 'number',
nullable: false, optional: false,
},
wordMuteLimit: {
type: 'number',
nullable: false, optional: false,
},
webhookLimit: {
type: 'number',
nullable: false, optional: false,
},
clipLimit: {
type: 'number',
nullable: false, optional: false,
},
noteEachClipsLimit: {
type: 'number',
nullable: false, optional: false,
},
userListLimit: {
type: 'number',
nullable: false, optional: false,
},
userEachUserListsLimit: {
type: 'number',
nullable: false, optional: false,
},
rateLimitFactor: {
type: 'number',
nullable: false, optional: false,
},
avatarDecorationLimit: {
type: 'number',
nullable: false, optional: false,
},
},
ref: 'RolePolicies',
},
//#region secrets
email: {
@ -782,13 +685,5 @@ export const packedUserSchema = {
type: 'object',
ref: 'UserDetailed',
},
{
type: 'object',
ref: 'UserDetailedNotMe',
},
{
type: 'object',
ref: 'MeDetailed',
},
],
} as const;

View file

@ -283,9 +283,9 @@ export class QueueProcessorService implements OnApplicationShutdown {
}, {
...baseQueueOptions(this.config, QUEUE.RELATIONSHIP),
autorun: false,
concurrency: this.config.relashionshipJobConcurrency ?? 16,
concurrency: this.config.relationshipJobConcurrency ?? 16,
limiter: {
max: this.config.relashionshipJobPerSec ?? 64,
max: this.config.relationshipJobPerSec ?? 64,
duration: 1000,
},
});

View file

@ -204,7 +204,7 @@ export class ServerService implements OnApplicationShutdown {
});
this.globalEventService.publishMainStream(profile.userId, 'meUpdated', await this.userEntityService.pack(profile.userId, { id: profile.userId }, {
detail: true,
schema: 'MeDetailed',
includeSecrets: true,
}));

View file

@ -157,7 +157,7 @@ export class ApiServerService {
return {
ok: true,
token: token.token,
user: await this.userEntityService.pack(token.userId, null, { detail: true }),
user: await this.userEntityService.pack(token.userId, null, { schema: 'UserDetailedNotMe' }),
};
} else {
return {

View file

@ -213,7 +213,7 @@ export class SignupApiService {
});
const res = await this.userEntityService.pack(account, account, {
detail: true,
schema: 'MeDetailed',
includeSecrets: true,
});

View file

@ -4,8 +4,7 @@
*/
import { permissions } from 'misskey-js';
import type { Schema } from '@/misc/json-schema.js';
import { RolePolicies } from '@/core/RoleService.js';
import type { KeyOf, Schema } from '@/misc/json-schema.js';
import * as ep___admin_meta from './endpoints/admin/meta.js';
import * as ep___admin_abuseUserReports from './endpoints/admin/abuse-user-reports.js';
@ -776,7 +775,7 @@ interface IEndpointMetaBase {
*/
readonly requireAdmin?: boolean;
readonly requireRolePolicy?: keyof RolePolicies;
readonly requireRolePolicy?: KeyOf<'RolePolicies'>;
/**
*

View file

@ -62,17 +62,17 @@ export const meta = {
reporter: {
type: 'object',
nullable: false, optional: false,
ref: 'User',
ref: 'UserDetailedNotMe',
},
targetUser: {
type: 'object',
nullable: false, optional: false,
ref: 'User',
ref: 'UserDetailedNotMe',
},
assignee: {
type: 'object',
nullable: true, optional: true,
ref: 'User',
ref: 'UserDetailedNotMe',
},
},
},

View file

@ -9,8 +9,10 @@ import { Endpoint } from '@/server/api/endpoint-base.js';
import type { UsersRepository } from '@/models/_.js';
import { SignupService } from '@/core/SignupService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { InstanceActorService } from '@/core/InstanceActorService.js';
import { localUsernameSchema, passwordSchema } from '@/models/User.js';
import { DI } from '@/di-symbols.js';
import { Packed } from '@/misc/json-schema.js';
export const meta = {
tags: ['admin'],
@ -18,7 +20,7 @@ export const meta = {
res: {
type: 'object',
optional: false, nullable: false,
ref: 'User',
ref: 'MeDetailed',
properties: {
token: {
type: 'string',
@ -45,13 +47,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private userEntityService: UserEntityService,
private signupService: SignupService,
private instanceActorService: InstanceActorService,
) {
super(meta, paramDef, async (ps, _me, token) => {
const me = _me ? await this.usersRepository.findOneByOrFail({ id: _me.id }) : null;
const noUsers = (await this.usersRepository.countBy({
host: IsNull(),
})) === 0;
if ((!noUsers && !me?.isRoot) || token !== null) throw new Error('access denied');
const realUsers = await this.instanceActorService.realLocalUsersPresent();
if ((realUsers && !me?.isRoot) || token !== null) throw new Error('access denied');
const { account, secret } = await this.signupService.signup({
username: ps.username,
@ -60,11 +61,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
});
const res = await this.userEntityService.pack(account, account, {
detail: true,
schema: 'MeDetailed',
includeSecrets: true,
});
}) as Packed<'MeDetailed'> & { token: string };
(res as any).token = secret;
res.token = secret;
return res;
});

View file

@ -27,7 +27,7 @@ export const meta = {
res: {
type: 'object',
optional: false, nullable: false,
ref: 'User',
ref: 'UserDetailedNotMe',
},
} as const;
@ -58,7 +58,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}
const res = await this.userEntityService.pack(profile.user!, null, {
detail: true,
schema: 'UserDetailedNotMe',
});
return res;

View file

@ -40,7 +40,7 @@ export const meta = {
},
required: ['id', 'createdAt', 'user'],
},
}
},
} as const;
export const paramDef = {
@ -92,7 +92,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
return await Promise.all(assigns.map(async assign => ({
id: assign.id,
createdAt: this.idService.parse(assign.id).date.toISOString(),
user: await this.userEntityService.pack(assign.user!, me, { detail: true }),
user: await this.userEntityService.pack(assign.user!, me, { schema: 'UserDetailed' }),
expiresAt: assign.expiresAt?.toISOString() ?? null,
})));
});

View file

@ -50,7 +50,7 @@ export const meta = {
user: {
type: 'object',
optional: false, nullable: false,
ref: 'UserDetailed',
ref: 'UserDetailedNotMe',
},
},
},

View file

@ -114,7 +114,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const users = await query.getMany();
return await this.userEntityService.packMany(users, me, { detail: true });
return await this.userEntityService.packMany(users, me, { schema: 'UserDetailed' });
});
}
}

View file

@ -148,7 +148,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
if (user != null) {
return {
type: 'User',
object: await this.userEntityService.pack(user, me, { detail: true }),
object: await this.userEntityService.pack(user, me, { schema: 'UserDetailedNotMe' }),
};
} else if (note != null) {
try {

View file

@ -112,7 +112,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
return {
accessToken: accessToken.token,
user: await this.userEntityService.pack(session.userId, null, {
detail: true,
schema: 'UserDetailedNotMe',
}),
};
});

View file

@ -102,7 +102,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
await this.userBlockingService.block(blocker, blockee);
return await this.userEntityService.pack(blockee.id, blocker, {
detail: true,
schema: 'UserDetailedNotMe',
});
});
}

View file

@ -103,7 +103,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
await this.userBlockingService.unblock(blocker, blockee);
return await this.userEntityService.pack(blockee.id, blocker, {
detail: true,
schema: 'UserDetailedNotMe',
});
});
}

View file

@ -61,7 +61,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
relations: ['user'],
});
const users = await this.userEntityService.packMany(records.map(r => r.user!), null, { detail: false });
const users = await this.userEntityService.packMany(records.map(r => r.user!), null);
return records.map(r => ({
id: r.id,

View file

@ -54,7 +54,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
.limit(ps.limit)
.getMany();
return await this.userEntityService.packMany(users, me, { detail: true });
return await this.userEntityService.packMany(users, me, { schema: 'UserDetailedNotMe' });
});
}
}

View file

@ -76,7 +76,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const users = await query.limit(ps.limit).getMany();
return await this.userEntityService.packMany(users, me, { detail: true });
return await this.userEntityService.packMany(users, me, { schema: 'UserDetailed' });
});
}
}

View file

@ -71,8 +71,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
userProfile.loggedInDates = [...userProfile.loggedInDates, today];
}
return await this.userEntityService.pack<true, true>(userProfile.user!, userProfile.user!, {
detail: true,
return await this.userEntityService.pack(userProfile.user!, userProfile.user!, {
schema: 'MeDetailed',
includeSecrets: isSecure,
userProfile,
});

View file

@ -64,7 +64,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
// Publish meUpdated event
this.globalEventService.publishMainStream(me.id, 'meUpdated', await this.userEntityService.pack(me.id, me, {
detail: true,
schema: 'MeDetailed',
includeSecrets: true,
}));

View file

@ -111,7 +111,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
// Publish meUpdated event
this.globalEventService.publishMainStream(me.id, 'meUpdated', await this.userEntityService.pack(me.id, me, {
detail: true,
schema: 'MeDetailed',
includeSecrets: true,
}));

View file

@ -74,7 +74,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
// Publish meUpdated event
this.globalEventService.publishMainStream(me.id, 'meUpdated', await this.userEntityService.pack(me.id, me, {
detail: true,
schema: 'MeDetailed',
includeSecrets: true,
}));
});

View file

@ -97,7 +97,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
// Publish meUpdated event
this.globalEventService.publishMainStream(me.id, 'meUpdated', await this.userEntityService.pack(me.id, me, {
detail: true,
schema: 'MeDetailed',
includeSecrets: true,
}));

View file

@ -76,7 +76,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
// Publish meUpdated event
this.globalEventService.publishMainStream(me.id, 'meUpdated', await this.userEntityService.pack(me.id, me, {
detail: true,
schema: 'MeDetailed',
includeSecrets: true,
}));
});

View file

@ -69,7 +69,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
// Publish meUpdated event
this.globalEventService.publishMainStream(me.id, 'meUpdated', await this.userEntityService.pack(me.id, me, {
detail: true,
schema: 'MeDetailed',
includeSecrets: true,
}));

View file

@ -66,8 +66,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
throw err;
});
return await this.userEntityService.pack<true, true>(me.id, me, {
detail: true,
return await this.userEntityService.pack(me.id, me, {
schema: 'MeDetailed',
});
});
}

View file

@ -51,8 +51,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
throw err;
});
return await this.userEntityService.pack<true, true>(me.id, me, {
detail: true,
return await this.userEntityService.pack(me.id, me, {
schema: 'MeDetailed',
});
});
}

View file

@ -43,7 +43,7 @@ export const meta = {
res: {
type: 'object',
ref: 'UserDetailed',
ref: 'MeDetailed',
},
} as const;
@ -106,7 +106,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
});
const iObj = await this.userEntityService.pack(me.id, me, {
detail: true,
schema: 'MeDetailed',
includeSecrets: true,
});

View file

@ -446,8 +446,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
verifiedLinks: [],
});
const iObj = await this.userEntityService.pack<true, true>(user.id, user, {
detail: true,
const iObj = await this.userEntityService.pack(user.id, user, {
schema: 'MeDetailed',
includeSecrets: isSecure,
});

View file

@ -6,11 +6,12 @@
import { IsNull, LessThanOrEqual, MoreThan, Brackets } from 'typeorm';
import { Inject, Injectable } from '@nestjs/common';
import JSON5 from 'json5';
import type { AdsRepository, UsersRepository } from '@/models/_.js';
import type { AdsRepository } from '@/models/_.js';
import { MAX_NOTE_TEXT_LENGTH } from '@/const.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { MetaService } from '@/core/MetaService.js';
import { InstanceActorService } from '@/core/InstanceActorService.js';
import type { Config } from '@/config.js';
import { DI } from '@/di-symbols.js';
import { DEFAULT_POLICIES } from '@/core/RoleService.js';
@ -303,6 +304,11 @@ export const meta = {
type: 'string',
optional: false, nullable: true,
},
policies: {
type: 'object',
optional: false, nullable: false,
ref: 'RolePolicies',
},
},
},
} as const;
@ -321,14 +327,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
@Inject(DI.config)
private config: Config,
@Inject(DI.usersRepository)
private usersRepository: UsersRepository,
@Inject(DI.adsRepository)
private adsRepository: AdsRepository,
private userEntityService: UserEntityService,
private metaService: MetaService,
private instanceActorService: InstanceActorService,
) {
super(meta, paramDef, async (ps, me) => {
const instance = await this.metaService.fetch(true);
@ -407,9 +411,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
...(ps.detail ? {
cacheRemoteFiles: instance.cacheRemoteFiles,
cacheRemoteSensitiveFiles: instance.cacheRemoteSensitiveFiles,
requireSetup: (await this.usersRepository.countBy({
host: IsNull(),
})) === 0,
requireSetup: !await this.instanceActorService.realLocalUsersPresent(),
} : {}),
};

View file

@ -55,7 +55,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
var: ps.var,
userId: me.id,
user: await this.userEntityService.pack(me.id, { id: page.userId }, {
detail: true,
schema: 'UserDetailed',
}),
});
});

View file

@ -52,7 +52,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
host: acct.host ?? IsNull(),
})));
return await this.userEntityService.packMany(users.filter(x => x !== null) as MiUser[], me, { detail: true });
return await this.userEntityService.packMany(users.filter(x => x !== null) as MiUser[], me, { schema: 'UserDetailed' });
});
}
}

View file

@ -14,6 +14,32 @@ export const meta = {
requireCredential: false,
res: {
type: 'array',
items: {
type: 'object',
properties: {
createdAt: {
type: 'string',
format: 'date-time',
},
users: {
type: 'number',
},
data: {
type: 'object',
additionalProperties: {
anyOf: [{
type: 'number',
}],
},
},
},
required: [
'createdAt',
'users',
'data',
],
},
},
allowGet: true,

View file

@ -33,11 +33,11 @@ export const meta = {
properties: {
id: {
type: 'string',
format: 'misskey:id'
format: 'misskey:id',
},
user: {
type: 'object',
ref: 'User'
ref: 'UserDetailed',
},
},
required: ['id', 'user'],
@ -94,7 +94,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
return await Promise.all(assigns.map(async assign => ({
id: assign.id,
user: await this.userEntityService.pack(assign.user!, me, { detail: true }),
user: await this.userEntityService.pack(assign.user!, me, { schema: 'UserDetailed' }),
})));
});
}

View file

@ -89,7 +89,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const users = await query.getMany();
return await this.userEntityService.packMany(users, me, { detail: true });
return await this.userEntityService.packMany(users, me, { schema: 'UserDetailed' });
});
}
}

View file

@ -122,7 +122,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
// Make replies object (includes weights)
const repliesObj = await Promise.all(topRepliedUsers.map(async (user) => ({
user: await this.userEntityService.pack(user, me, { detail: true }),
user: await this.userEntityService.pack(user, me, { schema: 'UserDetailed' }),
weight: repliedUsers[user] / peak,
})));

View file

@ -46,7 +46,7 @@ export const meta = {
},
user: {
type: 'object',
ref: 'User',
ref: 'UserLite',
},
withReplies: {
type: 'boolean',

View file

@ -9,6 +9,9 @@ import { Endpoint } from '@/server/api/endpoint-base.js';
import { QueryService } from '@/core/QueryService.js';
import { NoteReactionEntityService } from '@/core/entities/NoteReactionEntityService.js';
import { DI } from '@/di-symbols.js';
import { CacheService } from '@/core/CacheService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { RoleService } from '@/core/RoleService.js';
import { ApiError } from '../../error.js';
export const meta = {
@ -34,6 +37,11 @@ export const meta = {
code: 'REACTIONS_NOT_PUBLIC',
id: '673a7dd2-6924-1093-e0c0-e68456ceae5c',
},
isRemoteUser: {
message: 'Currently unavailable to display reactions of remote users. See https://github.com/misskey-dev/misskey/issues/12964',
code: 'IS_REMOTE_USER',
id: '6b95fa98-8cf9-2350-e284-f0ffdb54a805',
},
},
} as const;
@ -59,14 +67,24 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
@Inject(DI.noteReactionsRepository)
private noteReactionsRepository: NoteReactionsRepository,
private cacheService: CacheService,
private userEntityService: UserEntityService,
private noteReactionEntityService: NoteReactionEntityService,
private queryService: QueryService,
private roleService: RoleService,
) {
super(meta, paramDef, async (ps, me) => {
const profile = await this.userProfilesRepository.findOneByOrFail({ userId: ps.userId });
const iAmModerator = me ? await this.roleService.isModerator(me) : false; // Moderators can see reactions of all users
if (!iAmModerator) {
const user = await this.cacheService.findUserById(ps.userId);
if (this.userEntityService.isRemoteUser(user)) {
throw new ApiError(meta.errors.isRemoteUser);
}
if ((me == null || me.id !== ps.userId) && !profile.publicReactions) {
throw new ApiError(meta.errors.reactionsNotPublic);
const profile = await this.userProfilesRepository.findOneByOrFail({ userId: ps.userId });
if ((me == null || me.id !== ps.userId) && !profile.publicReactions) {
throw new ApiError(meta.errors.reactionsNotPublic);
}
}
const query = this.queryService.makePaginationQuery(this.noteReactionsRepository.createQueryBuilder('reaction'),

View file

@ -76,7 +76,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const users = await query.limit(ps.limit).offset(ps.offset).getMany();
return await this.userEntityService.packMany(users, me, { detail: true });
return await this.userEntityService.packMany(users, me, { schema: 'UserDetailed' });
});
}
}

View file

@ -131,7 +131,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
.getMany();
}
return await this.userEntityService.packMany(users, me, { detail: !!ps.detail });
return await this.userEntityService.packMany(users, me, { schema: ps.detail ? 'UserDetailed' : 'UserLite' });
});
}
}

View file

@ -141,7 +141,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}
}
return await this.userEntityService.packMany(users, me, { detail: ps.detail });
return await this.userEntityService.packMany(users, me, { schema: ps.detail ? 'UserDetailed' : 'UserLite' });
});
}
}

View file

@ -116,7 +116,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}
return await Promise.all(_users.map(u => this.userEntityService.pack(u, me, {
detail: true,
schema: 'UserDetailed',
})));
} else {
// Lookup user
@ -146,7 +146,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}
return await this.userEntityService.pack(user, me, {
detail: true,
schema: 'UserDetailed',
});
}
});

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