mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-25 07:05:12 +00:00
merge: branch develop
This commit is contained in:
commit
cf6e720139
97 changed files with 1565 additions and 853 deletions
|
@ -5,7 +5,7 @@
|
|||
"workspaceFolder": "/workspace",
|
||||
"features": {
|
||||
"ghcr.io/devcontainers-contrib/features/pnpm:2": {
|
||||
"version": "8.8.0"
|
||||
"version": "8.9.2"
|
||||
},
|
||||
"ghcr.io/devcontainers/features/node:1": {
|
||||
"version": "20.5.1"
|
||||
|
|
2
.github/workflows/api-misskey-js.yml
vendored
2
.github/workflows/api-misskey-js.yml
vendored
|
@ -9,7 +9,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- run: corepack enable
|
||||
|
||||
|
|
2
.github/workflows/check_copyright_year.yml
vendored
2
.github/workflows/check_copyright_year.yml
vendored
|
@ -10,7 +10,7 @@ jobs:
|
|||
check_copyright_year:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- uses: actions/checkout@v4.1.1
|
||||
- run: |
|
||||
if [ "$(grep Copyright COPYING | sed -e 's/.*2014-\([0-9]*\) .*/\1/g')" -ne "$(date +%Y)" ]; then
|
||||
echo "Please change copyright year!"
|
||||
|
|
2
.github/workflows/docker-develop.yml
vendored
2
.github/workflows/docker-develop.yml
vendored
|
@ -26,7 +26,7 @@ jobs:
|
|||
sudo rm -rf /usr/share/dotnet
|
||||
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v4.1.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v3.0.0
|
||||
|
|
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
|
@ -25,7 +25,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v4.1.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v3.0.0
|
||||
|
|
2
.github/workflows/dockle.yml
vendored
2
.github/workflows/dockle.yml
vendored
|
@ -14,7 +14,7 @@ jobs:
|
|||
env:
|
||||
DOCKER_CONTENT_TRUST: 1
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- uses: actions/checkout@v4.1.1
|
||||
- run: |
|
||||
curl -L -o dockle.deb "https://github.com/goodwithtech/dockle/releases/download/v0.4.10/dockle_0.4.10_Linux-64bit.deb"
|
||||
sudo dpkg -i dockle.deb
|
||||
|
|
6
.github/workflows/lint.yml
vendored
6
.github/workflows/lint.yml
vendored
|
@ -15,7 +15,7 @@ jobs:
|
|||
pnpm_install:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
|
@ -42,7 +42,7 @@ jobs:
|
|||
- sw
|
||||
- misskey-js
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
|
@ -68,7 +68,7 @@ jobs:
|
|||
- backend
|
||||
- misskey-js
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
|
|
2
.github/workflows/package.yml
vendored
2
.github/workflows/package.yml
vendored
|
@ -23,7 +23,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v4.1.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
lfs: true
|
||||
submodules: 'recursive'
|
||||
|
|
2
.github/workflows/pr-preview-deploy.yml
vendored
2
.github/workflows/pr-preview-deploy.yml
vendored
|
@ -53,7 +53,7 @@ jobs:
|
|||
|
||||
# Check out merge commit
|
||||
- name: Fork based /deploy checkout
|
||||
uses: actions/checkout@v4.1.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge'
|
||||
|
||||
|
|
2
.github/workflows/test-backend.yml
vendored
2
.github/workflows/test-backend.yml
vendored
|
@ -29,7 +29,7 @@ jobs:
|
|||
- 56312:6379
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
submodules: true
|
||||
- name: Install pnpm
|
||||
|
|
4
.github/workflows/test-frontend.yml
vendored
4
.github/workflows/test-frontend.yml
vendored
|
@ -16,7 +16,7 @@ jobs:
|
|||
node-version: [20.5.1]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
submodules: true
|
||||
- name: Install pnpm
|
||||
|
@ -68,7 +68,7 @@ jobs:
|
|||
- 56312:6379
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
submodules: true
|
||||
# https://github.com/cypress-io/cypress-docker-images/issues/150
|
||||
|
|
2
.github/workflows/test-misskey-js.yml
vendored
2
.github/workflows/test-misskey-js.yml
vendored
|
@ -21,7 +21,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- run: corepack enable
|
||||
|
||||
|
|
2
.github/workflows/test-production.yml
vendored
2
.github/workflows/test-production.yml
vendored
|
@ -19,7 +19,7 @@ jobs:
|
|||
node-version: [20.5.1]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
submodules: true
|
||||
- name: Install pnpm
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
### General
|
||||
- Feat: アンテナでローカルの投稿のみ収集できるようになりました
|
||||
- Feat: サーバーサイレンス機能が追加されました
|
||||
- Enhance: 新規にフォローした人の返信をデフォルトでTLに追加できるオプションを追加
|
||||
- Enhance: HTLとLTLを2023.10.0アップデート以前まで遡れるように
|
||||
- Enhance: フォロー/フォロー解除したときに過去分のHTLにも含まれる投稿が反映されるように
|
||||
- Enhance: ローカリゼーションの更新
|
||||
- Enhance: 依存関係の更新
|
||||
|
||||
### Client
|
||||
|
@ -24,6 +28,9 @@
|
|||
|
||||
### Server
|
||||
- Enhance: ストリーミングAPIのパフォーマンスを向上
|
||||
- Fix: users/notesでDBから参照した際にチャンネル投稿のみ取得される問題を修正
|
||||
- Fix: コントロールパネルの設定項目が正しく保存できない問題を修正
|
||||
- Change: nyaizeはAPIレスポンス時ではなく投稿時に一度だけ非可逆的に行われるようになりました
|
||||
|
||||
## 2023.10.1
|
||||
### General
|
||||
|
|
|
@ -195,6 +195,7 @@ perHour: "Pro Stunde"
|
|||
perDay: "Pro Tag"
|
||||
stopActivityDelivery: "Senden von Aktivitäten einstellen"
|
||||
blockThisInstance: "Diese Instanz blockieren"
|
||||
silenceThisInstance: "Instanz stummschalten"
|
||||
operations: "Aktionen"
|
||||
software: "Software"
|
||||
version: "Version"
|
||||
|
@ -214,6 +215,8 @@ clearCachedFiles: "Cache leeren"
|
|||
clearCachedFilesConfirm: "Sollen alle im Cache gespeicherten Dateien von anderen Instanzen wirklich gelöscht werden?"
|
||||
blockedInstances: "Blockierte Instanzen"
|
||||
blockedInstancesDescription: "Gib die Hostnamen der Instanzen, welche blockiert werden sollen, durch Zeilenumbrüche getrennt an. Blockierte Instanzen können mit dieser instanz nicht mehr kommunizieren."
|
||||
silencedInstances: "Stummgeschaltete Instanzen"
|
||||
silencedInstancesDescription: "Gib die Hostnamen der Instanzen, welche stummgeschaltet werden sollen, durch Zeilenumbrüche getrennt an. Alle Konten dieser Instanzen werden als stummgeschaltet behandelt, können nur noch Follow-Anfragen stellen und wenn nicht gefolgt keine lokalen Konten erwähnen. Blockierte Instanzen sind davon nicht betroffen."
|
||||
muteAndBlock: "Stummschaltungen und Blockierungen"
|
||||
mutedUsers: "Stummgeschaltete Benutzer"
|
||||
blockedUsers: "Blockierte Benutzer"
|
||||
|
@ -531,6 +534,7 @@ serverLogs: "Serverprotokolle"
|
|||
deleteAll: "Alle löschen"
|
||||
showFixedPostForm: "Bereich zum Schreiben neuer Notizen am Anfang der Chronik anzeigen"
|
||||
showFixedPostFormInChannel: "Bereich zum Schreiben neuer Notizen am Anfang der Chronik anzeigen (Kanäle)"
|
||||
withRepliesByDefaultForNewlyFollowed: "Standardmäßig Antworten von neu gefolgten Benutzern in der Chronik anzeigen"
|
||||
newNoteRecived: "Es gibt neue Notizen"
|
||||
sounds: "Töne"
|
||||
sound: "Töne"
|
||||
|
@ -794,7 +798,7 @@ active: "Aktiv"
|
|||
offline: "Offline"
|
||||
notRecommended: "Nicht empfohlen"
|
||||
botProtection: "Schutz vor Bots"
|
||||
instanceBlocking: "Blockierte Instanzen"
|
||||
instanceBlocking: "Blockierte/Stummgeschaltete Instanzen"
|
||||
selectAccount: "Benutzerkonto auswählen"
|
||||
switchAccount: "Konto wechseln"
|
||||
enabled: "Aktiviert"
|
||||
|
@ -1921,6 +1925,7 @@ _exportOrImport:
|
|||
userLists: "Listen"
|
||||
excludeMutingUsers: "Stummgeschaltete Benutzer aussortieren"
|
||||
excludeInactiveUsers: "Inaktive Benutzer aussortieren"
|
||||
withReplies: "Antworten von importierten Benutzern in der Chronik beinhalten"
|
||||
_charts:
|
||||
federation: "Föderation"
|
||||
apRequest: "Anfragen"
|
||||
|
|
|
@ -223,14 +223,9 @@ clearQueueConfirmText: "Any undelivered notes remaining in the queue will not be
|
|||
clearCachedFiles: "Clear cache"
|
||||
clearCachedFilesConfirm: "Are you sure that you want to delete all cached remote files?"
|
||||
blockedInstances: "Blocked Instances"
|
||||
silencedInstances: "Silenced Instances"
|
||||
silencedInstancesDescription: "List the hostnames of the instances that you want to\
|
||||
\ silence. Accounts in the listed instances are treated as \"Silenced\", can only make follow requests, and cannot mention local accounts if not followed. This will not affect the blocked instances."
|
||||
hiddenTags: "Hidden Hashtags"
|
||||
hiddenTagsDescription: "List the hashtags (without the #) of the hashtags you wish\
|
||||
\ to hide from trending and explore. Hidden hashtags are still discoverable via\
|
||||
\ other means. Blocked instances are not affected even if listed here."
|
||||
blockedInstancesDescription: "List the hostnames of the instances that you want to block separated by linebreaks. Listed instances will no longer be able to communicate with this instance."
|
||||
blockedInstancesDescription: "List the hostnames of the instances you want to block separated by linebreaks. Listed instances will no longer be able to communicate with this instance."
|
||||
silencedInstances: "Silenced instances"
|
||||
silencedInstancesDescription: "List the hostnames of the instances that you want to silence. All accounts of the listed instances will be treated as silenced, can only make follow requests, and cannot mention local accounts if not followed. This will not affect blocked instances."
|
||||
muteAndBlock: "Mutes and Blocks"
|
||||
mutedUsers: "Muted users"
|
||||
blockedUsers: "Blocked users"
|
||||
|
@ -551,6 +546,7 @@ serverLogs: "Server logs"
|
|||
deleteAll: "Delete all"
|
||||
showFixedPostForm: "Display the posting form at the top of the timeline"
|
||||
showFixedPostFormInChannel: "Display the posting form at the top of the timeline (Channels)"
|
||||
withRepliesByDefaultForNewlyFollowed: "Include replies by newly followed users in the timeline by default"
|
||||
newNoteRecived: "There are new notes"
|
||||
sounds: "Sounds"
|
||||
sound: "Sounds"
|
||||
|
@ -1109,6 +1105,10 @@ additionalEmojiDictionary: "Additional emoji dictionaries"
|
|||
installed: "Installed"
|
||||
branding: "Branding"
|
||||
enableServerMachineStats: "Publish server hardware stats"
|
||||
enableAchievements: "Enable Achievements"
|
||||
turnOffAchievements: "Turning this off will disable the achievement system"
|
||||
enableBotTrending: "Populate Hashtags with Bots"
|
||||
turnOffBotTrending: "Turning this off will stop Bots from populating Hashtags"
|
||||
enableIdenticonGeneration: "Enable user identicon generation"
|
||||
turnOffToImprovePerformance: "Turning this off can increase performance."
|
||||
createInviteCode: "Generate invite"
|
||||
|
@ -1145,6 +1145,7 @@ loadConversation: "Show conversation"
|
|||
pinnedList: "Pinned list"
|
||||
keepScreenOn: "Keep screen on"
|
||||
clickToOpen: "Click to open notes"
|
||||
showBots: "Show bots in timeline"
|
||||
verifiedLink: "Link ownership has been verified"
|
||||
notifyNotes: "Notify about new notes"
|
||||
unnotifyNotes: "Stop notifying about new notes"
|
||||
|
@ -1156,8 +1157,8 @@ edited: "Edited"
|
|||
notificationRecieveConfig: "Notification Settings"
|
||||
mutualFollow: "Mutual follow"
|
||||
fileAttachedOnly: "Only notes with files"
|
||||
showRepliesToOthersInTimeline: "Show replies to others in TL"
|
||||
hideRepliesToOthersInTimeline: "Hide replies to others from TL"
|
||||
showRepliesToOthersInTimeline: "Show replies to others in timeline"
|
||||
hideRepliesToOthersInTimeline: "Hide replies to others from timeline"
|
||||
externalServices: "External Services"
|
||||
impressum: "Impressum"
|
||||
impressumUrl: "Impressum URL"
|
||||
|
@ -1770,7 +1771,7 @@ _2fa:
|
|||
step2Click: "Clicking on this QR code will allow you to register 2FA to your security key or phone authenticator app."
|
||||
step2Uri: "Enter the following URI if you are using a desktop program"
|
||||
step3Title: "Enter an authentication code"
|
||||
step3: "Enter the token provided by your app to finish setup."
|
||||
step3: "Enter the authentication code (token) provided by your app to finish setup."
|
||||
setupCompleted: "Setup complete"
|
||||
step4: "From now on, any future login attempts will ask for such a login token."
|
||||
securityKeyNotSupported: "Your browser does not support security keys."
|
||||
|
@ -1954,6 +1955,7 @@ _exportOrImport:
|
|||
userLists: "User lists"
|
||||
excludeMutingUsers: "Exclude muted users"
|
||||
excludeInactiveUsers: "Exclude inactive users"
|
||||
withReplies: "Include replies from imported users in the timeline"
|
||||
_charts:
|
||||
federation: "Federation"
|
||||
apRequest: "Requests"
|
||||
|
@ -2106,7 +2108,7 @@ _deck:
|
|||
introduction: "Create the perfect interface for you by arranging columns freely!"
|
||||
introduction2: "Click on the + on the right of the screen to add new colums whenever you want."
|
||||
widgetsIntroduction: "Please select \"Edit widgets\" in the column menu and add a widget."
|
||||
useSimpleUiForNonRootPages: "Use simplified UI to navigated pages"
|
||||
useSimpleUiForNonRootPages: "Use simple UI for navigated pages"
|
||||
usedAsMinWidthWhenFlexible: "Minimum width will be used for this when the \"Auto-adjust width\" option is enabled"
|
||||
flexible: "Auto-adjust width"
|
||||
_columns:
|
||||
|
|
|
@ -195,6 +195,7 @@ perHour: "por hora"
|
|||
perDay: "por día"
|
||||
stopActivityDelivery: "Dejar de enviar actividades"
|
||||
blockThisInstance: "Bloquear instancia"
|
||||
silenceThisInstance: "Silenciar esta instancia"
|
||||
operations: "Operaciones"
|
||||
software: "Software"
|
||||
version: "Versión"
|
||||
|
@ -214,6 +215,8 @@ clearCachedFiles: "Limpiar caché"
|
|||
clearCachedFilesConfirm: "¿Desea borrar todos los archivos remotos cacheados?"
|
||||
blockedInstances: "Instancias bloqueadas"
|
||||
blockedInstancesDescription: "Seleccione los hosts de las instancias que desea bloquear, separadas por una linea nueva. Las instancias bloqueadas no podrán comunicarse con esta instancia."
|
||||
silencedInstances: "Instancias silenciadas"
|
||||
silencedInstancesDescription: "Listar los hostname de las instancias que quieres silenciar. Todas las cuentas de las instancias listadas serán tratadas como silenciadas, solo podrán hacer peticiones de seguimiento, y no podrán mencionar cuentas locales si no las siguen. Esto no afecta a las instancias bloqueadas."
|
||||
muteAndBlock: "Silenciar y bloquear"
|
||||
mutedUsers: "Usuarios silenciados"
|
||||
blockedUsers: "Usuarios bloqueados"
|
||||
|
@ -531,6 +534,7 @@ serverLogs: "Registros del servidor"
|
|||
deleteAll: "Eliminar todos"
|
||||
showFixedPostForm: "Mostrar el formulario de las entradas encima de la línea de tiempo"
|
||||
showFixedPostFormInChannel: "Mostrar el formulario de publicación por encima de la cronología (Canales)"
|
||||
withRepliesByDefaultForNewlyFollowed: "Incluir por defecto respuestas de usuarios recién seguidos en la línea de tiempo"
|
||||
newNoteRecived: "Tienes una nota nueva"
|
||||
sounds: "Sonidos"
|
||||
sound: "Sonidos"
|
||||
|
@ -1121,6 +1125,20 @@ unnotifyNotes: "Dejar de notificar nuevas notas"
|
|||
authentication: "Autenticación"
|
||||
authenticationRequiredToContinue: "Por favor, autentifícate para continuar"
|
||||
dateAndTime: "Fecha y hora"
|
||||
showRenotes: "Mostrar renotas"
|
||||
edited: "Editado"
|
||||
notificationRecieveConfig: "Ajustes de Notificaciones"
|
||||
mutualFollow: "Os seguís mutuamente"
|
||||
fileAttachedOnly: "Solo notas con archivos"
|
||||
showRepliesToOthersInTimeline: "Mostrar respuestas a otros en la línea de tiempo"
|
||||
hideRepliesToOthersInTimeline: "Ocultar respuestas a otros en la línea de tiempo"
|
||||
externalServices: "Servicios Externos"
|
||||
impressum: "Impressum"
|
||||
impressumUrl: "Impressum URL"
|
||||
impressumDescription: "En algunos países, como Alemania, la inclusión del operador de datos (el Impressum) es requerido legalmente para sitios web comerciales."
|
||||
privacyPolicy: "Política de Privacidad"
|
||||
privacyPolicyUrl: "URL de la Política de Privacidad"
|
||||
tosAndPrivacyPolicy: "Condiciones de Uso y Política de Privacidad"
|
||||
_announcement:
|
||||
forExistingUsers: "Solo para usuarios registrados"
|
||||
forExistingUsersDescription: "Este anuncio solo se mostrará a aquellos usuarios registrados en el momento de su publicación. Si se deshabilita esta opción, aquellos usuarios que se registren tras su publicación también lo verán."
|
||||
|
@ -1470,6 +1488,7 @@ _role:
|
|||
descriptionOfRateLimitFactor: "Límites más bajos son menos restrictivos, más altos menos restrictivos"
|
||||
canHideAds: "Puede ocultar anuncios"
|
||||
canSearchNotes: "Uso de la búsqueda de notas"
|
||||
canUseTranslator: "Uso de traductor"
|
||||
_condition:
|
||||
isLocal: "Usuario local"
|
||||
isRemote: "Usuario remoto"
|
||||
|
@ -1518,6 +1537,10 @@ _ad:
|
|||
reduceFrequencyOfThisAd: "Mostrar menos este anuncio."
|
||||
hide: "No mostrar"
|
||||
timezoneinfo: "El día de la semana está determidado por la zona horaria del servidor."
|
||||
adsSettings: "Ajustes de anuncios"
|
||||
notesPerOneAd: "Intervalo de actualización de anuncios en tiempo real (Notas por cada anuncio)"
|
||||
setZeroToDisable: "Establece este valor a 0 para deshabilitar la actualización de anuncios en tiempo real"
|
||||
adsTooClose: "El intervalo de anuncios actual puede empeorar la experiencia del usuario por ser demasiado bajo."
|
||||
_forgotPassword:
|
||||
enterEmail: "Ingrese el correo usado para registrar la cuenta. Se enviará un link para resetear la contraseña."
|
||||
ifNoEmail: "Si no utilizó un correo para crear la cuenta, contáctese con el administrador."
|
||||
|
@ -1902,6 +1925,7 @@ _exportOrImport:
|
|||
userLists: "Listas"
|
||||
excludeMutingUsers: "Excluir usuarios silenciados"
|
||||
excludeInactiveUsers: "Excluir usuarios inactivos"
|
||||
withReplies: "Incluir respuestas de los usuarios importados en la línea de tiempo"
|
||||
_charts:
|
||||
federation: "Federación"
|
||||
apRequest: "Pedidos"
|
||||
|
@ -2119,3 +2143,14 @@ _moderationLogTypes:
|
|||
unmarkSensitiveDriveFile: "Archivo marcado como no sensible"
|
||||
resolveAbuseReport: "Reporte resuelto"
|
||||
createInvitation: "Generar invitación"
|
||||
createAd: "Anuncio creado"
|
||||
deleteAd: "Anuncio eliminado"
|
||||
updateAd: "Anuncio actualizado"
|
||||
_fileViewer:
|
||||
title: "Detalles del archivo"
|
||||
type: "Tipo de archivo"
|
||||
size: "Tamaño del archivo"
|
||||
url: "URL"
|
||||
uploadedAt: "Subido el"
|
||||
attachedNotes: "Notas adjuntas"
|
||||
thisPageCanBeSeenFromTheAuthor: "Esta página solo puede ser vista por el autor."
|
||||
|
|
|
@ -184,7 +184,7 @@ selectUser: "Sélectionner un·e utilisateur·rice"
|
|||
recipient: "Destinataire"
|
||||
annotation: "Commentaires"
|
||||
federation: "Fédération"
|
||||
instances: "Instance"
|
||||
instances: "Instances"
|
||||
registeredAt: "Premier contact le"
|
||||
latestRequestReceivedAt: "Dernière requête reçue"
|
||||
latestStatus: "Dernier statut"
|
||||
|
@ -194,6 +194,7 @@ perHour: "par heure"
|
|||
perDay: "par jour"
|
||||
stopActivityDelivery: "Arrêter l’envoi de l’activité"
|
||||
blockThisInstance: "Bloquer cette instance"
|
||||
silenceThisInstance: "Mettre cette instance en sourdine"
|
||||
operations: "Opérations"
|
||||
software: "Logiciel"
|
||||
version: "Version"
|
||||
|
@ -213,6 +214,8 @@ clearCachedFiles: "Vider le cache"
|
|||
clearCachedFilesConfirm: "Êtes-vous sûr·e de vouloir vider tout le cache de fichiers distants ?"
|
||||
blockedInstances: "Instances bloquées"
|
||||
blockedInstancesDescription: "Listez les instances que vous désirez bloquer, une par ligne. Ces instances ne seront plus en capacité d'interagir avec votre instance."
|
||||
silencedInstances: "Instances mises en sourdine"
|
||||
silencedInstancesDescription: "Énumérer les noms d'hôte des instances à mettre en sourdine. Tous les comptes des instances énumérées seront traités comme mis en sourdine, ne peuvent faire que des demandes de suivi et ne peuvent pas mentionner les comptes locaux s'ils ne sont pas suivis. Cela n'affectera pas les instances bloquées."
|
||||
muteAndBlock: "Masqué·e·s / Bloqué·e·s"
|
||||
mutedUsers: "Utilisateur·rice·s en sourdine"
|
||||
blockedUsers: "Utilisateur·rice·s bloqué·e·s"
|
||||
|
@ -927,6 +930,7 @@ remoteOnly: "Distant uniquement"
|
|||
failedToUpload: "Échec du transfert"
|
||||
cannotUploadBecauseInappropriate: "Impossible de télécharger le document car il a été déterminé qu'il pouvait contenir un contenu inapproprié."
|
||||
cannotUploadBecauseNoFreeSpace: "Impossible de télécharger en raison d'un manque d'espace libre sur le disque.\n"
|
||||
cannotUploadBecauseExceedsFileSizeLimit: "Ce fichier ne peut pas être téléchargé parce qu'il dépasse la taille maximale."
|
||||
beta: "Bêta"
|
||||
enableAutoSensitive: "Détermination automatique de NSFW"
|
||||
enableAutoSensitiveDescription: "S'il est disponible, le drapeau NSFW est automatiquement défini sur le média en utilisant l'apprentissage automatique. Même si cette fonction est désactivée, elle peut être réglée automatiquement dans certains cas."
|
||||
|
@ -948,12 +952,14 @@ caption: "Libellé"
|
|||
loggedInAsBot: "Connecté actuellement en tant que bot"
|
||||
tools: "Outils"
|
||||
cannotLoad: "Chargement impossible"
|
||||
numberOfProfileView: "Nombre de vues du profil"
|
||||
like: "J'aime"
|
||||
unlike: "Ne plus aimer"
|
||||
numberOfLikes: "Favoris"
|
||||
show: "Affichage"
|
||||
neverShow: "Ne plus afficher"
|
||||
remindMeLater: "Peut-être plus tard"
|
||||
didYouLikeMisskey: "Avez-vous aimé Misskey ?"
|
||||
roles: "Rôles"
|
||||
role: "Rôles"
|
||||
noRole: "Aucun rôle"
|
||||
|
@ -963,9 +969,13 @@ assign: "Attribuer"
|
|||
unassign: "Retirer"
|
||||
color: "Couleur"
|
||||
manageCustomEmojis: "Gestion des émojis personnalisés"
|
||||
youCannotCreateAnymore: "Vous avez atteint la limite de création."
|
||||
cannotPerformTemporary: "Temporairement indisponible"
|
||||
invalidParamError: "Paramètres invalides"
|
||||
preset: "Préréglage"
|
||||
selectFromPresets: "Sélectionner à partir des préréglages"
|
||||
achievements: "Accomplissements"
|
||||
gotInvalidResponseError: "Réponse du serveur invalide"
|
||||
thisPostMayBeAnnoying: "Cette note peut gêner d'autres personnes."
|
||||
thisPostMayBeAnnoyingHome: "Publier vers le fil principal"
|
||||
thisPostMayBeAnnoyingCancel: "Annuler"
|
||||
|
@ -980,6 +990,8 @@ sensitiveWords: "Mots sensibles"
|
|||
notesSearchNotAvailable: "La recherche de notes n'est pas disponible."
|
||||
license: "Licence"
|
||||
myClips: "Mes clips"
|
||||
showClipButtonInNoteFooter: "Ajouter « Clip » au menu d'action de la note"
|
||||
noteIdOrUrl: "Identifiant de la note ou URL"
|
||||
video: "Vidéo"
|
||||
videos: "Vidéos"
|
||||
dataSaver: "Économiseur de données"
|
||||
|
@ -987,6 +999,7 @@ accountMigration: "Migration de compte"
|
|||
accountMoved: "Cet·te utilisateur·rice a migré son compte vers :"
|
||||
accountMovedShort: "Ce compte a migré"
|
||||
operationForbidden: "Opération non autorisée"
|
||||
forceShowAds: "Toujours afficher les publicités"
|
||||
addMemo: "Ajouter un mémo"
|
||||
reactionsList: "Réactions"
|
||||
renotesList: "Liste de renotes"
|
||||
|
@ -995,9 +1008,12 @@ leftTop: "En haut à gauche"
|
|||
rightTop: "En haut à droite"
|
||||
leftBottom: "En bas à gauche"
|
||||
rightBottom: "En bas à droite"
|
||||
stackAxis: "Direction d'empilement"
|
||||
vertical: "Vertical"
|
||||
horizontal: "Latéral"
|
||||
position: "Position"
|
||||
serverRules: "Règles du serveur"
|
||||
preservedUsernames: "Nom d'utilisateur·rice réservé"
|
||||
archive: "Archive"
|
||||
displayOfNote: "Affichage de la note"
|
||||
youFollowing: "Abonné·e"
|
||||
|
@ -1531,7 +1547,7 @@ _visibility:
|
|||
_postForm:
|
||||
replyPlaceholder: "Répondre à cette note ..."
|
||||
quotePlaceholder: "Citez cette note ..."
|
||||
channelPlaceholder: "Publier vers le canal"
|
||||
channelPlaceholder: "Publier au canal…"
|
||||
_placeholders:
|
||||
a: "Quoi de neuf ?"
|
||||
b: "Il s'est passé quelque chose ?"
|
||||
|
|
7
locales/index.d.ts
vendored
7
locales/index.d.ts
vendored
|
@ -549,6 +549,7 @@ export interface Locale {
|
|||
"deleteAll": string;
|
||||
"showFixedPostForm": string;
|
||||
"showFixedPostFormInChannel": string;
|
||||
"withRepliesByDefaultForNewlyFollowed": string;
|
||||
"newNoteRecived": string;
|
||||
"sounds": string;
|
||||
"sound": string;
|
||||
|
@ -1107,6 +1108,10 @@ export interface Locale {
|
|||
"installed": string;
|
||||
"branding": string;
|
||||
"enableServerMachineStats": string;
|
||||
"enableAchievements": string;
|
||||
"turnOffAchievements": string;
|
||||
"enableBotTrending": string;
|
||||
"turnOffBotTrending": string;
|
||||
"enableIdenticonGeneration": string;
|
||||
"turnOffToImprovePerformance": string;
|
||||
"createInviteCode": string;
|
||||
|
@ -1143,6 +1148,7 @@ export interface Locale {
|
|||
"pinnedList": string;
|
||||
"keepScreenOn": string;
|
||||
"clickToOpen": string;
|
||||
"showBots": string;
|
||||
"verifiedLink": string;
|
||||
"notifyNotes": string;
|
||||
"unnotifyNotes": string;
|
||||
|
@ -2079,6 +2085,7 @@ export interface Locale {
|
|||
"userLists": string;
|
||||
"excludeMutingUsers": string;
|
||||
"excludeInactiveUsers": string;
|
||||
"withReplies": string;
|
||||
};
|
||||
"_charts": {
|
||||
"federation": string;
|
||||
|
|
|
@ -116,8 +116,8 @@ inChannelQuote: "Cita nel canale"
|
|||
pinnedNote: "Nota in primo piano"
|
||||
pinned: "Fissa sul profilo"
|
||||
you: "Tu"
|
||||
clickToShow: "Clicca per visualizzare"
|
||||
sensitive: "Esplicito"
|
||||
clickToShow: "Contenuto occultato, cliccare solo se si intende vedere"
|
||||
sensitive: "Allegato esplicito"
|
||||
add: "Aggiungi"
|
||||
reaction: "Reazioni"
|
||||
reactions: "Reazioni"
|
||||
|
@ -195,6 +195,7 @@ perHour: "orario"
|
|||
perDay: "giornaliero"
|
||||
stopActivityDelivery: "Interrompi la distribuzione di attività"
|
||||
blockThisInstance: "Blocca questa istanza"
|
||||
silenceThisInstance: "Silenzia l'istanza"
|
||||
operations: "Operazioni"
|
||||
software: "Software"
|
||||
version: "Versione"
|
||||
|
@ -214,6 +215,8 @@ clearCachedFiles: "Svuota cache"
|
|||
clearCachedFilesConfirm: "Vuoi davvero svuotare la cache da tutti i file remoti?"
|
||||
blockedInstances: "Istanze bloccate"
|
||||
blockedInstancesDescription: "Elenca le istanze che vuoi bloccare, una per riga. Esse non potranno più interagire con la tua istanza."
|
||||
silencedInstances: "Istanze silenziate"
|
||||
silencedInstancesDescription: "Elenca i nomi host delle istanze che vuoi silenziare. Tutti i profili nelle istanze silenziate vengono trattati come tali. Possono solo inviare richieste di follow e menzionare soltanto i profili locali che seguono. Le istanze bloccate non sono interessate."
|
||||
muteAndBlock: "Silenziati / Bloccati"
|
||||
mutedUsers: "Profili silenziati"
|
||||
blockedUsers: "Profili bloccati"
|
||||
|
@ -278,7 +281,7 @@ agreeTo: "Sono d'accordo con {0}"
|
|||
agree: "Accetto"
|
||||
agreeBelow: "Accetto quanto riportato sotto"
|
||||
basicNotesBeforeCreateAccount: "Note importanti"
|
||||
termsOfService: "Informativa ai sensi degli artt. 13 e 14 del Regolamento UE 2016/679 per la protezione dei dati personali (GDPR)"
|
||||
termsOfService: "Condizioni d'uso del servizio"
|
||||
start: "Inizia!"
|
||||
home: "Home"
|
||||
remoteUserCaution: "Le informazioni potrebbero essere incomplete poiché questo profilo remoto potrebbe non essere completamente federato."
|
||||
|
@ -1132,9 +1135,9 @@ externalServices: "Servizi esterni"
|
|||
impressum: "Dichiarazione di proprietà"
|
||||
impressumUrl: "URL della dichiarazione di proprietà"
|
||||
impressumDescription: "La dichiarazione di proprietà, è obbligatoria in alcuni paesi come la Germania (Impressum)."
|
||||
privacyPolicy: "Informativa sulla privacy"
|
||||
privacyPolicy: "Informativa ai sensi degli artt. 13 e 14 del Regolamento UE 2016/679 per la protezione dei dati personali (GDPR)"
|
||||
privacyPolicyUrl: "URL della informativa privacy"
|
||||
tosAndPrivacyPolicy: "Condizioni d'uso e informativa sulla privacy"
|
||||
tosAndPrivacyPolicy: "Condizioni d'uso e informativa privacy"
|
||||
_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."
|
||||
|
@ -1879,9 +1882,9 @@ _poll:
|
|||
remainingSeconds: "Rimangono {s} secondi"
|
||||
_visibility:
|
||||
public: "Pubblica"
|
||||
publicDescription: "Visibile per tutti sul Fediverso"
|
||||
publicDescription: "Visibilità pubblica"
|
||||
home: "Home"
|
||||
homeDescription: "Visibile solo sulla timeline locale"
|
||||
homeDescription: "Visibile solo nella Home"
|
||||
followers: "Follower"
|
||||
followersDescription: "Visibile solo ai tuoi follower"
|
||||
specified: "Nota diretta"
|
||||
|
@ -2141,3 +2144,11 @@ _moderationLogTypes:
|
|||
createAd: "Banner creato"
|
||||
deleteAd: "Banner eliminato"
|
||||
updateAd: "Banner aggiornato"
|
||||
_fileViewer:
|
||||
title: "Dettagli del file"
|
||||
type: "Tipo di file"
|
||||
size: "Dimensioni file"
|
||||
url: "URL"
|
||||
uploadedAt: "Caricato il"
|
||||
attachedNotes: "Note a cui è allegato"
|
||||
thisPageCanBeSeenFromTheAuthor: "Questa pagina può essere vista solo da chi ha caricato il file."
|
||||
|
|
|
@ -546,6 +546,7 @@ serverLogs: "サーバーログ"
|
|||
deleteAll: "全て削除"
|
||||
showFixedPostForm: "タイムライン上部に投稿フォームを表示する"
|
||||
showFixedPostFormInChannel: "タイムライン上部に投稿フォームを表示する(チャンネル)"
|
||||
withRepliesByDefaultForNewlyFollowed: "フォローする際、デフォルトで返信をTLに含むようにする"
|
||||
newNoteRecived: "新しいノートがあります"
|
||||
sounds: "サウンド"
|
||||
sound: "サウンド"
|
||||
|
@ -604,7 +605,7 @@ poll: "アンケート"
|
|||
useCw: "内容を隠す"
|
||||
enablePlayer: "プレイヤーを開く"
|
||||
disablePlayer: "プレイヤーを閉じる"
|
||||
expandTweet: "ツイートを展開する"
|
||||
expandTweet: "ポストを展開する"
|
||||
themeEditor: "テーマエディター"
|
||||
description: "説明"
|
||||
describeFile: "キャプションを付ける"
|
||||
|
@ -1104,6 +1105,10 @@ additionalEmojiDictionary: "絵文字の追加辞書"
|
|||
installed: "インストール済み"
|
||||
branding: "ブランディング"
|
||||
enableServerMachineStats: "サーバーのマシン情報を公開する"
|
||||
enableAchievements: "実績を有効にする"
|
||||
turnOffAchievements: "これをオフにすると、達成システムは無効になります。"
|
||||
enableBotTrending: "ハッシュタグにボットを追加する"
|
||||
turnOffBotTrending: "これをオフにすると、ボットがハッシュタグを入力しなくなります。"
|
||||
enableIdenticonGeneration: "ユーザーごとのIdenticon生成を有効にする"
|
||||
turnOffToImprovePerformance: "オフにするとパフォーマンスが向上します。"
|
||||
createInviteCode: "招待コードを作成"
|
||||
|
@ -1140,6 +1145,7 @@ loadConversation: "会話を見る"
|
|||
pinnedList: "ピン留めされたリスト"
|
||||
keepScreenOn: "デバイスの画面を常にオンにする"
|
||||
clickToOpen: "クリックしてノートを開く"
|
||||
showBots: "ボットをタイムラインに表示"
|
||||
verifiedLink: "このリンク先の所有者であることが確認されました"
|
||||
notifyNotes: "投稿を通知"
|
||||
unnotifyNotes: "投稿の通知を解除"
|
||||
|
@ -1994,6 +2000,7 @@ _exportOrImport:
|
|||
userLists: "リスト"
|
||||
excludeMutingUsers: "ミュートしているユーザーを除外"
|
||||
excludeInactiveUsers: "使われていないアカウントを除外"
|
||||
withReplies: "インポートした人による返信をTLに含むようにする"
|
||||
|
||||
_charts:
|
||||
federation: "連合"
|
||||
|
|
|
@ -1117,15 +1117,25 @@ keepScreenOn: "เปิดหน้าจอไว้"
|
|||
notifyNotes: "แจ้งเตือนเกี่ยวกับโพสต์ใหม่"
|
||||
unnotifyNotes: "หยุดการแจ้งเตือนเกี่ยวกับโน้ตใหม่"
|
||||
authentication: "การตรวจสอบสิทธิ์"
|
||||
authenticationRequiredToContinue: "กรุณาตรวจสอบการรับรองความถูกต้องเพื่อดำเนินการต่อ"
|
||||
dateAndTime: "เวลาประทับ"
|
||||
showRenotes: "แสดงรีโน้ต"
|
||||
edited: "แก้ไขแล้ว"
|
||||
notificationRecieveConfig: "การตั้งค่าการแจ้งเตือน"
|
||||
mutualFollow: "ติดตามซึ่งกันและกัน"
|
||||
fileAttachedOnly: "เฉพาะโน้ตที่มีไฟล์เท่านั้น"
|
||||
showRepliesToOthersInTimeline: "แสดงการตอบกลับไปยังอื่นๆในไทม์ไลน์"
|
||||
hideRepliesToOthersInTimeline: "ซ่อนการตอบกลับไปยังอื่นๆจากไทม์ไลน์"
|
||||
externalServices: "บริการภายนอก"
|
||||
impressum: "อิมเพรสชั่น"
|
||||
impressumUrl: "URL อิมเพรสชั่น"
|
||||
privacyPolicy: "นโยบายความเป็นส่วนตัว"
|
||||
privacyPolicyUrl: "URL นโยบายความเป็นส่วนตัว"
|
||||
tosAndPrivacyPolicy: "เงื่อนไขในการให้บริการและนโยบายความเป็นส่วนตัว"
|
||||
_announcement:
|
||||
forExistingUsers: "ผู้ใช้งานที่มีอยู่เท่านั้น"
|
||||
forExistingUsersDescription: "การประกาศนี้จะแสดงต่อผู้ใช้ที่มีอยู่ ณ จุดที่เผยแพร่นั้นๆถ้าหากเปิดใช้งาน ถ้าหากปิดใช้งานผู้ที่กำลังสมัครใหม่หลังจากโพสต์แล้วนั้นก็จะเห็นเช่นกัน"
|
||||
needConfirmationToRead: "จำเป็นต้องยืนยันเพื่อทำเครื่องหมายบอกว่าอ่านแล้ว"
|
||||
needConfirmationToReadDescription: "ข้อความแจ้งแยก ถ้าหากต้องการเพื่อยืนยันว่ากำลังทำเครื่องหมายประกาศนี้ว่าอ่านแล้วจะแสดงขึ้นถ้าหากเปิดใช้งาน การประกาศนั้นจะไม่รวมอยู่ในฟังก์ชั่นว่า \"ทำเครื่องหมายทั้งหมดว่าอ่านแล้ว\""
|
||||
end: "ประกาศเก็บถาวร"
|
||||
tooManyActiveAnnouncementDescription: "การมีประกาศที่ใช้งานมากเกินไปนั้นอาจจะทำให้ประสบการณ์ของผู้ใช้งานนั้นดูแย่ลง โปรดกรุณาพิจารณาการเก็บประกาศที่ล้าสมัยด้วยนะค่ะ"
|
||||
|
@ -1150,6 +1160,8 @@ _serverRules:
|
|||
description: "ชุดของกฎที่จะแสดงก่อนการลงทะเบียนเราขอแนะนำให้ตั้งค่าสรุปข้อกำหนดในการให้บริการ"
|
||||
_serverSettings:
|
||||
iconUrl: "ไอคอน URL"
|
||||
appIconUsageExample: "E.g. เป็น PWA หรือเมื่อแสดงผลเป็นบุ๊กมาร์กหน้าจอหลักบนโทรศัพท์"
|
||||
appIconResolutionMustBe: "ความละเอียดขั้นต่ำไว้คือ {resolution}."
|
||||
manifestJsonOverride: "manifest.json โอเวอร์ลาย"
|
||||
shortName: "ชื่อย่อ"
|
||||
_accountMigration:
|
||||
|
@ -1515,6 +1527,8 @@ _ad:
|
|||
reduceFrequencyOfThisAd: "แสดงโฆษณานี้ให้น้อยลง"
|
||||
hide: "ไม่ต้องแสดง"
|
||||
timezoneinfo: "วันในสัปดาห์นี้จะถูกกำหนดจากโซนเวลาของเซิร์ฟเวอร์"
|
||||
adsSettings: "ตั้งค่าการโฆษณา"
|
||||
setZeroToDisable: "ตั้งค่านี้ให้เป็น 0 เพื่อปิดใช้งานโฆษณาอัปเดตแบบเรียลไทม์"
|
||||
_forgotPassword:
|
||||
enterEmail: "ป้อนที่อยู่อีเมลที่คุณเคยใช้ในการลงทะเบียนไว้ ลิงก์ที่คุณสามารถรีเซ็ตรหัสผ่านได้นั้นจะถูกส่งไปนะ"
|
||||
ifNoEmail: "ถ้าหากคุณไม่ได้ใช้อีเมลระหว่างการลงทะเบียน กรุณาติดต่อผู้ดูแลระบบอินสแตนซ์แทนนะ"
|
||||
|
@ -1714,6 +1728,7 @@ _2fa:
|
|||
step1: "ขั้นตอนแรก ติดตั้งแอปยืนยันตัวตน (เช่น {a} หรือ {b}) บนอุปกรณ์ของคุณ"
|
||||
step2: "จากนั้นสแกนรหัส QR ที่แสดงบนหน้าจอนี้"
|
||||
step2Click: "การคลิกที่รหัส QR นี้จะช่วยให้คุณนั้นสามารถลงทะเบียน 2FA กับคีย์ความปลอดภัยหรือแอปตรวจสอบความถูกต้องของโทรศัพท์ได้"
|
||||
step2Uri: "ป้อนใส่ URL ดังต่อไปนี้ถ้าหากคุณใช้โปรแกรมเดสก์ท็อป"
|
||||
step3Title: "ป้อนรหัสยืนยัน"
|
||||
step3: "ป้อนโทเค็นที่แอปของคุณให้มาเพื่อเสร็จสิ้นการตั้งค่า"
|
||||
setupCompleted: "ตั้งค่าสำเร็จแล้ว"
|
||||
|
@ -1732,6 +1747,8 @@ _2fa:
|
|||
renewTOTPOk: "ตั้งค่าคอนฟิกใหม่"
|
||||
renewTOTPCancel: "ไม่เป็นไร"
|
||||
backupCodes: "รหัสสำรองข้อมูล"
|
||||
backupCodeUsedWarning: "มีการใช้รหัสสำรองแล้ว โปรดกรุณากำหนดค่าการตรวจสอบสิทธิ์แบบสองปัจจัยโดยเร็วที่สุดถ้าหากคุณยังไม่สามารถใช้งานได้อีกต่อไป"
|
||||
backupCodesExhaustedWarning: "รหัสสำรองทั้งหมดถูกใช้แล้วถ้าหากคุณยังสูญเสียการเข้าถึงแอปการตรวจสอบสิทธิ์แบบสองปัจจัยคุณจะไม่สามารถเข้าถึงบัญชีนี้ได้ กรุณากำหนดค่าการรับรองความถูกต้องด้วยการยืนยันสองชั้น"
|
||||
_permissions:
|
||||
"read:account": "ดูข้อมูลบัญชีของคุณ"
|
||||
"write:account": "แก้ไขข้อมูลบัญชีของคุณ"
|
||||
|
@ -1894,6 +1911,7 @@ _exportOrImport:
|
|||
userLists: "รายการ"
|
||||
excludeMutingUsers: "ยกเว้นผู้ใช้ที่ปิดเสียง"
|
||||
excludeInactiveUsers: "ยกเว้นผู้ใช้ที่ไม่ได้ใช้งาน"
|
||||
withReplies: "รวมการตอบกลับจากผู้ใช้ที่นำเข้าไว้ในไทม์ไลน์"
|
||||
_charts:
|
||||
federation: "สหพันธ์"
|
||||
apRequest: "คำขอ"
|
||||
|
@ -2114,3 +2132,11 @@ _moderationLogTypes:
|
|||
createAd: "สร้างโฆษณาแล้ว"
|
||||
deleteAd: "ลบโฆษณาออกแล้ว"
|
||||
updateAd: "อัปเดตโฆษณาแล้ว"
|
||||
_fileViewer:
|
||||
title: "รายละเอียดไฟล์"
|
||||
type: "ประเภทไฟล์"
|
||||
size: "ขนาดไฟล์"
|
||||
url: "URL"
|
||||
uploadedAt: "วันที่เข้าร่วม"
|
||||
attachedNotes: "โน้ตที่แนบมาด้วย"
|
||||
thisPageCanBeSeenFromTheAuthor: "หน้าเพจนี้จะสามารถปรากฏได้โดยผู้ใช้ที่อัปโหลดไฟล์นี้เท่านั้น"
|
||||
|
|
|
@ -1125,8 +1125,8 @@ showRenotes: "顯示轉發貼文"
|
|||
edited: "已編輯"
|
||||
notificationRecieveConfig: "接受通知的設定"
|
||||
mutualFollow: "互相追隨"
|
||||
fileAttachedOnly: "包含附件"
|
||||
showRepliesToOthersInTimeline: "在時間軸上顯示給其他人的回覆"
|
||||
fileAttachedOnly: "顯示包含附件的貼文"
|
||||
showRepliesToOthersInTimeline: "顯示給其他人的回覆"
|
||||
hideRepliesToOthersInTimeline: "在時間軸上隱藏給其他人的回覆"
|
||||
externalServices: "外部服務"
|
||||
impressum: "營運者資訊"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"type": "git",
|
||||
"url": "https://github.com/transfem-org/sharkey.git"
|
||||
},
|
||||
"packageManager": "pnpm@8.8.0",
|
||||
"packageManager": "pnpm@8.9.2",
|
||||
"workspaces": [
|
||||
"packages/frontend",
|
||||
"packages/backend",
|
||||
|
@ -51,8 +51,8 @@
|
|||
"typescript": "5.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "6.7.5",
|
||||
"@typescript-eslint/parser": "6.7.5",
|
||||
"@typescript-eslint/eslint-plugin": "6.8.0",
|
||||
"@typescript-eslint/parser": "6.8.0",
|
||||
"cross-env": "7.0.3",
|
||||
"cypress": "13.3.1",
|
||||
"eslint": "8.51.0",
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
|
||||
export class FollowRequestWithReplies1697441463087 {
|
||||
name = 'FollowRequestWithReplies1697441463087'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "follow_request" ADD "withReplies" boolean NOT NULL DEFAULT false`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "follow_request" DROP COLUMN "withReplies"`);
|
||||
}
|
||||
}
|
16
packages/backend/migration/1697603945000-BotTrending.js
Normal file
16
packages/backend/migration/1697603945000-BotTrending.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
export class BotTrending1697603945000 {
|
||||
name = 'BotTrending1697603945000'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "meta" ADD "enableBotTrending" boolean NOT NULL DEFAULT true`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableBotTrending"`);
|
||||
}
|
||||
}
|
16
packages/backend/migration/1697624010000-isSilenced.js
Normal file
16
packages/backend/migration/1697624010000-isSilenced.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
export class IsSilenced1697624010000 {
|
||||
name = 'IsSilenced1697624010000'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "user" ADD "isSilenced" boolean NOT NULL DEFAULT false`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "isSilenced"`);
|
||||
}
|
||||
}
|
|
@ -58,9 +58,10 @@
|
|||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "3.412.0",
|
||||
"@aws-sdk/lib-storage": "3.412.0",
|
||||
"@bull-board/api": "5.8.4",
|
||||
"@bull-board/fastify": "5.8.4",
|
||||
"@bull-board/ui": "5.8.4",
|
||||
"@smithy/node-http-handler": "2.1.5",
|
||||
"@bull-board/api": "5.9.1",
|
||||
"@bull-board/fastify": "5.9.1",
|
||||
"@bull-board/ui": "5.9.1",
|
||||
"@discordapp/twemoji": "14.1.2",
|
||||
"@fastify/accepts": "4.2.0",
|
||||
"@fastify/cookie": "9.1.0",
|
||||
|
@ -76,7 +77,6 @@
|
|||
"@peertube/http-signature": "1.7.0",
|
||||
"@simplewebauthn/server": "8.3.2",
|
||||
"@sinonjs/fake-timers": "11.1.0",
|
||||
"@smithy/node-http-handler": "2.1.5",
|
||||
"@swc/cli": "0.1.62",
|
||||
"@swc/core": "1.3.93",
|
||||
"accepts": "1.3.8",
|
||||
|
@ -158,7 +158,7 @@
|
|||
"strict-event-emitter-types": "2.0.0",
|
||||
"stringz": "2.1.0",
|
||||
"summaly": "github:misskey-dev/summaly",
|
||||
"systeminformation": "5.21.11",
|
||||
"systeminformation": "5.21.12",
|
||||
"tinycolor2": "1.6.0",
|
||||
"tmp": "0.2.1",
|
||||
"tsc-alias": "1.8.8",
|
||||
|
@ -177,13 +177,13 @@
|
|||
"@jest/globals": "29.7.0",
|
||||
"@simplewebauthn/typescript-types": "8.0.0",
|
||||
"@swc/jest": "0.2.29",
|
||||
"@types/accepts": "1.3.5",
|
||||
"@types/archiver": "5.3.3",
|
||||
"@types/bcryptjs": "2.4.4",
|
||||
"@types/body-parser": "1.19.3",
|
||||
"@types/accepts": "1.3.6",
|
||||
"@types/archiver": "5.3.4",
|
||||
"@types/bcryptjs": "2.4.5",
|
||||
"@types/body-parser": "1.19.4",
|
||||
"@types/cbor": "6.0.0",
|
||||
"@types/color-convert": "2.0.1",
|
||||
"@types/content-disposition": "0.5.6",
|
||||
"@types/color-convert": "2.0.2",
|
||||
"@types/content-disposition": "0.5.7",
|
||||
"@types/fluent-ffmpeg": "2.1.22",
|
||||
"@types/http-link-header": "1.0.3",
|
||||
"@types/jest": "29.5.5",
|
||||
|
@ -217,8 +217,8 @@
|
|||
"@types/vary": "1.1.1",
|
||||
"@types/web-push": "3.6.1",
|
||||
"@types/ws": "8.5.7",
|
||||
"@typescript-eslint/eslint-plugin": "6.7.5",
|
||||
"@typescript-eslint/parser": "6.7.5",
|
||||
"@typescript-eslint/eslint-plugin": "6.8.0",
|
||||
"@typescript-eslint/parser": "6.8.0",
|
||||
"aws-sdk-client-mock": "3.0.0",
|
||||
"cross-env": "7.0.3",
|
||||
"eslint": "8.51.0",
|
||||
|
|
|
@ -16,7 +16,7 @@ import type { AntennasRepository, UserListMembershipsRepository } from '@/models
|
|||
import { UtilityService } from '@/core/UtilityService.js';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
import type { GlobalEvents } from '@/core/GlobalEventService.js';
|
||||
import { RedisTimelineService } from '@/core/RedisTimelineService.js';
|
||||
import { FunoutTimelineService } from '@/core/FunoutTimelineService.js';
|
||||
import type { OnApplicationShutdown } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
|
@ -39,7 +39,7 @@ export class AntennaService implements OnApplicationShutdown {
|
|||
|
||||
private utilityService: UtilityService,
|
||||
private globalEventService: GlobalEventService,
|
||||
private redisTimelineService: RedisTimelineService,
|
||||
private funoutTimelineService: FunoutTimelineService,
|
||||
) {
|
||||
this.antennasFetched = false;
|
||||
this.antennas = [];
|
||||
|
@ -84,7 +84,7 @@ export class AntennaService implements OnApplicationShutdown {
|
|||
const redisPipeline = this.redisForTimelines.pipeline();
|
||||
|
||||
for (const antenna of matchedAntennas) {
|
||||
this.redisTimelineService.push(`antennaTimeline:${antenna.id}`, note.id, 200, redisPipeline);
|
||||
this.funoutTimelineService.push(`antennaTimeline:${antenna.id}`, note.id, 200, redisPipeline);
|
||||
this.globalEventService.publishAntennaStream(antenna.id, 'note', note);
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ import { FileInfoService } from './FileInfoService.js';
|
|||
import { SearchService } from './SearchService.js';
|
||||
import { ClipService } from './ClipService.js';
|
||||
import { FeaturedService } from './FeaturedService.js';
|
||||
import { RedisTimelineService } from './RedisTimelineService.js';
|
||||
import { FunoutTimelineService } from './FunoutTimelineService.js';
|
||||
import { ChartLoggerService } from './chart/ChartLoggerService.js';
|
||||
import FederationChart from './chart/charts/federation.js';
|
||||
import NotesChart from './chart/charts/notes.js';
|
||||
|
@ -192,7 +192,7 @@ const $FileInfoService: Provider = { provide: 'FileInfoService', useExisting: Fi
|
|||
const $SearchService: Provider = { provide: 'SearchService', useExisting: SearchService };
|
||||
const $ClipService: Provider = { provide: 'ClipService', useExisting: ClipService };
|
||||
const $FeaturedService: Provider = { provide: 'FeaturedService', useExisting: FeaturedService };
|
||||
const $RedisTimelineService: Provider = { provide: 'RedisTimelineService', useExisting: RedisTimelineService };
|
||||
const $FunoutTimelineService: Provider = { provide: 'FunoutTimelineService', useExisting: FunoutTimelineService };
|
||||
|
||||
const $ChartLoggerService: Provider = { provide: 'ChartLoggerService', useExisting: ChartLoggerService };
|
||||
const $FederationChart: Provider = { provide: 'FederationChart', useExisting: FederationChart };
|
||||
|
@ -326,7 +326,7 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting
|
|||
SearchService,
|
||||
ClipService,
|
||||
FeaturedService,
|
||||
RedisTimelineService,
|
||||
FunoutTimelineService,
|
||||
ChartLoggerService,
|
||||
FederationChart,
|
||||
NotesChart,
|
||||
|
@ -453,7 +453,7 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting
|
|||
$SearchService,
|
||||
$ClipService,
|
||||
$FeaturedService,
|
||||
$RedisTimelineService,
|
||||
$FunoutTimelineService,
|
||||
$ChartLoggerService,
|
||||
$FederationChart,
|
||||
$NotesChart,
|
||||
|
@ -581,7 +581,7 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting
|
|||
SearchService,
|
||||
ClipService,
|
||||
FeaturedService,
|
||||
RedisTimelineService,
|
||||
FunoutTimelineService,
|
||||
FederationChart,
|
||||
NotesChart,
|
||||
UsersChart,
|
||||
|
@ -707,7 +707,7 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting
|
|||
$SearchService,
|
||||
$ClipService,
|
||||
$FeaturedService,
|
||||
$RedisTimelineService,
|
||||
$FunoutTimelineService,
|
||||
$FederationChart,
|
||||
$NotesChart,
|
||||
$UsersChart,
|
||||
|
|
|
@ -10,7 +10,7 @@ import { bindThis } from '@/decorators.js';
|
|||
import { IdService } from '@/core/IdService.js';
|
||||
|
||||
@Injectable()
|
||||
export class RedisTimelineService {
|
||||
export class FunoutTimelineService {
|
||||
constructor(
|
||||
@Inject(DI.redisForTimelines)
|
||||
private redisForTimelines: Redis.Redis,
|
||||
|
@ -77,4 +77,9 @@ export class RedisTimelineService {
|
|||
);
|
||||
});
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public purge(name: string) {
|
||||
return this.redisForTimelines.del('list:' + name);
|
||||
}
|
||||
}
|
|
@ -45,7 +45,7 @@ export class HashtagService {
|
|||
await this.updateHashtag(user, tag, true, true);
|
||||
}
|
||||
|
||||
for (const tag of (user.tags ?? []).filter(x => !tags.includes(x))) {
|
||||
for (const tag of user.tags.filter(x => !tags.includes(x))) {
|
||||
await this.updateHashtag(user, tag, true, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ import { RoleService } from '@/core/RoleService.js';
|
|||
import { MetaService } from '@/core/MetaService.js';
|
||||
import { SearchService } from '@/core/SearchService.js';
|
||||
import { FeaturedService } from '@/core/FeaturedService.js';
|
||||
import { RedisTimelineService } from '@/core/RedisTimelineService.js';
|
||||
import { FunoutTimelineService } from '@/core/FunoutTimelineService.js';
|
||||
import { nyaize } from '@/misc/nyaize.js';
|
||||
import { UtilityService } from '@/core/UtilityService.js';
|
||||
|
||||
|
@ -197,7 +197,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
private idService: IdService,
|
||||
private globalEventService: GlobalEventService,
|
||||
private queueService: QueueService,
|
||||
private redisTimelineService: RedisTimelineService,
|
||||
private funoutTimelineService: FunoutTimelineService,
|
||||
private noteReadService: NoteReadService,
|
||||
private notificationService: NotificationService,
|
||||
private relayService: RelayService,
|
||||
|
@ -253,8 +253,10 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
if (data.channel != null) data.visibleUsers = [];
|
||||
if (data.channel != null) data.localOnly = true;
|
||||
|
||||
const meta = await this.metaService.fetch();
|
||||
|
||||
if (data.visibility === 'public' && data.channel == null) {
|
||||
const sensitiveWords = (await this.metaService.fetch()).sensitiveWords;
|
||||
const sensitiveWords = meta.sensitiveWords;
|
||||
if (this.isSensitive(data, sensitiveWords)) {
|
||||
data.visibility = 'home';
|
||||
} else if ((await this.roleService.getUserPolicies(user.id)).canPublicNote === false) {
|
||||
|
@ -262,7 +264,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
}
|
||||
}
|
||||
|
||||
const inSilencedInstance = this.utilityService.isSilencedHost((await this.metaService.fetch()).silencedHosts, user.host);
|
||||
const inSilencedInstance = this.utilityService.isSilencedHost(meta.silencedHosts, user.host);
|
||||
|
||||
if (data.visibility === 'public' && inSilencedInstance && user.host !== null) {
|
||||
data.visibility = 'home';
|
||||
|
@ -316,7 +318,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
data.text = data.text.trim();
|
||||
|
||||
if (user.isCat && user.speakAsCat) {
|
||||
patsedText = patsedText ?? mfm.parse(data.text);
|
||||
patsedText = mfm.parse(data.text);
|
||||
function nyaizeNode(node: mfm.MfmNode) {
|
||||
if (node.type === 'quote') return;
|
||||
if (node.type === 'text') {
|
||||
|
@ -358,7 +360,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
mentionedUsers = data.apMentions ?? await this.extractMentionedUsers(user, combinedTokens);
|
||||
}
|
||||
|
||||
tags = tags.filter(tag => Array.from(tag ?? '').length <= 128).splice(0, 32);
|
||||
tags = tags.filter(tag => Array.from(tag).length <= 128).splice(0, 32);
|
||||
|
||||
if (data.reply && (user.id !== data.reply.userId) && !mentionedUsers.some(u => u.id === data.reply!.userId)) {
|
||||
mentionedUsers.push(await this.usersRepository.findOneByOrFail({ id: data.reply!.userId }));
|
||||
|
@ -511,7 +513,11 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
|
||||
// ハッシュタグ更新
|
||||
if (data.visibility === 'public' || data.visibility === 'home') {
|
||||
this.hashtagService.updateHashtags(user, tags);
|
||||
if (user.isBot && meta.enableBotTrending) {
|
||||
this.hashtagService.updateHashtags(user, tags);
|
||||
} else if (!user.isBot) {
|
||||
this.hashtagService.updateHashtags(user, tags);
|
||||
}
|
||||
}
|
||||
|
||||
// Increment notes count (user)
|
||||
|
@ -850,9 +856,9 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
const r = this.redisForTimelines.pipeline();
|
||||
|
||||
if (note.channelId) {
|
||||
this.redisTimelineService.push(`channelTimeline:${note.channelId}`, note.id, this.config.perChannelMaxNoteCacheCount, r);
|
||||
this.funoutTimelineService.push(`channelTimeline:${note.channelId}`, note.id, this.config.perChannelMaxNoteCacheCount, r);
|
||||
|
||||
this.redisTimelineService.push(`userTimelineWithChannel:${user.id}`, note.id, note.userHost == null ? meta.perLocalUserUserTimelineCacheMax : meta.perRemoteUserUserTimelineCacheMax, r);
|
||||
this.funoutTimelineService.push(`userTimelineWithChannel:${user.id}`, note.id, note.userHost == null ? meta.perLocalUserUserTimelineCacheMax : meta.perRemoteUserUserTimelineCacheMax, r);
|
||||
|
||||
const channelFollowings = await this.channelFollowingsRepository.find({
|
||||
where: {
|
||||
|
@ -862,9 +868,9 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
});
|
||||
|
||||
for (const channelFollowing of channelFollowings) {
|
||||
this.redisTimelineService.push(`homeTimeline:${channelFollowing.followerId}`, note.id, meta.perUserHomeTimelineCacheMax, r);
|
||||
this.funoutTimelineService.push(`homeTimeline:${channelFollowing.followerId}`, note.id, meta.perUserHomeTimelineCacheMax, r);
|
||||
if (note.fileIds.length > 0) {
|
||||
this.redisTimelineService.push(`homeTimelineWithFiles:${channelFollowing.followerId}`, note.id, meta.perUserHomeTimelineCacheMax / 2, r);
|
||||
this.funoutTimelineService.push(`homeTimelineWithFiles:${channelFollowing.followerId}`, note.id, meta.perUserHomeTimelineCacheMax / 2, r);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -902,9 +908,9 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
if (!following.withReplies) continue;
|
||||
}
|
||||
|
||||
this.redisTimelineService.push(`homeTimeline:${following.followerId}`, note.id, meta.perUserHomeTimelineCacheMax, r);
|
||||
this.funoutTimelineService.push(`homeTimeline:${following.followerId}`, note.id, meta.perUserHomeTimelineCacheMax, r);
|
||||
if (note.fileIds.length > 0) {
|
||||
this.redisTimelineService.push(`homeTimelineWithFiles:${following.followerId}`, note.id, meta.perUserHomeTimelineCacheMax / 2, r);
|
||||
this.funoutTimelineService.push(`homeTimelineWithFiles:${following.followerId}`, note.id, meta.perUserHomeTimelineCacheMax / 2, r);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -920,36 +926,36 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
if (!userListMembership.withReplies) continue;
|
||||
}
|
||||
|
||||
this.redisTimelineService.push(`userListTimeline:${userListMembership.userListId}`, note.id, meta.perUserListTimelineCacheMax, r);
|
||||
this.funoutTimelineService.push(`userListTimeline:${userListMembership.userListId}`, note.id, meta.perUserListTimelineCacheMax, r);
|
||||
if (note.fileIds.length > 0) {
|
||||
this.redisTimelineService.push(`userListTimelineWithFiles:${userListMembership.userListId}`, note.id, meta.perUserListTimelineCacheMax / 2, r);
|
||||
this.funoutTimelineService.push(`userListTimelineWithFiles:${userListMembership.userListId}`, note.id, meta.perUserListTimelineCacheMax / 2, r);
|
||||
}
|
||||
}
|
||||
|
||||
if (note.visibility !== 'specified' || !note.visibleUserIds.some(v => v === user.id)) { // 自分自身のHTL
|
||||
this.redisTimelineService.push(`homeTimeline:${user.id}`, note.id, meta.perUserHomeTimelineCacheMax, r);
|
||||
this.funoutTimelineService.push(`homeTimeline:${user.id}`, note.id, meta.perUserHomeTimelineCacheMax, r);
|
||||
if (note.fileIds.length > 0) {
|
||||
this.redisTimelineService.push(`homeTimelineWithFiles:${user.id}`, note.id, meta.perUserHomeTimelineCacheMax / 2, r);
|
||||
this.funoutTimelineService.push(`homeTimelineWithFiles:${user.id}`, note.id, meta.perUserHomeTimelineCacheMax / 2, r);
|
||||
}
|
||||
}
|
||||
|
||||
// 自分自身以外への返信
|
||||
if (note.replyId && note.replyUserId !== note.userId) {
|
||||
this.redisTimelineService.push(`userTimelineWithReplies:${user.id}`, note.id, note.userHost == null ? meta.perLocalUserUserTimelineCacheMax : meta.perRemoteUserUserTimelineCacheMax, r);
|
||||
this.funoutTimelineService.push(`userTimelineWithReplies:${user.id}`, note.id, note.userHost == null ? meta.perLocalUserUserTimelineCacheMax : meta.perRemoteUserUserTimelineCacheMax, r);
|
||||
|
||||
if (note.visibility === 'public' && note.userHost == null) {
|
||||
this.redisTimelineService.push('localTimelineWithReplies', note.id, 300, r);
|
||||
this.funoutTimelineService.push('localTimelineWithReplies', note.id, 300, r);
|
||||
}
|
||||
} else {
|
||||
this.redisTimelineService.push(`userTimeline:${user.id}`, note.id, note.userHost == null ? meta.perLocalUserUserTimelineCacheMax : meta.perRemoteUserUserTimelineCacheMax, r);
|
||||
this.funoutTimelineService.push(`userTimeline:${user.id}`, note.id, note.userHost == null ? meta.perLocalUserUserTimelineCacheMax : meta.perRemoteUserUserTimelineCacheMax, r);
|
||||
if (note.fileIds.length > 0) {
|
||||
this.redisTimelineService.push(`userTimelineWithFiles:${user.id}`, note.id, note.userHost == null ? meta.perLocalUserUserTimelineCacheMax / 2 : meta.perRemoteUserUserTimelineCacheMax / 2, r);
|
||||
this.funoutTimelineService.push(`userTimelineWithFiles:${user.id}`, note.id, note.userHost == null ? meta.perLocalUserUserTimelineCacheMax / 2 : meta.perRemoteUserUserTimelineCacheMax / 2, r);
|
||||
}
|
||||
|
||||
if (note.visibility === 'public' && note.userHost == null) {
|
||||
this.redisTimelineService.push('localTimeline', note.id, 1000, r);
|
||||
this.funoutTimelineService.push('localTimeline', note.id, 1000, r);
|
||||
if (note.fileIds.length > 0) {
|
||||
this.redisTimelineService.push('localTimelineWithFiles', note.id, 500, r);
|
||||
this.funoutTimelineService.push('localTimelineWithFiles', note.id, 500, r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ import { RoleService } from '@/core/RoleService.js';
|
|||
import { MetaService } from '@/core/MetaService.js';
|
||||
import { SearchService } from '@/core/SearchService.js';
|
||||
import { FeaturedService } from '@/core/FeaturedService.js';
|
||||
import { RedisTimelineService } from '@/core/RedisTimelineService.js';
|
||||
import { FunoutTimelineService } from '@/core/FunoutTimelineService.js';
|
||||
import { AntennaService } from './AntennaService.js';
|
||||
import NotesChart from './chart/charts/notes.js';
|
||||
import PerUserNotesChart from './chart/charts/per-user-notes.js';
|
||||
|
@ -199,7 +199,7 @@ export class NoteEditService implements OnApplicationShutdown {
|
|||
private idService: IdService,
|
||||
private globalEventService: GlobalEventService,
|
||||
private queueService: QueueService,
|
||||
private redisTimelineService: RedisTimelineService,
|
||||
private funoutTimelineService: FunoutTimelineService,
|
||||
private noteReadService: NoteReadService,
|
||||
private notificationService: NotificationService,
|
||||
private relayService: RelayService,
|
||||
|
@ -785,9 +785,9 @@ export class NoteEditService implements OnApplicationShutdown {
|
|||
const r = this.redisForTimelines.pipeline();
|
||||
|
||||
if (note.channelId) {
|
||||
this.redisTimelineService.push(`channelTimeline:${note.channelId}`, note.id, this.config.perChannelMaxNoteCacheCount, r);
|
||||
this.funoutTimelineService.push(`channelTimeline:${note.channelId}`, note.id, this.config.perChannelMaxNoteCacheCount, r);
|
||||
|
||||
this.redisTimelineService.push(`userTimelineWithChannel:${user.id}`, note.id, note.userHost == null ? meta.perLocalUserUserTimelineCacheMax : meta.perRemoteUserUserTimelineCacheMax, r);
|
||||
this.funoutTimelineService.push(`userTimelineWithChannel:${user.id}`, note.id, note.userHost == null ? meta.perLocalUserUserTimelineCacheMax : meta.perRemoteUserUserTimelineCacheMax, r);
|
||||
|
||||
const channelFollowings = await this.channelFollowingsRepository.find({
|
||||
where: {
|
||||
|
@ -797,9 +797,9 @@ export class NoteEditService implements OnApplicationShutdown {
|
|||
});
|
||||
|
||||
for (const channelFollowing of channelFollowings) {
|
||||
this.redisTimelineService.push(`homeTimeline:${channelFollowing.followerId}`, note.id, meta.perUserHomeTimelineCacheMax, r);
|
||||
this.funoutTimelineService.push(`homeTimeline:${channelFollowing.followerId}`, note.id, meta.perUserHomeTimelineCacheMax, r);
|
||||
if (note.fileIds.length > 0) {
|
||||
this.redisTimelineService.push(`homeTimelineWithFiles:${channelFollowing.followerId}`, note.id, meta.perUserHomeTimelineCacheMax / 2, r);
|
||||
this.funoutTimelineService.push(`homeTimelineWithFiles:${channelFollowing.followerId}`, note.id, meta.perUserHomeTimelineCacheMax / 2, r);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -837,9 +837,9 @@ export class NoteEditService implements OnApplicationShutdown {
|
|||
if (!following.withReplies) continue;
|
||||
}
|
||||
|
||||
this.redisTimelineService.push(`homeTimeline:${following.followerId}`, note.id, meta.perUserHomeTimelineCacheMax, r);
|
||||
this.funoutTimelineService.push(`homeTimeline:${following.followerId}`, note.id, meta.perUserHomeTimelineCacheMax, r);
|
||||
if (note.fileIds.length > 0) {
|
||||
this.redisTimelineService.push(`homeTimelineWithFiles:${following.followerId}`, note.id, meta.perUserHomeTimelineCacheMax / 2, r);
|
||||
this.funoutTimelineService.push(`homeTimelineWithFiles:${following.followerId}`, note.id, meta.perUserHomeTimelineCacheMax / 2, r);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -855,36 +855,36 @@ export class NoteEditService implements OnApplicationShutdown {
|
|||
if (!userListMembership.withReplies) continue;
|
||||
}
|
||||
|
||||
this.redisTimelineService.push(`userListTimeline:${userListMembership.userListId}`, note.id, meta.perUserListTimelineCacheMax, r);
|
||||
this.funoutTimelineService.push(`userListTimeline:${userListMembership.userListId}`, note.id, meta.perUserListTimelineCacheMax, r);
|
||||
if (note.fileIds.length > 0) {
|
||||
this.redisTimelineService.push(`userListTimelineWithFiles:${userListMembership.userListId}`, note.id, meta.perUserListTimelineCacheMax / 2, r);
|
||||
this.funoutTimelineService.push(`userListTimelineWithFiles:${userListMembership.userListId}`, note.id, meta.perUserListTimelineCacheMax / 2, r);
|
||||
}
|
||||
}
|
||||
|
||||
if (note.visibility !== 'specified' || !note.visibleUserIds.some(v => v === user.id)) { // 自分自身のHTL
|
||||
this.redisTimelineService.push(`homeTimeline:${user.id}`, note.id, meta.perUserHomeTimelineCacheMax, r);
|
||||
this.funoutTimelineService.push(`homeTimeline:${user.id}`, note.id, meta.perUserHomeTimelineCacheMax, r);
|
||||
if (note.fileIds.length > 0) {
|
||||
this.redisTimelineService.push(`homeTimelineWithFiles:${user.id}`, note.id, meta.perUserHomeTimelineCacheMax / 2, r);
|
||||
this.funoutTimelineService.push(`homeTimelineWithFiles:${user.id}`, note.id, meta.perUserHomeTimelineCacheMax / 2, r);
|
||||
}
|
||||
}
|
||||
|
||||
// 自分自身以外への返信
|
||||
if (note.replyId && note.replyUserId !== note.userId) {
|
||||
this.redisTimelineService.push(`userTimelineWithReplies:${user.id}`, note.id, note.userHost == null ? meta.perLocalUserUserTimelineCacheMax : meta.perRemoteUserUserTimelineCacheMax, r);
|
||||
this.funoutTimelineService.push(`userTimelineWithReplies:${user.id}`, note.id, note.userHost == null ? meta.perLocalUserUserTimelineCacheMax : meta.perRemoteUserUserTimelineCacheMax, r);
|
||||
|
||||
if (note.visibility === 'public' && note.userHost == null) {
|
||||
this.redisTimelineService.push('localTimelineWithReplies', note.id, 300, r);
|
||||
this.funoutTimelineService.push('localTimelineWithReplies', note.id, 300, r);
|
||||
}
|
||||
} else {
|
||||
this.redisTimelineService.push(`userTimeline:${user.id}`, note.id, note.userHost == null ? meta.perLocalUserUserTimelineCacheMax : meta.perRemoteUserUserTimelineCacheMax, r);
|
||||
this.funoutTimelineService.push(`userTimeline:${user.id}`, note.id, note.userHost == null ? meta.perLocalUserUserTimelineCacheMax : meta.perRemoteUserUserTimelineCacheMax, r);
|
||||
if (note.fileIds.length > 0) {
|
||||
this.redisTimelineService.push(`userTimelineWithFiles:${user.id}`, note.id, note.userHost == null ? meta.perLocalUserUserTimelineCacheMax / 2 : meta.perRemoteUserUserTimelineCacheMax / 2, r);
|
||||
this.funoutTimelineService.push(`userTimelineWithFiles:${user.id}`, note.id, note.userHost == null ? meta.perLocalUserUserTimelineCacheMax / 2 : meta.perRemoteUserUserTimelineCacheMax / 2, r);
|
||||
}
|
||||
|
||||
if (note.visibility === 'public' && note.userHost == null) {
|
||||
this.redisTimelineService.push('localTimeline', note.id, 1000, r);
|
||||
this.funoutTimelineService.push('localTimeline', note.id, 1000, r);
|
||||
if (note.fileIds.length > 0) {
|
||||
this.redisTimelineService.push('localTimelineWithFiles', note.id, 500, r);
|
||||
this.funoutTimelineService.push('localTimelineWithFiles', note.id, 500, r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -237,10 +237,11 @@ export class QueueService {
|
|||
}
|
||||
|
||||
@bindThis
|
||||
public createImportFollowingJob(user: ThinUser, fileId: MiDriveFile['id']) {
|
||||
public createImportFollowingJob(user: ThinUser, fileId: MiDriveFile['id'], withReplies?: boolean) {
|
||||
return this.dbQueue.add('importFollowing', {
|
||||
user: { id: user.id },
|
||||
fileId: fileId,
|
||||
withReplies,
|
||||
}, {
|
||||
removeOnComplete: true,
|
||||
removeOnFail: true,
|
||||
|
@ -248,8 +249,8 @@ export class QueueService {
|
|||
}
|
||||
|
||||
@bindThis
|
||||
public createImportFollowingToDbJob(user: ThinUser, targets: string[]) {
|
||||
const jobs = targets.map(rel => this.generateToDbJobData('importFollowingToDb', { user, target: rel }));
|
||||
public createImportFollowingToDbJob(user: ThinUser, targets: string[], withReplies?: boolean) {
|
||||
const jobs = targets.map(rel => this.generateToDbJobData('importFollowingToDb', { user, target: rel, withReplies }));
|
||||
return this.dbQueue.addBulk(jobs);
|
||||
}
|
||||
|
||||
|
@ -342,7 +343,7 @@ export class QueueService {
|
|||
}
|
||||
|
||||
@bindThis
|
||||
public createFollowJob(followings: { from: ThinUser, to: ThinUser, requestId?: string, silent?: boolean }[]) {
|
||||
public createFollowJob(followings: { from: ThinUser, to: ThinUser, requestId?: string, silent?: boolean, withReplies?: boolean }[]) {
|
||||
const jobs = followings.map(rel => this.generateRelationshipJobData('follow', rel));
|
||||
return this.relationshipQueue.addBulk(jobs);
|
||||
}
|
||||
|
@ -384,6 +385,7 @@ export class QueueService {
|
|||
to: { id: data.to.id },
|
||||
silent: data.silent,
|
||||
requestId: data.requestId,
|
||||
withReplies: data.withReplies,
|
||||
},
|
||||
opts: {
|
||||
removeOnComplete: true,
|
||||
|
|
|
@ -148,7 +148,7 @@ export class ReactionService {
|
|||
reaction = FALLBACK;
|
||||
}
|
||||
} else {
|
||||
reaction = this.normalize(reaction ?? null);
|
||||
reaction = this.normalize(reaction);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import { IdService } from '@/core/IdService.js';
|
|||
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
import type { Packed } from '@/misc/json-schema.js';
|
||||
import { RedisTimelineService } from '@/core/RedisTimelineService.js';
|
||||
import { FunoutTimelineService } from '@/core/FunoutTimelineService.js';
|
||||
import type { OnApplicationShutdown } from '@nestjs/common';
|
||||
|
||||
export type RolePolicies = {
|
||||
|
@ -103,7 +103,7 @@ export class RoleService implements OnApplicationShutdown {
|
|||
private globalEventService: GlobalEventService,
|
||||
private idService: IdService,
|
||||
private moderationLogService: ModerationLogService,
|
||||
private redisTimelineService: RedisTimelineService,
|
||||
private funoutTimelineService: FunoutTimelineService,
|
||||
) {
|
||||
//this.onMessage = this.onMessage.bind(this);
|
||||
|
||||
|
@ -470,7 +470,7 @@ export class RoleService implements OnApplicationShutdown {
|
|||
const redisPipeline = this.redisClient.pipeline();
|
||||
|
||||
for (const role of roles) {
|
||||
this.redisTimelineService.push(`roleTimeline:${role.id}`, note.id, 1000, redisPipeline);
|
||||
this.funoutTimelineService.push(`roleTimeline:${role.id}`, note.id, 1000, redisPipeline);
|
||||
this.globalEventService.publishRoleTimelineStream(role.id, 'note', note);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ import { CacheService } from '@/core/CacheService.js';
|
|||
import type { Config } from '@/config.js';
|
||||
import { AccountMoveService } from '@/core/AccountMoveService.js';
|
||||
import { UtilityService } from '@/core/UtilityService.js';
|
||||
import { FunoutTimelineService } from '@/core/FunoutTimelineService.js';
|
||||
import Logger from '../logger.js';
|
||||
|
||||
const logger = new Logger('following/create');
|
||||
|
@ -83,6 +84,7 @@ export class UserFollowingService implements OnModuleInit {
|
|||
private webhookService: WebhookService,
|
||||
private apRendererService: ApRendererService,
|
||||
private accountMoveService: AccountMoveService,
|
||||
private funoutTimelineService: FunoutTimelineService,
|
||||
private perUserFollowingChart: PerUserFollowingChart,
|
||||
private instanceChart: InstanceChart,
|
||||
) {
|
||||
|
@ -93,7 +95,15 @@ export class UserFollowingService implements OnModuleInit {
|
|||
}
|
||||
|
||||
@bindThis
|
||||
public async follow(_follower: { id: MiUser['id'] }, _followee: { id: MiUser['id'] }, requestId?: string, silent = false): Promise<void> {
|
||||
public async follow(
|
||||
_follower: { id: MiUser['id'] },
|
||||
_followee: { id: MiUser['id'] },
|
||||
{ requestId, silent = false, withReplies }: {
|
||||
requestId?: string,
|
||||
silent?: boolean,
|
||||
withReplies?: boolean,
|
||||
} = {},
|
||||
): Promise<void> {
|
||||
const [follower, followee] = await Promise.all([
|
||||
this.usersRepository.findOneByOrFail({ id: _follower.id }),
|
||||
this.usersRepository.findOneByOrFail({ id: _followee.id }),
|
||||
|
@ -171,12 +181,12 @@ export class UserFollowingService implements OnModuleInit {
|
|||
}
|
||||
|
||||
if (!autoAccept) {
|
||||
await this.createFollowRequest(follower, followee, requestId);
|
||||
await this.createFollowRequest(follower, followee, requestId, withReplies);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
await this.insertFollowingDoc(followee, follower, silent);
|
||||
await this.insertFollowingDoc(followee, follower, silent, withReplies);
|
||||
|
||||
if (this.userEntityService.isRemoteUser(follower) && this.userEntityService.isLocalUser(followee)) {
|
||||
const content = this.apRendererService.addContext(this.apRendererService.renderAccept(this.apRendererService.renderFollow(follower, followee, requestId), followee));
|
||||
|
@ -193,6 +203,7 @@ export class UserFollowingService implements OnModuleInit {
|
|||
id: MiUser['id']; host: MiUser['host']; uri: MiUser['host']; inbox: MiUser['inbox']; sharedInbox: MiUser['sharedInbox']
|
||||
},
|
||||
silent = false,
|
||||
withReplies?: boolean,
|
||||
): Promise<void> {
|
||||
if (follower.id === followee.id) return;
|
||||
|
||||
|
@ -202,6 +213,7 @@ export class UserFollowingService implements OnModuleInit {
|
|||
id: this.idService.gen(),
|
||||
followerId: follower.id,
|
||||
followeeId: followee.id,
|
||||
withReplies: withReplies,
|
||||
|
||||
// 非正規化
|
||||
followerHost: follower.host,
|
||||
|
@ -278,8 +290,8 @@ export class UserFollowingService implements OnModuleInit {
|
|||
this.perUserFollowingChart.update(follower, followee, true);
|
||||
}
|
||||
|
||||
// Publish follow event
|
||||
if (this.userEntityService.isLocalUser(follower) && !silent) {
|
||||
// Publish follow event
|
||||
this.userEntityService.pack(followee.id, follower, {
|
||||
detail: true,
|
||||
}).then(async packed => {
|
||||
|
@ -292,6 +304,8 @@ export class UserFollowingService implements OnModuleInit {
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
this.funoutTimelineService.purge(`homeTimeline:${follower.id}`);
|
||||
}
|
||||
|
||||
// Publish followed event
|
||||
|
@ -345,8 +359,8 @@ export class UserFollowingService implements OnModuleInit {
|
|||
|
||||
this.decrementFollowing(following.follower, following.followee);
|
||||
|
||||
// Publish unfollow event
|
||||
if (!silent && this.userEntityService.isLocalUser(follower)) {
|
||||
// Publish unfollow event
|
||||
this.userEntityService.pack(followee.id, follower, {
|
||||
detail: true,
|
||||
}).then(async packed => {
|
||||
|
@ -359,6 +373,8 @@ export class UserFollowingService implements OnModuleInit {
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
this.funoutTimelineService.purge(`homeTimeline:${follower.id}`);
|
||||
}
|
||||
|
||||
if (this.userEntityService.isLocalUser(follower) && this.userEntityService.isRemoteUser(followee)) {
|
||||
|
@ -454,6 +470,7 @@ export class UserFollowingService implements OnModuleInit {
|
|||
id: MiUser['id']; host: MiUser['host']; uri: MiUser['host']; inbox: MiUser['inbox']; sharedInbox: MiUser['sharedInbox'];
|
||||
},
|
||||
requestId?: string,
|
||||
withReplies?: boolean,
|
||||
): Promise<void> {
|
||||
if (follower.id === followee.id) return;
|
||||
|
||||
|
@ -471,6 +488,7 @@ export class UserFollowingService implements OnModuleInit {
|
|||
followerId: follower.id,
|
||||
followeeId: followee.id,
|
||||
requestId,
|
||||
withReplies,
|
||||
|
||||
// 非正規化
|
||||
followerHost: follower.host,
|
||||
|
@ -555,7 +573,7 @@ export class UserFollowingService implements OnModuleInit {
|
|||
throw new IdentifiableError('8884c2dd-5795-4ac9-b27e-6a01d38190f9', 'No follow request.');
|
||||
}
|
||||
|
||||
await this.insertFollowingDoc(followee, follower);
|
||||
await this.insertFollowingDoc(followee, follower, false, request.withReplies);
|
||||
|
||||
if (this.userEntityService.isRemoteUser(follower) && this.userEntityService.isLocalUser(followee)) {
|
||||
const content = this.apRendererService.addContext(this.apRendererService.renderAccept(this.apRendererService.renderFollow(follower, followee as MiPartialLocalUser, request.requestId!), followee));
|
||||
|
@ -695,4 +713,12 @@ export class UserFollowingService implements OnModuleInit {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public getFollowees(userId: MiUser['id']) {
|
||||
return this.followingsRepository.createQueryBuilder('following')
|
||||
.select('following.followeeId')
|
||||
.where('following.followerId = :followerId', { followerId: userId })
|
||||
.getMany();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -164,7 +164,7 @@ export class ApInboxService {
|
|||
}
|
||||
|
||||
// don't queue because the sender may attempt again when timeout
|
||||
await this.userFollowingService.follow(actor, followee, activity.id);
|
||||
await this.userFollowingService.follow(actor, followee, { requestId: activity.id });
|
||||
return 'ok';
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ export class DriveFileEntityService {
|
|||
if (file.type.startsWith('video')) {
|
||||
if (file.thumbnailUrl) return file.thumbnailUrl;
|
||||
|
||||
return this.videoProcessingService.getExternalVideoThumbnailUrl(file.webpublicUrl ?? file.url ?? file.uri);
|
||||
return this.videoProcessingService.getExternalVideoThumbnailUrl(file.webpublicUrl ?? file.url);
|
||||
} else if (file.uri != null && file.userHost != null && this.config.externalMediaProxyEnabled) {
|
||||
// 動画ではなくリモートかつメディアプロキシ
|
||||
return this.getProxiedUrl(file.uri, 'static');
|
||||
|
@ -145,7 +145,7 @@ export class DriveFileEntityService {
|
|||
.select('SUM(file.size)', 'sum')
|
||||
.getRawOne();
|
||||
|
||||
return parseInt(sum, 10) ?? 0;
|
||||
return parseInt(sum, 10) || 0;
|
||||
}
|
||||
|
||||
@bindThis
|
||||
|
@ -157,7 +157,7 @@ export class DriveFileEntityService {
|
|||
.select('SUM(file.size)', 'sum')
|
||||
.getRawOne();
|
||||
|
||||
return parseInt(sum, 10) ?? 0;
|
||||
return parseInt(sum, 10) || 0;
|
||||
}
|
||||
|
||||
@bindThis
|
||||
|
@ -169,7 +169,7 @@ export class DriveFileEntityService {
|
|||
.select('SUM(file.size)', 'sum')
|
||||
.getRawOne();
|
||||
|
||||
return parseInt(sum, 10) ?? 0;
|
||||
return parseInt(sum, 10) || 0;
|
||||
}
|
||||
|
||||
@bindThis
|
||||
|
@ -181,7 +181,7 @@ export class DriveFileEntityService {
|
|||
.select('SUM(file.size)', 'sum')
|
||||
.getRawOne();
|
||||
|
||||
return parseInt(sum, 10) ?? 0;
|
||||
return parseInt(sum, 10) || 0;
|
||||
}
|
||||
|
||||
@bindThis
|
||||
|
|
|
@ -323,7 +323,7 @@ export class NoteEntityService implements OnModuleInit {
|
|||
text: text,
|
||||
cw: note.cw,
|
||||
visibility: note.visibility,
|
||||
localOnly: note.localOnly ?? undefined,
|
||||
localOnly: note.localOnly,
|
||||
reactionAcceptance: note.reactionAcceptance,
|
||||
visibleUserIds: note.visibility === 'specified' ? note.visibleUserIds : undefined,
|
||||
renoteCount: note.renoteCount,
|
||||
|
|
|
@ -366,8 +366,9 @@ export class UserEntityService implements OnModuleInit {
|
|||
avatarBlurhash: user.avatarBlurhash,
|
||||
description: mastoapi ? mastoapi.description : profile ? profile.description : '',
|
||||
createdAt: this.idService.parse(user.id).date.toISOString(),
|
||||
isBot: user.isBot ?? falsy,
|
||||
isCat: user.isCat ?? falsy,
|
||||
isBot: user.isBot,
|
||||
isCat: user.isCat,
|
||||
isSilenced: user.isSilenced || this.roleService.getUserPolicies(user.id).then(r => !r.canPublicNote),
|
||||
speakAsCat: user.speakAsCat ?? falsy,
|
||||
instance: user.host ? this.federatedInstanceService.federatedInstanceCache.fetch(user.host).then(instance => instance ? {
|
||||
name: instance.name,
|
||||
|
@ -404,8 +405,7 @@ export class UserEntityService implements OnModuleInit {
|
|||
backgroundUrl: user.backgroundUrl,
|
||||
backgroundBlurhash: user.backgroundBlurhash,
|
||||
isLocked: user.isLocked,
|
||||
isSilenced: this.roleService.getUserPolicies(user.id).then(r => !r.canPublicNote),
|
||||
isSuspended: user.isSuspended ?? falsy,
|
||||
isSuspended: user.isSuspended,
|
||||
location: profile!.location,
|
||||
birthday: profile!.birthday,
|
||||
listenbrainz: profile!.listenbrainz,
|
||||
|
|
|
@ -108,6 +108,5 @@ async function net() {
|
|||
|
||||
// FS STAT
|
||||
async function fs() {
|
||||
const data = await si.disksIO().catch(() => ({ rIO_sec: 0, wIO_sec: 0 }));
|
||||
return data ?? { rIO_sec: 0, wIO_sec: 0 };
|
||||
return await si.disksIO().catch(() => ({ rIO_sec: 0, wIO_sec: 0 }));
|
||||
}
|
||||
|
|
|
@ -45,6 +45,11 @@ export class MiFollowRequest {
|
|||
})
|
||||
public requestId: string | null;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
})
|
||||
public withReplies: boolean;
|
||||
|
||||
//#region Denormalized fields
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
|
|
|
@ -252,6 +252,11 @@ export class MiMeta {
|
|||
})
|
||||
public enableSensitiveMediaDetectionForVideos: boolean;
|
||||
|
||||
@Column('boolean', {
|
||||
default: true,
|
||||
})
|
||||
public enableBotTrending: boolean;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 1024,
|
||||
nullable: true,
|
||||
|
|
|
@ -173,6 +173,12 @@ export class MiUser {
|
|||
})
|
||||
public isSuspended: boolean;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
comment: 'Whether the User is silenced.',
|
||||
})
|
||||
public isSilenced: boolean;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
comment: 'Whether the User is locked.',
|
||||
|
|
|
@ -47,6 +47,10 @@ export const packedUserLiteSchema = {
|
|||
nullable: false, optional: true,
|
||||
default: false,
|
||||
},
|
||||
isSilenced: {
|
||||
type: 'boolean',
|
||||
nullable: false, optional: false,
|
||||
},
|
||||
isBot: {
|
||||
type: 'boolean',
|
||||
nullable: false, optional: true,
|
||||
|
@ -135,10 +139,6 @@ export const packedUserDetailedNotMeOnlySchema = {
|
|||
type: 'boolean',
|
||||
nullable: false, optional: false,
|
||||
},
|
||||
isSilenced: {
|
||||
type: 'boolean',
|
||||
nullable: false, optional: false,
|
||||
},
|
||||
isSuspended: {
|
||||
type: 'boolean',
|
||||
nullable: false, optional: false,
|
||||
|
|
|
@ -56,7 +56,7 @@ export class ImportFollowingProcessorService {
|
|||
|
||||
const csv = await this.downloadService.downloadTextFile(file.url);
|
||||
const targets = csv.trim().split('\n');
|
||||
this.queueService.createImportFollowingToDbJob({ id: user.id }, targets);
|
||||
this.queueService.createImportFollowingToDbJob({ id: user.id }, targets, job.data.withReplies);
|
||||
|
||||
this.logger.succ('Import jobs created');
|
||||
}
|
||||
|
@ -93,9 +93,9 @@ export class ImportFollowingProcessorService {
|
|||
// skip myself
|
||||
if (target.id === job.data.user.id) return;
|
||||
|
||||
this.logger.info(`Follow ${target.id} ...`);
|
||||
this.logger.info(`Follow ${target.id} ${job.data.withReplies ? 'with replies' : 'without replies'} ...`);
|
||||
|
||||
this.queueService.createFollowJob([{ from: user, to: { id: target.id }, silent: true }]);
|
||||
this.queueService.createFollowJob([{ from: user, to: { id: target.id }, silent: true, withReplies: job.data.withReplies }]);
|
||||
} catch (e) {
|
||||
this.logger.warn(`Error: ${e}`);
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ export class InboxProcessorService {
|
|||
if (err.isClientError) {
|
||||
throw new Bull.UnrecoverableError(`skip: Ignored deleted actors on both ends ${activity.actor} - ${err.statusCode}`);
|
||||
}
|
||||
throw new Error(`Error in actor ${activity.actor} - ${err.statusCode ?? err}`);
|
||||
throw new Error(`Error in actor ${activity.actor} - ${err.statusCode}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,8 +34,12 @@ export class RelationshipProcessorService {
|
|||
|
||||
@bindThis
|
||||
public async processFollow(job: Bull.Job<RelationshipJobData>): Promise<string> {
|
||||
this.logger.info(`${job.data.from.id} is trying to follow ${job.data.to.id}`);
|
||||
await this.userFollowingService.follow(job.data.from, job.data.to, job.data.requestId, job.data.silent);
|
||||
this.logger.info(`${job.data.from.id} is trying to follow ${job.data.to.id} ${job.data.withReplies ? "with replies" : "without replies"}`);
|
||||
await this.userFollowingService.follow(job.data.from, job.data.to, {
|
||||
requestId: job.data.requestId,
|
||||
silent: job.data.silent,
|
||||
withReplies: job.data.withReplies,
|
||||
});
|
||||
return 'ok';
|
||||
}
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ export type RelationshipJobData = {
|
|||
to: ThinUser;
|
||||
silent?: boolean;
|
||||
requestId?: string;
|
||||
withReplies?: boolean;
|
||||
}
|
||||
|
||||
export type DbJobData<T extends keyof DbJobMap> = DbJobMap[T];
|
||||
|
@ -79,6 +80,7 @@ export type DbUserDeleteJobData = {
|
|||
export type DbUserImportJobData = {
|
||||
user: ThinUser;
|
||||
fileId: MiDriveFile['id'];
|
||||
withReplies?: boolean;
|
||||
};
|
||||
|
||||
export type DBAntennaImportJobData = {
|
||||
|
@ -89,6 +91,7 @@ export type DBAntennaImportJobData = {
|
|||
export type DbUserImportToDbJobData = {
|
||||
user: ThinUser;
|
||||
target: string;
|
||||
withReplies?: boolean;
|
||||
};
|
||||
|
||||
export type ObjectStorageJobData = ObjectStorageFileJobData | Record<string, unknown>;
|
||||
|
|
|
@ -63,6 +63,8 @@ import * as ep___admin_showUser from './endpoints/admin/show-user.js';
|
|||
import * as ep___admin_showUsers from './endpoints/admin/show-users.js';
|
||||
import * as ep___admin_nsfwUser from './endpoints/admin/nsfw-user.js';
|
||||
import * as ep___admin_unnsfwUser from './endpoints/admin/unnsfw-user.js';
|
||||
import * as ep___admin_silenceUser from './endpoints/admin/silence-user.js';
|
||||
import * as ep___admin_unsilenceUser from './endpoints/admin/unsilence-user.js';
|
||||
import * as ep___admin_suspendUser from './endpoints/admin/suspend-user.js';
|
||||
import * as ep___admin_approveUser from './endpoints/admin/approve-user.js';
|
||||
import * as ep___admin_unsuspendUser from './endpoints/admin/unsuspend-user.js';
|
||||
|
@ -419,6 +421,8 @@ const $admin_showUser: Provider = { provide: 'ep:admin/show-user', useClass: ep_
|
|||
const $admin_showUsers: Provider = { provide: 'ep:admin/show-users', useClass: ep___admin_showUsers.default };
|
||||
const $admin_nsfwUser: Provider = { provide: 'ep:admin/nsfw-user', useClass: ep___admin_nsfwUser.default };
|
||||
const $admin_unnsfwUser: Provider = { provide: 'ep:admin/unnsfw-user', useClass: ep___admin_unnsfwUser.default };
|
||||
const $admin_silenceUser: Provider = { provide: 'ep:admin/silence-user', useClass: ep___admin_silenceUser.default };
|
||||
const $admin_unsilenceUser: Provider = { provide: 'ep:admin/unsilence-user', useClass: ep___admin_unsilenceUser.default };
|
||||
const $admin_suspendUser: Provider = { provide: 'ep:admin/suspend-user', useClass: ep___admin_suspendUser.default };
|
||||
const $admin_approveUser: Provider = { provide: 'ep:admin/approve-user', useClass: ep___admin_approveUser.default };
|
||||
const $admin_unsuspendUser: Provider = { provide: 'ep:admin/unsuspend-user', useClass: ep___admin_unsuspendUser.default };
|
||||
|
@ -779,6 +783,8 @@ const $sponsors: Provider = { provide: 'ep:sponsors', useClass: ep___sponsors.de
|
|||
$admin_showUsers,
|
||||
$admin_nsfwUser,
|
||||
$admin_unnsfwUser,
|
||||
$admin_silenceUser,
|
||||
$admin_unsilenceUser,
|
||||
$admin_suspendUser,
|
||||
$admin_approveUser,
|
||||
$admin_unsuspendUser,
|
||||
|
@ -1133,6 +1139,8 @@ const $sponsors: Provider = { provide: 'ep:sponsors', useClass: ep___sponsors.de
|
|||
$admin_showUsers,
|
||||
$admin_nsfwUser,
|
||||
$admin_unnsfwUser,
|
||||
$admin_silenceUser,
|
||||
$admin_unsilenceUser,
|
||||
$admin_suspendUser,
|
||||
$admin_approveUser,
|
||||
$admin_unsuspendUser,
|
||||
|
|
|
@ -63,6 +63,8 @@ import * as ep___admin_showUser from './endpoints/admin/show-user.js';
|
|||
import * as ep___admin_showUsers from './endpoints/admin/show-users.js';
|
||||
import * as ep___admin_nsfwUser from './endpoints/admin/nsfw-user.js';
|
||||
import * as ep___admin_unnsfwUser from './endpoints/admin/unnsfw-user.js';
|
||||
import * as ep___admin_silenceUser from './endpoints/admin/silence-user.js';
|
||||
import * as ep___admin_unsilenceUser from './endpoints/admin/unsilence-user.js';
|
||||
import * as ep___admin_suspendUser from './endpoints/admin/suspend-user.js';
|
||||
import * as ep___admin_approveUser from './endpoints/admin/approve-user.js';
|
||||
import * as ep___admin_unsuspendUser from './endpoints/admin/unsuspend-user.js';
|
||||
|
@ -417,6 +419,8 @@ const eps = [
|
|||
['admin/show-users', ep___admin_showUsers],
|
||||
['admin/nsfw-user', ep___admin_nsfwUser],
|
||||
['admin/unnsfw-user', ep___admin_unnsfwUser],
|
||||
['admin/silence-user', ep___admin_silenceUser],
|
||||
['admin/unsilence-user', ep___admin_unsilenceUser],
|
||||
['admin/suspend-user', ep___admin_suspendUser],
|
||||
['admin/approve-user', ep___admin_approveUser],
|
||||
['admin/unsuspend-user', ep___admin_unsuspendUser],
|
||||
|
|
|
@ -41,7 +41,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
|
||||
return ips.map(x => ({
|
||||
ip: x.ip,
|
||||
createdAt: this.idService.parse(x.id).date.toISOString(),
|
||||
createdAt: x.createdAt.toISOString(),
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
|
|
@ -182,6 +182,10 @@ export const meta = {
|
|||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
enableBotTrending: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
proxyAccountId: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
|
@ -396,6 +400,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
sensitiveMediaDetectionSensitivity: instance.sensitiveMediaDetectionSensitivity,
|
||||
setSensitiveFlagAutomatically: instance.setSensitiveFlagAutomatically,
|
||||
enableSensitiveMediaDetectionForVideos: instance.enableSensitiveMediaDetectionForVideos,
|
||||
enableBotTrending: instance.enableBotTrending,
|
||||
proxyAccountId: instance.proxyAccountId,
|
||||
summalyProxy: instance.summalyProxy,
|
||||
email: instance.email,
|
||||
|
|
|
@ -58,7 +58,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
}
|
||||
|
||||
const isModerator = await this.roleService.isModerator(user);
|
||||
const isSilenced = !(await this.roleService.getUserPolicies(user.id)).canPublicNote;
|
||||
const isSilenced = user.isSilenced || !(await this.roleService.getUserPolicies(user.id)).canPublicNote;
|
||||
|
||||
const _me = await this.usersRepository.findOneByOrFail({ id: me.id });
|
||||
if (!await this.roleService.isAdministrator(_me) && await this.roleService.isAdministrator(user)) {
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { UsersRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { RoleService } from '@/core/RoleService.js';
|
||||
|
||||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
constructor(
|
||||
@Inject(DI.usersRepository)
|
||||
private usersRepository: UsersRepository,
|
||||
|
||||
private roleService: RoleService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const user = await this.usersRepository.findOneBy({ id: ps.userId });
|
||||
|
||||
if (user == null) {
|
||||
throw new Error('user not found');
|
||||
}
|
||||
|
||||
if (await this.roleService.isModerator(user)) {
|
||||
throw new Error('cannot silence moderator account');
|
||||
}
|
||||
|
||||
await this.usersRepository.update(user.id, {
|
||||
isSilenced: true,
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { UsersRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
|
||||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true,
|
||||
requireModerator: true,
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
userId: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
constructor(
|
||||
@Inject(DI.usersRepository)
|
||||
private usersRepository: UsersRepository,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const user = await this.usersRepository.findOneBy({ id: ps.userId });
|
||||
|
||||
if (user == null) {
|
||||
throw new Error('user not found');
|
||||
}
|
||||
|
||||
await this.usersRepository.update(user.id, {
|
||||
isSilenced: false,
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
|
@ -73,6 +73,7 @@ export const paramDef = {
|
|||
sensitiveMediaDetectionSensitivity: { type: 'string', enum: ['medium', 'low', 'high', 'veryLow', 'veryHigh'] },
|
||||
setSensitiveFlagAutomatically: { type: 'boolean' },
|
||||
enableSensitiveMediaDetectionForVideos: { type: 'boolean' },
|
||||
enableBotTrending: { type: 'boolean' },
|
||||
proxyAccountId: { type: 'string', format: 'misskey:id', nullable: true },
|
||||
maintainerName: { type: 'string', nullable: true },
|
||||
maintainerEmail: { type: 'string', nullable: true },
|
||||
|
@ -306,6 +307,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
set.enableSensitiveMediaDetectionForVideos = ps.enableSensitiveMediaDetectionForVideos;
|
||||
}
|
||||
|
||||
if (ps.enableBotTrending !== undefined) {
|
||||
set.enableBotTrending = ps.enableBotTrending;
|
||||
}
|
||||
|
||||
if (ps.proxyAccountId !== undefined) {
|
||||
set.proxyAccountId = ps.proxyAccountId;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import { NoteReadService } from '@/core/NoteReadService.js';
|
|||
import { DI } from '@/di-symbols.js';
|
||||
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import { RedisTimelineService } from '@/core/RedisTimelineService.js';
|
||||
import { FunoutTimelineService } from '@/core/FunoutTimelineService.js';
|
||||
import { ApiError } from '../../error.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -70,7 +70,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
private noteEntityService: NoteEntityService,
|
||||
private queryService: QueryService,
|
||||
private noteReadService: NoteReadService,
|
||||
private redisTimelineService: RedisTimelineService,
|
||||
private funoutTimelineService: FunoutTimelineService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null);
|
||||
|
@ -90,7 +90,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
lastUsedAt: new Date(),
|
||||
});
|
||||
|
||||
let noteIds = await this.redisTimelineService.get(`antennaTimeline:${antenna.id}`, untilId, sinceId);
|
||||
let noteIds = await this.funoutTimelineService.get(`antennaTimeline:${antenna.id}`, untilId, sinceId);
|
||||
noteIds = noteIds.slice(0, ps.limit);
|
||||
if (noteIds.length === 0) {
|
||||
return [];
|
||||
|
|
|
@ -12,7 +12,7 @@ import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
|
|||
import ActiveUsersChart from '@/core/chart/charts/active-users.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import { RedisTimelineService } from '@/core/RedisTimelineService.js';
|
||||
import { FunoutTimelineService } from '@/core/FunoutTimelineService.js';
|
||||
import { isUserRelated } from '@/misc/is-user-related.js';
|
||||
import { CacheService } from '@/core/CacheService.js';
|
||||
import { ApiError } from '../../error.js';
|
||||
|
@ -69,7 +69,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
private idService: IdService,
|
||||
private noteEntityService: NoteEntityService,
|
||||
private queryService: QueryService,
|
||||
private redisTimelineService: RedisTimelineService,
|
||||
private funoutTimelineService: FunoutTimelineService,
|
||||
private cacheService: CacheService,
|
||||
private activeUsersChart: ActiveUsersChart,
|
||||
) {
|
||||
|
@ -95,7 +95,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
this.cacheService.userMutingsCache.fetch(me.id),
|
||||
]) : [new Set<string>()];
|
||||
|
||||
let noteIds = await this.redisTimelineService.get(`channelTimeline:${channel.id}`, untilId, sinceId);
|
||||
let noteIds = await this.funoutTimelineService.get(`channelTimeline:${channel.id}`, untilId, sinceId);
|
||||
noteIds = noteIds.slice(0, ps.limit);
|
||||
|
||||
if (noteIds.length > 0) {
|
||||
|
|
|
@ -71,6 +71,7 @@ export const paramDef = {
|
|||
type: 'object',
|
||||
properties: {
|
||||
userId: { type: 'string', format: 'misskey:id' },
|
||||
withReplies: { type: 'boolean' }
|
||||
},
|
||||
required: ['userId'],
|
||||
} as const;
|
||||
|
@ -112,7 +113,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
}
|
||||
|
||||
try {
|
||||
await this.userFollowingService.follow(follower, followee);
|
||||
await this.userFollowingService.follow(follower, followee, { withReplies: ps.withReplies });
|
||||
} catch (e) {
|
||||
if (e instanceof IdentifiableError) {
|
||||
if (e.id === '710e8fb0-b8c3-4922-be49-d5d93d8e6a6e') throw new ApiError(meta.errors.blocking);
|
||||
|
|
|
@ -52,6 +52,7 @@ export const paramDef = {
|
|||
type: 'object',
|
||||
properties: {
|
||||
fileId: { type: 'string', format: 'misskey:id' },
|
||||
withReplies: { type: 'boolean' },
|
||||
},
|
||||
required: ['fileId'],
|
||||
} as const;
|
||||
|
@ -79,7 +80,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
);
|
||||
if (checkMoving ? file.size > 32 * 1024 * 1024 : file.size > 64 * 1024) throw new ApiError(meta.errors.tooBigFile);
|
||||
|
||||
this.queueService.createImportFollowingJob(me, file.id);
|
||||
this.queueService.createImportFollowingJob(me, file.id, ps.withReplies);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import ActiveUsersChart from '@/core/chart/charts/active-users.js';
|
|||
import { DI } from '@/di-symbols.js';
|
||||
import { RoleService } from '@/core/RoleService.js';
|
||||
import { ApiError } from '../../error.js';
|
||||
import { CacheService } from '@/core/CacheService.js';
|
||||
|
||||
export const meta = {
|
||||
tags: ['notes'],
|
||||
|
@ -40,6 +41,7 @@ export const paramDef = {
|
|||
type: 'object',
|
||||
properties: {
|
||||
withFiles: { type: 'boolean', default: false },
|
||||
withBots: { type: 'boolean', default: true },
|
||||
withRenotes: { type: 'boolean', default: true },
|
||||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
||||
sinceId: { type: 'string', format: 'misskey:id' },
|
||||
|
@ -60,6 +62,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
private queryService: QueryService,
|
||||
private roleService: RoleService,
|
||||
private activeUsersChart: ActiveUsersChart,
|
||||
private cacheService: CacheService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const policies = await this.roleService.getUserPolicies(me ? me.id : null);
|
||||
|
@ -67,6 +70,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
throw new ApiError(meta.errors.gtlDisabled);
|
||||
}
|
||||
|
||||
const [
|
||||
followings,
|
||||
] = me ? await Promise.all([
|
||||
this.cacheService.userFollowingsCache.fetch(me.id),
|
||||
]) : [undefined];
|
||||
|
||||
//#region Construct query
|
||||
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'),
|
||||
ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
|
||||
|
@ -87,9 +96,16 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
if (ps.withFiles) {
|
||||
query.andWhere('note.fileIds != \'{}\'');
|
||||
}
|
||||
|
||||
if (!ps.withBots) query.andWhere('user.isBot = FALSE');
|
||||
//#endregion
|
||||
|
||||
const timeline = await query.limit(ps.limit).getMany();
|
||||
let timeline = await query.limit(ps.limit).getMany();
|
||||
|
||||
timeline = timeline.filter(note => {
|
||||
if (note.user?.isSilenced && me && followings && note.userId !== me.id && !followings[note.userId]) return false;
|
||||
return true;
|
||||
});
|
||||
|
||||
process.nextTick(() => {
|
||||
if (me) {
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
import { Brackets } from 'typeorm';
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import * as Redis from 'ioredis';
|
||||
import type { NotesRepository, FollowingsRepository, MiNote } from '@/models/_.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import ActiveUsersChart from '@/core/chart/charts/active-users.js';
|
||||
|
@ -15,7 +14,9 @@ import { RoleService } from '@/core/RoleService.js';
|
|||
import { IdService } from '@/core/IdService.js';
|
||||
import { isUserRelated } from '@/misc/is-user-related.js';
|
||||
import { CacheService } from '@/core/CacheService.js';
|
||||
import { RedisTimelineService } from '@/core/RedisTimelineService.js';
|
||||
import { FunoutTimelineService } from '@/core/FunoutTimelineService.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { UserFollowingService } from '@/core/UserFollowingService.js';
|
||||
import { ApiError } from '../../error.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -56,6 +57,7 @@ export const paramDef = {
|
|||
withFiles: { type: 'boolean', default: false },
|
||||
withRenotes: { type: 'boolean', default: true },
|
||||
withReplies: { type: 'boolean', default: false },
|
||||
withBots: { type: 'boolean', default: true },
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
|
@ -63,9 +65,6 @@ export const paramDef = {
|
|||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
constructor(
|
||||
@Inject(DI.redisForTimelines)
|
||||
private redisForTimelines: Redis.Redis,
|
||||
|
||||
@Inject(DI.notesRepository)
|
||||
private notesRepository: NotesRepository,
|
||||
|
||||
|
@ -74,7 +73,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
private activeUsersChart: ActiveUsersChart,
|
||||
private idService: IdService,
|
||||
private cacheService: CacheService,
|
||||
private redisTimelineService: RedisTimelineService,
|
||||
private funoutTimelineService: FunoutTimelineService,
|
||||
private queryService: QueryService,
|
||||
private userFollowingService: UserFollowingService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null);
|
||||
|
@ -86,81 +87,170 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
}
|
||||
|
||||
const [
|
||||
followings,
|
||||
userIdsWhoMeMuting,
|
||||
userIdsWhoMeMutingRenotes,
|
||||
userIdsWhoBlockingMe,
|
||||
] = await Promise.all([
|
||||
this.cacheService.userFollowingsCache.fetch(me.id),
|
||||
this.cacheService.userMutingsCache.fetch(me.id),
|
||||
this.cacheService.renoteMutingsCache.fetch(me.id),
|
||||
this.cacheService.userBlockedCache.fetch(me.id),
|
||||
]);
|
||||
|
||||
let noteIds: string[];
|
||||
let shouldFallbackToDb = false;
|
||||
|
||||
if (ps.withFiles) {
|
||||
const [htlNoteIds, ltlNoteIds] = await this.redisTimelineService.getMulti([
|
||||
const [htlNoteIds, ltlNoteIds] = await this.funoutTimelineService.getMulti([
|
||||
`homeTimelineWithFiles:${me.id}`,
|
||||
'localTimelineWithFiles',
|
||||
], untilId, sinceId);
|
||||
noteIds = Array.from(new Set([...htlNoteIds, ...ltlNoteIds]));
|
||||
} else if (ps.withReplies) {
|
||||
const [htlNoteIds, ltlNoteIds, ltlReplyNoteIds] = await this.redisTimelineService.getMulti([
|
||||
const [htlNoteIds, ltlNoteIds, ltlReplyNoteIds] = await this.funoutTimelineService.getMulti([
|
||||
`homeTimeline:${me.id}`,
|
||||
'localTimeline',
|
||||
'localTimelineWithReplies',
|
||||
], untilId, sinceId);
|
||||
noteIds = Array.from(new Set([...htlNoteIds, ...ltlNoteIds, ...ltlReplyNoteIds]));
|
||||
} else {
|
||||
const [htlNoteIds, ltlNoteIds] = await this.redisTimelineService.getMulti([
|
||||
const [htlNoteIds, ltlNoteIds] = await this.funoutTimelineService.getMulti([
|
||||
`homeTimeline:${me.id}`,
|
||||
'localTimeline',
|
||||
], untilId, sinceId);
|
||||
noteIds = Array.from(new Set([...htlNoteIds, ...ltlNoteIds]));
|
||||
shouldFallbackToDb = htlNoteIds.length === 0;
|
||||
}
|
||||
|
||||
noteIds.sort((a, b) => a > b ? -1 : 1);
|
||||
noteIds = noteIds.slice(0, ps.limit);
|
||||
|
||||
if (noteIds.length === 0) {
|
||||
return [];
|
||||
}
|
||||
if (!shouldFallbackToDb) {
|
||||
const query = this.notesRepository.createQueryBuilder('note')
|
||||
.where('note.id IN (:...noteIds)', { noteIds: noteIds })
|
||||
.innerJoinAndSelect('note.user', 'user')
|
||||
.leftJoinAndSelect('note.reply', 'reply')
|
||||
.leftJoinAndSelect('note.renote', 'renote')
|
||||
.leftJoinAndSelect('reply.user', 'replyUser')
|
||||
.leftJoinAndSelect('renote.user', 'renoteUser')
|
||||
.leftJoinAndSelect('note.channel', 'channel');
|
||||
|
||||
const query = this.notesRepository.createQueryBuilder('note')
|
||||
.where('note.id IN (:...noteIds)', { noteIds: noteIds })
|
||||
.innerJoinAndSelect('note.user', 'user')
|
||||
.leftJoinAndSelect('note.reply', 'reply')
|
||||
.leftJoinAndSelect('note.renote', 'renote')
|
||||
.leftJoinAndSelect('reply.user', 'replyUser')
|
||||
.leftJoinAndSelect('renote.user', 'renoteUser')
|
||||
.leftJoinAndSelect('note.channel', 'channel');
|
||||
if (!ps.withBots) query.andWhere('user.isBot = FALSE');
|
||||
|
||||
let timeline = await query.getMany();
|
||||
let timeline = await query.getMany();
|
||||
|
||||
timeline = timeline.filter(note => {
|
||||
if (note.userId === me.id) {
|
||||
return true;
|
||||
}
|
||||
if (isUserRelated(note, userIdsWhoBlockingMe)) return false;
|
||||
if (isUserRelated(note, userIdsWhoMeMuting)) return false;
|
||||
if (note.renoteId) {
|
||||
if (note.text == null && note.fileIds.length === 0 && !note.hasPoll) {
|
||||
if (isUserRelated(note, userIdsWhoMeMutingRenotes)) return false;
|
||||
if (ps.withRenotes === false) return false;
|
||||
timeline = timeline.filter(note => {
|
||||
if (note.userId === me.id) {
|
||||
return true;
|
||||
}
|
||||
if (isUserRelated(note, userIdsWhoBlockingMe)) return false;
|
||||
if (isUserRelated(note, userIdsWhoMeMuting)) return false;
|
||||
if (note.renoteId) {
|
||||
if (note.text == null && note.fileIds.length === 0 && !note.hasPoll) {
|
||||
if (isUserRelated(note, userIdsWhoMeMutingRenotes)) return false;
|
||||
if (ps.withRenotes === false) return false;
|
||||
}
|
||||
}
|
||||
if (note.user?.isSilenced && note.userId !== me.id && !followings[note.userId]) return false;
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
// TODO: フィルタした結果件数が足りなかった場合の対応
|
||||
|
||||
timeline.sort((a, b) => a.id > b.id ? -1 : 1);
|
||||
|
||||
process.nextTick(() => {
|
||||
this.activeUsersChart.read(me);
|
||||
});
|
||||
|
||||
return await this.noteEntityService.packMany(timeline, me);
|
||||
} else { // fallback to db
|
||||
const followees = await this.userFollowingService.getFollowees(me.id);
|
||||
|
||||
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
|
||||
.andWhere(new Brackets(qb => {
|
||||
if (followees.length > 0) {
|
||||
const meOrFolloweeIds = [me.id, ...followees.map(f => f.followeeId)];
|
||||
qb.where('note.userId IN (:...meOrFolloweeIds)', { meOrFolloweeIds: meOrFolloweeIds });
|
||||
qb.orWhere('(note.visibility = \'public\') AND (note.userHost IS NULL)');
|
||||
} else {
|
||||
qb.where('note.userId = :meId', { meId: me.id });
|
||||
qb.orWhere('(note.visibility = \'public\') AND (note.userHost IS NULL)');
|
||||
}
|
||||
}))
|
||||
.innerJoinAndSelect('note.user', 'user')
|
||||
.leftJoinAndSelect('note.reply', 'reply')
|
||||
.leftJoinAndSelect('note.renote', 'renote')
|
||||
.leftJoinAndSelect('reply.user', 'replyUser')
|
||||
.leftJoinAndSelect('renote.user', 'renoteUser');
|
||||
|
||||
if (!ps.withBots) query.andWhere('user.isBot = FALSE');
|
||||
|
||||
query.andWhere(new Brackets(qb => {
|
||||
qb
|
||||
.where('note.replyId IS NULL') // 返信ではない
|
||||
.orWhere(new Brackets(qb => {
|
||||
qb // 返信だけど投稿者自身への返信
|
||||
.where('note.replyId IS NOT NULL')
|
||||
.andWhere('note.replyUserId = note.userId');
|
||||
}));
|
||||
}));
|
||||
|
||||
this.queryService.generateVisibilityQuery(query, me);
|
||||
this.queryService.generateMutedUserQuery(query, me);
|
||||
this.queryService.generateBlockedUserQuery(query, me);
|
||||
this.queryService.generateMutedUserRenotesQueryForNotes(query, me);
|
||||
|
||||
if (ps.includeMyRenotes === false) {
|
||||
query.andWhere(new Brackets(qb => {
|
||||
qb.orWhere('note.userId != :meId', { meId: me.id });
|
||||
qb.orWhere('note.renoteId IS NULL');
|
||||
qb.orWhere('note.text IS NOT NULL');
|
||||
qb.orWhere('note.fileIds != \'{}\'');
|
||||
qb.orWhere('0 < (SELECT COUNT(*) FROM poll WHERE poll."noteId" = note.id)');
|
||||
}));
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
if (ps.includeRenotedMyNotes === false) {
|
||||
query.andWhere(new Brackets(qb => {
|
||||
qb.orWhere('note.renoteUserId != :meId', { meId: me.id });
|
||||
qb.orWhere('note.renoteId IS NULL');
|
||||
qb.orWhere('note.text IS NOT NULL');
|
||||
qb.orWhere('note.fileIds != \'{}\'');
|
||||
qb.orWhere('0 < (SELECT COUNT(*) FROM poll WHERE poll."noteId" = note.id)');
|
||||
}));
|
||||
}
|
||||
|
||||
// TODO: フィルタした結果件数が足りなかった場合の対応
|
||||
if (ps.includeLocalRenotes === false) {
|
||||
query.andWhere(new Brackets(qb => {
|
||||
qb.orWhere('note.renoteUserHost IS NOT NULL');
|
||||
qb.orWhere('note.renoteId IS NULL');
|
||||
qb.orWhere('note.text IS NOT NULL');
|
||||
qb.orWhere('note.fileIds != \'{}\'');
|
||||
qb.orWhere('0 < (SELECT COUNT(*) FROM poll WHERE poll."noteId" = note.id)');
|
||||
}));
|
||||
}
|
||||
|
||||
timeline.sort((a, b) => a.id > b.id ? -1 : 1);
|
||||
if (ps.withFiles) {
|
||||
query.andWhere('note.fileIds != \'{}\'');
|
||||
}
|
||||
//#endregion
|
||||
|
||||
process.nextTick(() => {
|
||||
this.activeUsersChart.read(me);
|
||||
});
|
||||
let timeline = await query.limit(ps.limit).getMany();
|
||||
|
||||
return await this.noteEntityService.packMany(timeline, me);
|
||||
timeline = timeline.filter(note => {
|
||||
if (note.user?.isSilenced && note.userId !== me.id && !followings[note.userId]) return false;
|
||||
return true;
|
||||
});
|
||||
|
||||
process.nextTick(() => {
|
||||
this.activeUsersChart.read(me);
|
||||
});
|
||||
|
||||
return await this.noteEntityService.packMany(timeline, me);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
import { Brackets } from 'typeorm';
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import * as Redis from 'ioredis';
|
||||
import type { MiNote, NotesRepository } from '@/models/_.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
|
||||
|
@ -15,7 +14,8 @@ import { RoleService } from '@/core/RoleService.js';
|
|||
import { IdService } from '@/core/IdService.js';
|
||||
import { CacheService } from '@/core/CacheService.js';
|
||||
import { isUserRelated } from '@/misc/is-user-related.js';
|
||||
import { RedisTimelineService } from '@/core/RedisTimelineService.js';
|
||||
import { FunoutTimelineService } from '@/core/FunoutTimelineService.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { ApiError } from '../../error.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -46,6 +46,7 @@ export const paramDef = {
|
|||
withFiles: { type: 'boolean', default: false },
|
||||
withRenotes: { type: 'boolean', default: true },
|
||||
withReplies: { type: 'boolean', default: false },
|
||||
withBots: { type: 'boolean', default: true },
|
||||
excludeNsfw: { type: 'boolean', default: false },
|
||||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
||||
sinceId: { type: 'string', format: 'misskey:id' },
|
||||
|
@ -59,9 +60,6 @@ export const paramDef = {
|
|||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
constructor(
|
||||
@Inject(DI.redisForTimelines)
|
||||
private redisForTimelines: Redis.Redis,
|
||||
|
||||
@Inject(DI.notesRepository)
|
||||
private notesRepository: NotesRepository,
|
||||
|
||||
|
@ -70,7 +68,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
private activeUsersChart: ActiveUsersChart,
|
||||
private idService: IdService,
|
||||
private cacheService: CacheService,
|
||||
private redisTimelineService: RedisTimelineService,
|
||||
private funoutTimelineService: FunoutTimelineService,
|
||||
private queryService: QueryService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null);
|
||||
|
@ -82,21 +81,23 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
}
|
||||
|
||||
const [
|
||||
followings,
|
||||
userIdsWhoMeMuting,
|
||||
userIdsWhoMeMutingRenotes,
|
||||
userIdsWhoBlockingMe,
|
||||
] = me ? await Promise.all([
|
||||
this.cacheService.userFollowingsCache.fetch(me.id),
|
||||
this.cacheService.userMutingsCache.fetch(me.id),
|
||||
this.cacheService.renoteMutingsCache.fetch(me.id),
|
||||
this.cacheService.userBlockedCache.fetch(me.id),
|
||||
]) : [new Set<string>(), new Set<string>(), new Set<string>()];
|
||||
]) : [undefined, new Set<string>(), new Set<string>(), new Set<string>()];
|
||||
|
||||
let noteIds: string[];
|
||||
|
||||
if (ps.withFiles) {
|
||||
noteIds = await this.redisTimelineService.get('localTimelineWithFiles', untilId, sinceId);
|
||||
noteIds = await this.funoutTimelineService.get('localTimelineWithFiles', untilId, sinceId);
|
||||
} else {
|
||||
const [nonReplyNoteIds, replyNoteIds] = await this.redisTimelineService.getMulti([
|
||||
const [nonReplyNoteIds, replyNoteIds] = await this.funoutTimelineService.getMulti([
|
||||
'localTimeline',
|
||||
'localTimelineWithReplies',
|
||||
], untilId, sinceId);
|
||||
|
@ -106,49 +107,85 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
|
||||
noteIds = noteIds.slice(0, ps.limit);
|
||||
|
||||
if (noteIds.length === 0) {
|
||||
return [];
|
||||
}
|
||||
if (noteIds.length > 0) {
|
||||
const query = this.notesRepository.createQueryBuilder('note')
|
||||
.where('note.id IN (:...noteIds)', { noteIds: noteIds })
|
||||
.innerJoinAndSelect('note.user', 'user')
|
||||
.leftJoinAndSelect('note.reply', 'reply')
|
||||
.leftJoinAndSelect('note.renote', 'renote')
|
||||
.leftJoinAndSelect('reply.user', 'replyUser')
|
||||
.leftJoinAndSelect('renote.user', 'renoteUser')
|
||||
.leftJoinAndSelect('note.channel', 'channel');
|
||||
|
||||
const query = this.notesRepository.createQueryBuilder('note')
|
||||
.where('note.id IN (:...noteIds)', { noteIds: noteIds })
|
||||
.innerJoinAndSelect('note.user', 'user')
|
||||
.leftJoinAndSelect('note.reply', 'reply')
|
||||
.leftJoinAndSelect('note.renote', 'renote')
|
||||
.leftJoinAndSelect('reply.user', 'replyUser')
|
||||
.leftJoinAndSelect('renote.user', 'renoteUser')
|
||||
.leftJoinAndSelect('note.channel', 'channel');
|
||||
if (!ps.withBots) query.andWhere('user.isBot = FALSE');
|
||||
|
||||
let timeline = await query.getMany();
|
||||
let timeline = await query.getMany();
|
||||
|
||||
timeline = timeline.filter(note => {
|
||||
if (me && (note.userId === me.id)) {
|
||||
return true;
|
||||
}
|
||||
if (!ps.withReplies && note.replyId && (me == null || note.replyUserId !== me.id)) return false;
|
||||
if (me && isUserRelated(note, userIdsWhoBlockingMe)) return false;
|
||||
if (me && isUserRelated(note, userIdsWhoMeMuting)) return false;
|
||||
if (note.renoteId) {
|
||||
if (note.text == null && note.fileIds.length === 0 && !note.hasPoll) {
|
||||
if (me && isUserRelated(note, userIdsWhoMeMutingRenotes)) return false;
|
||||
if (ps.withRenotes === false) return false;
|
||||
timeline = timeline.filter(note => {
|
||||
if (me && (note.userId === me.id)) {
|
||||
return true;
|
||||
}
|
||||
if (!ps.withReplies && note.replyId && (me == null || note.replyUserId !== me.id)) return false;
|
||||
if (me && isUserRelated(note, userIdsWhoBlockingMe)) return false;
|
||||
if (me && isUserRelated(note, userIdsWhoMeMuting)) return false;
|
||||
if (note.renoteId) {
|
||||
if (note.text == null && note.fileIds.length === 0 && !note.hasPoll) {
|
||||
if (me && isUserRelated(note, userIdsWhoMeMutingRenotes)) return false;
|
||||
if (ps.withRenotes === false) return false;
|
||||
}
|
||||
}
|
||||
if (note.user?.isSilenced && me && followings && note.userId !== me.id && !followings[note.userId]) return false;
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
// TODO: フィルタした結果件数が足りなかった場合の対応
|
||||
|
||||
timeline.sort((a, b) => a.id > b.id ? -1 : 1);
|
||||
|
||||
process.nextTick(() => {
|
||||
if (me) {
|
||||
this.activeUsersChart.read(me);
|
||||
}
|
||||
});
|
||||
|
||||
return await this.noteEntityService.packMany(timeline, me);
|
||||
} else { // fallback to db
|
||||
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'),
|
||||
ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
|
||||
.andWhere('(note.visibility = \'public\') AND (note.userHost IS NULL)')
|
||||
.innerJoinAndSelect('note.user', 'user')
|
||||
.leftJoinAndSelect('note.reply', 'reply')
|
||||
.leftJoinAndSelect('note.renote', 'renote')
|
||||
.leftJoinAndSelect('reply.user', 'replyUser')
|
||||
.leftJoinAndSelect('renote.user', 'renoteUser');
|
||||
|
||||
if (!ps.withBots) query.andWhere('user.isBot = FALSE');
|
||||
|
||||
this.queryService.generateVisibilityQuery(query, me);
|
||||
if (me) this.queryService.generateMutedUserQuery(query, me);
|
||||
if (me) this.queryService.generateBlockedUserQuery(query, me);
|
||||
if (me) this.queryService.generateMutedUserRenotesQueryForNotes(query, me);
|
||||
|
||||
if (ps.withFiles) {
|
||||
query.andWhere('note.fileIds != \'{}\'');
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
let timeline = await query.limit(ps.limit).getMany();
|
||||
|
||||
// TODO: フィルタした結果件数が足りなかった場合の対応
|
||||
timeline = timeline.filter(note => {
|
||||
if (note.user?.isSilenced && me && followings && note.userId !== me.id && !followings[note.userId]) return false;
|
||||
return true;
|
||||
});
|
||||
|
||||
timeline.sort((a, b) => a.id > b.id ? -1 : 1);
|
||||
process.nextTick(() => {
|
||||
if (me) {
|
||||
this.activeUsersChart.read(me);
|
||||
}
|
||||
});
|
||||
|
||||
process.nextTick(() => {
|
||||
if (me) {
|
||||
this.activeUsersChart.read(me);
|
||||
}
|
||||
});
|
||||
|
||||
return await this.noteEntityService.packMany(timeline, me);
|
||||
return await this.noteEntityService.packMany(timeline, me);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import { Endpoint } from '@/server/api/endpoint-base.js';
|
|||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { MetaService } from '@/core/MetaService.js';
|
||||
|
||||
export const meta = {
|
||||
tags: ['notes', 'hashtags'],
|
||||
|
@ -71,6 +72,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
|
||||
private noteEntityService: NoteEntityService,
|
||||
private queryService: QueryService,
|
||||
private metaService: MetaService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId)
|
||||
|
@ -80,6 +82,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
.leftJoinAndSelect('reply.user', 'replyUser')
|
||||
.leftJoinAndSelect('renote.user', 'renoteUser');
|
||||
|
||||
const meta = await this.metaService.fetch(true);
|
||||
|
||||
if (!meta.enableBotTrending) query.andWhere('user.isBot = FALSE');
|
||||
|
||||
this.queryService.generateVisibilityQuery(query, me);
|
||||
if (me) this.queryService.generateMutedUserQuery(query, me);
|
||||
if (me) this.queryService.generateBlockedUserQuery(query, me);
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
|
||||
import { Brackets } from 'typeorm';
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import * as Redis from 'ioredis';
|
||||
import type { NotesRepository, FollowingsRepository, MiNote } from '@/models/_.js';
|
||||
import type { NotesRepository } from '@/models/_.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import ActiveUsersChart from '@/core/chart/charts/active-users.js';
|
||||
|
@ -15,7 +14,8 @@ import { DI } from '@/di-symbols.js';
|
|||
import { IdService } from '@/core/IdService.js';
|
||||
import { CacheService } from '@/core/CacheService.js';
|
||||
import { isUserRelated } from '@/misc/is-user-related.js';
|
||||
import { RedisTimelineService } from '@/core/RedisTimelineService.js';
|
||||
import { FunoutTimelineService } from '@/core/FunoutTimelineService.js';
|
||||
import { UserFollowingService } from '@/core/UserFollowingService.js';
|
||||
|
||||
export const meta = {
|
||||
tags: ['notes'],
|
||||
|
@ -46,6 +46,7 @@ export const paramDef = {
|
|||
includeLocalRenotes: { type: 'boolean', default: true },
|
||||
withFiles: { type: 'boolean', default: false },
|
||||
withRenotes: { type: 'boolean', default: true },
|
||||
withBots: { type: 'boolean', default: true },
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
|
@ -53,9 +54,6 @@ export const paramDef = {
|
|||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
constructor(
|
||||
@Inject(DI.redisForTimelines)
|
||||
private redisForTimelines: Redis.Redis,
|
||||
|
||||
@Inject(DI.notesRepository)
|
||||
private notesRepository: NotesRepository,
|
||||
|
||||
|
@ -63,7 +61,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
private activeUsersChart: ActiveUsersChart,
|
||||
private idService: IdService,
|
||||
private cacheService: CacheService,
|
||||
private redisTimelineService: RedisTimelineService,
|
||||
private funoutTimelineService: FunoutTimelineService,
|
||||
private userFollowingService: UserFollowingService,
|
||||
private queryService: QueryService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null);
|
||||
|
@ -81,52 +81,137 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
this.cacheService.userBlockedCache.fetch(me.id),
|
||||
]);
|
||||
|
||||
let noteIds = await this.redisTimelineService.get(ps.withFiles ? `homeTimelineWithFiles:${me.id}` : `homeTimeline:${me.id}`, untilId, sinceId);
|
||||
let noteIds = await this.funoutTimelineService.get(ps.withFiles ? `homeTimelineWithFiles:${me.id}` : `homeTimeline:${me.id}`, untilId, sinceId);
|
||||
noteIds = noteIds.slice(0, ps.limit);
|
||||
|
||||
if (noteIds.length === 0) {
|
||||
return [];
|
||||
}
|
||||
if (noteIds.length > 0) {
|
||||
const query = this.notesRepository.createQueryBuilder('note')
|
||||
.where('note.id IN (:...noteIds)', { noteIds: noteIds })
|
||||
.innerJoinAndSelect('note.user', 'user')
|
||||
.leftJoinAndSelect('note.reply', 'reply')
|
||||
.leftJoinAndSelect('note.renote', 'renote')
|
||||
.leftJoinAndSelect('reply.user', 'replyUser')
|
||||
.leftJoinAndSelect('renote.user', 'renoteUser')
|
||||
.leftJoinAndSelect('note.channel', 'channel');
|
||||
|
||||
const query = this.notesRepository.createQueryBuilder('note')
|
||||
.where('note.id IN (:...noteIds)', { noteIds: noteIds })
|
||||
.innerJoinAndSelect('note.user', 'user')
|
||||
.leftJoinAndSelect('note.reply', 'reply')
|
||||
.leftJoinAndSelect('note.renote', 'renote')
|
||||
.leftJoinAndSelect('reply.user', 'replyUser')
|
||||
.leftJoinAndSelect('renote.user', 'renoteUser')
|
||||
.leftJoinAndSelect('note.channel', 'channel');
|
||||
if (!ps.withBots) query.andWhere('user.isBot = FALSE');
|
||||
|
||||
let timeline = await query.getMany();
|
||||
let timeline = await query.getMany();
|
||||
|
||||
timeline = timeline.filter(note => {
|
||||
if (note.userId === me.id) {
|
||||
return true;
|
||||
}
|
||||
if (isUserRelated(note, userIdsWhoBlockingMe)) return false;
|
||||
if (isUserRelated(note, userIdsWhoMeMuting)) return false;
|
||||
if (note.renoteId) {
|
||||
if (note.text == null && note.fileIds.length === 0 && !note.hasPoll) {
|
||||
if (isUserRelated(note, userIdsWhoMeMutingRenotes)) return false;
|
||||
if (ps.withRenotes === false) return false;
|
||||
timeline = timeline.filter(note => {
|
||||
if (note.userId === me.id) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (note.reply && note.reply.visibility === 'followers') {
|
||||
if (!Object.hasOwn(followings, note.reply.userId)) return false;
|
||||
if (isUserRelated(note, userIdsWhoBlockingMe)) return false;
|
||||
if (isUserRelated(note, userIdsWhoMeMuting)) return false;
|
||||
if (note.renoteId) {
|
||||
if (note.text == null && note.fileIds.length === 0 && !note.hasPoll) {
|
||||
if (isUserRelated(note, userIdsWhoMeMutingRenotes)) return false;
|
||||
if (ps.withRenotes === false) return false;
|
||||
}
|
||||
}
|
||||
if (note.reply && note.reply.visibility === 'followers') {
|
||||
if (!Object.hasOwn(followings, note.reply.userId)) return false;
|
||||
}
|
||||
if (note.user?.isSilenced && note.userId !== me.id && !followings[note.userId]) return false;
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
// TODO: フィルタした結果件数が足りなかった場合の対応
|
||||
|
||||
timeline.sort((a, b) => a.id > b.id ? -1 : 1);
|
||||
|
||||
process.nextTick(() => {
|
||||
this.activeUsersChart.read(me);
|
||||
});
|
||||
|
||||
return await this.noteEntityService.packMany(timeline, me);
|
||||
} else { // fallback to db
|
||||
const followees = await this.userFollowingService.getFollowees(me.id);
|
||||
|
||||
//#region Construct query
|
||||
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
|
||||
.andWhere('note.channelId IS NULL')
|
||||
.innerJoinAndSelect('note.user', 'user')
|
||||
.leftJoinAndSelect('note.reply', 'reply')
|
||||
.leftJoinAndSelect('note.renote', 'renote')
|
||||
.leftJoinAndSelect('reply.user', 'replyUser')
|
||||
.leftJoinAndSelect('renote.user', 'renoteUser');
|
||||
|
||||
if (!ps.withBots) query.andWhere('user.isBot = FALSE');
|
||||
|
||||
if (followees.length > 0) {
|
||||
const meOrFolloweeIds = [me.id, ...followees.map(f => f.followeeId)];
|
||||
|
||||
query.andWhere('note.userId IN (:...meOrFolloweeIds)', { meOrFolloweeIds: meOrFolloweeIds });
|
||||
} else {
|
||||
query.andWhere('note.userId = :meId', { meId: me.id });
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
query.andWhere(new Brackets(qb => {
|
||||
qb
|
||||
.where('note.replyId IS NULL') // 返信ではない
|
||||
.orWhere(new Brackets(qb => {
|
||||
qb // 返信だけど投稿者自身への返信
|
||||
.where('note.replyId IS NOT NULL')
|
||||
.andWhere('note.replyUserId = note.userId');
|
||||
}));
|
||||
}));
|
||||
|
||||
// TODO: フィルタした結果件数が足りなかった場合の対応
|
||||
this.queryService.generateVisibilityQuery(query, me);
|
||||
this.queryService.generateMutedUserQuery(query, me);
|
||||
this.queryService.generateBlockedUserQuery(query, me);
|
||||
this.queryService.generateMutedUserRenotesQueryForNotes(query, me);
|
||||
|
||||
timeline.sort((a, b) => a.id > b.id ? -1 : 1);
|
||||
if (ps.includeMyRenotes === false) {
|
||||
query.andWhere(new Brackets(qb => {
|
||||
qb.orWhere('note.userId != :meId', { meId: me.id });
|
||||
qb.orWhere('note.renoteId IS NULL');
|
||||
qb.orWhere('note.text IS NOT NULL');
|
||||
qb.orWhere('note.fileIds != \'{}\'');
|
||||
qb.orWhere('0 < (SELECT COUNT(*) FROM poll WHERE poll."noteId" = note.id)');
|
||||
}));
|
||||
}
|
||||
|
||||
process.nextTick(() => {
|
||||
this.activeUsersChart.read(me);
|
||||
});
|
||||
if (ps.includeRenotedMyNotes === false) {
|
||||
query.andWhere(new Brackets(qb => {
|
||||
qb.orWhere('note.renoteUserId != :meId', { meId: me.id });
|
||||
qb.orWhere('note.renoteId IS NULL');
|
||||
qb.orWhere('note.text IS NOT NULL');
|
||||
qb.orWhere('note.fileIds != \'{}\'');
|
||||
qb.orWhere('0 < (SELECT COUNT(*) FROM poll WHERE poll."noteId" = note.id)');
|
||||
}));
|
||||
}
|
||||
|
||||
return await this.noteEntityService.packMany(timeline, me);
|
||||
if (ps.includeLocalRenotes === false) {
|
||||
query.andWhere(new Brackets(qb => {
|
||||
qb.orWhere('note.renoteUserHost IS NOT NULL');
|
||||
qb.orWhere('note.renoteId IS NULL');
|
||||
qb.orWhere('note.text IS NOT NULL');
|
||||
qb.orWhere('note.fileIds != \'{}\'');
|
||||
qb.orWhere('0 < (SELECT COUNT(*) FROM poll WHERE poll."noteId" = note.id)');
|
||||
}));
|
||||
}
|
||||
|
||||
if (ps.withFiles) {
|
||||
query.andWhere('note.fileIds != \'{}\'');
|
||||
}
|
||||
//#endregion
|
||||
|
||||
let timeline = await query.limit(ps.limit).getMany();
|
||||
|
||||
timeline = timeline.filter(note => {
|
||||
if (note.user?.isSilenced && note.userId !== me.id && !followings[note.userId]) return false;
|
||||
return true;
|
||||
});
|
||||
|
||||
process.nextTick(() => {
|
||||
this.activeUsersChart.read(me);
|
||||
});
|
||||
|
||||
return await this.noteEntityService.packMany(timeline, me);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ import { DI } from '@/di-symbols.js';
|
|||
import { CacheService } from '@/core/CacheService.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import { isUserRelated } from '@/misc/is-user-related.js';
|
||||
import { RedisTimelineService } from '@/core/RedisTimelineService.js';
|
||||
import { FunoutTimelineService } from '@/core/FunoutTimelineService.js';
|
||||
import { ApiError } from '../../error.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -80,7 +80,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
private activeUsersChart: ActiveUsersChart,
|
||||
private cacheService: CacheService,
|
||||
private idService: IdService,
|
||||
private redisTimelineService: RedisTimelineService,
|
||||
private funoutTimelineService: FunoutTimelineService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null);
|
||||
|
@ -105,7 +105,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
this.cacheService.userBlockedCache.fetch(me.id),
|
||||
]);
|
||||
|
||||
let noteIds = await this.redisTimelineService.get(ps.withFiles ? `userListTimelineWithFiles:${list.id}` : `userListTimeline:${list.id}`, untilId, sinceId);
|
||||
let noteIds = await this.funoutTimelineService.get(ps.withFiles ? `userListTimelineWithFiles:${list.id}` : `userListTimeline:${list.id}`, untilId, sinceId);
|
||||
noteIds = noteIds.slice(0, ps.limit);
|
||||
|
||||
if (noteIds.length === 0) {
|
||||
|
|
|
@ -11,7 +11,7 @@ import { QueryService } from '@/core/QueryService.js';
|
|||
import { DI } from '@/di-symbols.js';
|
||||
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import { RedisTimelineService } from '@/core/RedisTimelineService.js';
|
||||
import { FunoutTimelineService } from '@/core/FunoutTimelineService.js';
|
||||
import { ApiError } from '../../error.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -66,7 +66,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
private idService: IdService,
|
||||
private noteEntityService: NoteEntityService,
|
||||
private queryService: QueryService,
|
||||
private redisTimelineService: RedisTimelineService,
|
||||
private funoutTimelineService: FunoutTimelineService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null);
|
||||
|
@ -84,7 +84,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
return [];
|
||||
}
|
||||
|
||||
let noteIds = await this.redisTimelineService.get(`roleTimeline:${role.id}`, untilId, sinceId);
|
||||
let noteIds = await this.funoutTimelineService.get(`roleTimeline:${role.id}`, untilId, sinceId);
|
||||
noteIds = noteIds.slice(0, ps.limit);
|
||||
|
||||
if (noteIds.length === 0) {
|
||||
|
|
|
@ -14,7 +14,7 @@ import { CacheService } from '@/core/CacheService.js';
|
|||
import { IdService } from '@/core/IdService.js';
|
||||
import { isUserRelated } from '@/misc/is-user-related.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { RedisTimelineService } from '@/core/RedisTimelineService.js';
|
||||
import { FunoutTimelineService } from '@/core/FunoutTimelineService.js';
|
||||
import { ApiError } from '../../error.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -71,7 +71,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
private queryService: QueryService,
|
||||
private cacheService: CacheService,
|
||||
private idService: IdService,
|
||||
private redisTimelineService: RedisTimelineService,
|
||||
private funoutTimelineService: FunoutTimelineService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null);
|
||||
|
@ -87,9 +87,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
]) : [new Set<string>()];
|
||||
|
||||
const [noteIdsRes, repliesNoteIdsRes, channelNoteIdsRes] = await Promise.all([
|
||||
this.redisTimelineService.get(ps.withFiles ? `userTimelineWithFiles:${ps.userId}` : `userTimeline:${ps.userId}`, untilId, sinceId),
|
||||
ps.withReplies ? this.redisTimelineService.get(`userTimelineWithReplies:${ps.userId}`, untilId, sinceId) : Promise.resolve([]),
|
||||
ps.withChannelNotes ? this.redisTimelineService.get(`userTimelineWithChannel:${ps.userId}`, untilId, sinceId) : Promise.resolve([]),
|
||||
this.funoutTimelineService.get(ps.withFiles ? `userTimelineWithFiles:${ps.userId}` : `userTimeline:${ps.userId}`, untilId, sinceId),
|
||||
ps.withReplies ? this.funoutTimelineService.get(`userTimelineWithReplies:${ps.userId}`, untilId, sinceId) : Promise.resolve([]),
|
||||
ps.withChannelNotes ? this.funoutTimelineService.get(`userTimelineWithChannel:${ps.userId}`, untilId, sinceId) : Promise.resolve([]),
|
||||
]);
|
||||
|
||||
let noteIds = Array.from(new Set([
|
||||
|
@ -151,7 +151,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
.leftJoinAndSelect('renote.user', 'renoteUser');
|
||||
|
||||
if (ps.withChannelNotes) {
|
||||
if (!isSelf) query.andWhere('channel.isSensitive = false');
|
||||
if (!isSelf) query.andWhere(new Brackets(qb => {
|
||||
qb.orWhere('note.channelId IS NULL');
|
||||
qb.orWhere('channel.isSensitive = false');
|
||||
}));
|
||||
} else {
|
||||
query.andWhere('note.channelId IS NULL');
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
import sanitizeHtml from 'sanitize-html';
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import type { AbuseUserReportsRepository } from '@/models/_.js';
|
||||
import type { AbuseUserReportsRepository, UserProfilesRepository } from '@/models/_.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||
|
@ -59,6 +59,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
@Inject(DI.abuseUserReportsRepository)
|
||||
private abuseUserReportsRepository: AbuseUserReportsRepository,
|
||||
|
||||
@Inject(DI.userProfilesRepository)
|
||||
private userProfilesRepository: UserProfilesRepository,
|
||||
|
||||
private idService: IdService,
|
||||
private metaService: MetaService,
|
||||
private emailService: EmailService,
|
||||
|
@ -101,11 +104,19 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
reporterId: report.reporterId,
|
||||
comment: report.comment,
|
||||
});
|
||||
|
||||
const profile = await this.userProfilesRepository.findOneBy({ userId: moderator.id });
|
||||
|
||||
if (profile?.email) {
|
||||
this.emailService.sendEmail(profile.email, 'New abuse report',
|
||||
sanitizeHtml(ps.comment),
|
||||
sanitizeHtml(ps.comment));
|
||||
}
|
||||
}
|
||||
|
||||
const meta = await this.metaService.fetch();
|
||||
if (meta.email) {
|
||||
this.emailService.sendEmail(meta.email, 'New abuse report',
|
||||
if (meta.maintainerEmail) {
|
||||
this.emailService.sendEmail(meta.maintainerEmail, 'New abuse report',
|
||||
sanitizeHtml(ps.comment),
|
||||
sanitizeHtml(ps.comment));
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ class GlobalTimelineChannel extends Channel {
|
|||
public static requireCredential = false;
|
||||
private withRenotes: boolean;
|
||||
private withFiles: boolean;
|
||||
private withBots: boolean;
|
||||
|
||||
constructor(
|
||||
private metaService: MetaService,
|
||||
|
@ -40,6 +41,7 @@ class GlobalTimelineChannel extends Channel {
|
|||
|
||||
this.withRenotes = params.withRenotes ?? true;
|
||||
this.withFiles = params.withFiles ?? false;
|
||||
this.withBots = params.withBots ?? true;
|
||||
|
||||
// Subscribe events
|
||||
this.subscriber.on('notesStream', this.onNote);
|
||||
|
@ -48,6 +50,7 @@ class GlobalTimelineChannel extends Channel {
|
|||
@bindThis
|
||||
private async onNote(note: Packed<'Note'>) {
|
||||
if (this.withFiles && (note.fileIds == null || note.fileIds.length === 0)) return;
|
||||
if (!this.withBots && note.user.isBot) return;
|
||||
|
||||
if (note.visibility !== 'public') return;
|
||||
if (note.channelId != null) return;
|
||||
|
@ -59,6 +62,8 @@ class GlobalTimelineChannel extends Channel {
|
|||
if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return;
|
||||
}
|
||||
|
||||
if (note.user.isSilenced && !this.following[note.userId] && note.userId !== this.user!.id) return;
|
||||
|
||||
if (note.renote && note.text == null && (note.fileIds == null || note.fileIds.length === 0) && !this.withRenotes) return;
|
||||
|
||||
// Ignore notes from instances the user has muted
|
||||
|
|
|
@ -49,7 +49,7 @@ class HomeTimelineChannel extends Channel {
|
|||
}
|
||||
|
||||
// Ignore notes from instances the user has muted
|
||||
if (isInstanceMuted(note, new Set<string>(this.userProfile!.mutedInstances ?? []))) return;
|
||||
if (isInstanceMuted(note, new Set<string>(this.userProfile!.mutedInstances))) return;
|
||||
|
||||
if (note.visibility === 'followers') {
|
||||
if (!Object.hasOwn(this.following, note.userId)) return;
|
||||
|
@ -64,6 +64,8 @@ class HomeTimelineChannel extends Channel {
|
|||
if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return;
|
||||
}
|
||||
|
||||
if (note.user.isSilenced && !this.following[note.userId] && note.userId !== this.user!.id) return;
|
||||
|
||||
if (note.renote && note.text == null && (note.fileIds == null || note.fileIds.length === 0) && !this.withRenotes) return;
|
||||
|
||||
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
|
||||
|
|
|
@ -20,6 +20,7 @@ class HybridTimelineChannel extends Channel {
|
|||
public static requireCredential = true;
|
||||
private withRenotes: boolean;
|
||||
private withReplies: boolean;
|
||||
private withBots: boolean;
|
||||
private withFiles: boolean;
|
||||
|
||||
constructor(
|
||||
|
@ -41,6 +42,7 @@ class HybridTimelineChannel extends Channel {
|
|||
|
||||
this.withRenotes = params.withRenotes ?? true;
|
||||
this.withReplies = params.withReplies ?? false;
|
||||
this.withBots = params.withBots ?? true;
|
||||
this.withFiles = params.withFiles ?? false;
|
||||
|
||||
// Subscribe events
|
||||
|
@ -50,6 +52,7 @@ class HybridTimelineChannel extends Channel {
|
|||
@bindThis
|
||||
private async onNote(note: Packed<'Note'>) {
|
||||
if (this.withFiles && (note.fileIds == null || note.fileIds.length === 0)) return;
|
||||
if (!this.withBots && note.user.isBot) return;
|
||||
|
||||
// チャンネルの投稿ではなく、自分自身の投稿 または
|
||||
// チャンネルの投稿ではなく、その投稿のユーザーをフォローしている または
|
||||
|
@ -69,7 +72,7 @@ class HybridTimelineChannel extends Channel {
|
|||
}
|
||||
|
||||
// Ignore notes from instances the user has muted
|
||||
if (isInstanceMuted(note, new Set<string>(this.userProfile!.mutedInstances ?? []))) return;
|
||||
if (isInstanceMuted(note, new Set<string>(this.userProfile!.mutedInstances))) return;
|
||||
|
||||
// 関係ない返信は除外
|
||||
if (note.reply && !this.following[note.userId]?.withReplies && !this.withReplies) {
|
||||
|
@ -78,6 +81,8 @@ class HybridTimelineChannel extends Channel {
|
|||
if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return;
|
||||
}
|
||||
|
||||
if (note.user.isSilenced && !this.following[note.userId] && note.userId !== this.user!.id) return;
|
||||
|
||||
if (note.renote && note.text == null && (note.fileIds == null || note.fileIds.length === 0) && !this.withRenotes) return;
|
||||
|
||||
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
|
||||
|
|
|
@ -19,6 +19,7 @@ class LocalTimelineChannel extends Channel {
|
|||
public static requireCredential = false;
|
||||
private withRenotes: boolean;
|
||||
private withReplies: boolean;
|
||||
private withBots: boolean;
|
||||
private withFiles: boolean;
|
||||
|
||||
constructor(
|
||||
|
@ -40,6 +41,7 @@ class LocalTimelineChannel extends Channel {
|
|||
|
||||
this.withRenotes = params.withRenotes ?? true;
|
||||
this.withReplies = params.withReplies ?? false;
|
||||
this.withBots = params.withBots ?? true;
|
||||
this.withFiles = params.withFiles ?? false;
|
||||
|
||||
// Subscribe events
|
||||
|
@ -49,6 +51,7 @@ class LocalTimelineChannel extends Channel {
|
|||
@bindThis
|
||||
private async onNote(note: Packed<'Note'>) {
|
||||
if (this.withFiles && (note.fileIds == null || note.fileIds.length === 0)) return;
|
||||
if (!this.withBots && note.user.isBot) return;
|
||||
|
||||
if (note.user.host !== null) return;
|
||||
if (note.visibility !== 'public') return;
|
||||
|
@ -61,6 +64,8 @@ class LocalTimelineChannel extends Channel {
|
|||
if (reply.userId !== this.user.id && note.userId !== this.user.id && reply.userId !== note.userId) return;
|
||||
}
|
||||
|
||||
if (note.user.isSilenced && !this.following[note.userId] && note.userId !== this.user!.id) return;
|
||||
|
||||
if (note.renote && note.text == null && (note.fileIds == null || note.fileIds.length === 0) && !this.withRenotes) return;
|
||||
|
||||
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
|
||||
|
|
|
@ -83,7 +83,7 @@ export class FeedService {
|
|||
date: this.idService.parse(note.id).date,
|
||||
description: note.cw ?? undefined,
|
||||
content: note.text ?? undefined,
|
||||
image: file ? this.driveFileEntityService.getPublicUrl(file) ?? undefined : undefined,
|
||||
image: file ? this.driveFileEntityService.getPublicUrl(file) : undefined,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -727,7 +727,7 @@ describe('Timelines', () => {
|
|||
|
||||
await waitForPushToTl();
|
||||
|
||||
const res = await api('/notes/hybrid-timeline', { }, alice);
|
||||
const res = await api('/notes/hybrid-timeline', { limit: 100 }, alice);
|
||||
|
||||
assert.strictEqual(res.body.some((note: any) => note.id === bobNote.id), false);
|
||||
assert.strictEqual(res.body.some((note: any) => note.id === carolNote.id), true);
|
||||
|
|
|
@ -78,24 +78,24 @@
|
|||
"vuedraggable": "next"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-actions": "7.4.6",
|
||||
"@storybook/addon-essentials": "7.4.6",
|
||||
"@storybook/addon-interactions": "7.4.6",
|
||||
"@storybook/addon-links": "7.4.6",
|
||||
"@storybook/addon-storysource": "7.4.6",
|
||||
"@storybook/addons": "7.4.6",
|
||||
"@storybook/blocks": "7.4.6",
|
||||
"@storybook/core-events": "7.4.6",
|
||||
"@storybook/addon-actions": "7.5.0",
|
||||
"@storybook/addon-essentials": "7.5.0",
|
||||
"@storybook/addon-interactions": "7.5.0",
|
||||
"@storybook/addon-links": "7.5.0",
|
||||
"@storybook/addon-storysource": "7.5.0",
|
||||
"@storybook/addons": "7.5.0",
|
||||
"@storybook/blocks": "7.5.0",
|
||||
"@storybook/core-events": "7.5.0",
|
||||
"@storybook/jest": "0.2.3",
|
||||
"@storybook/manager-api": "7.4.6",
|
||||
"@storybook/preview-api": "7.4.6",
|
||||
"@storybook/react": "7.4.6",
|
||||
"@storybook/react-vite": "7.4.6",
|
||||
"@storybook/manager-api": "7.5.0",
|
||||
"@storybook/preview-api": "7.5.0",
|
||||
"@storybook/react": "7.5.0",
|
||||
"@storybook/react-vite": "7.5.0",
|
||||
"@storybook/testing-library": "0.2.2",
|
||||
"@storybook/theming": "7.4.6",
|
||||
"@storybook/types": "7.4.6",
|
||||
"@storybook/vue3": "7.4.6",
|
||||
"@storybook/vue3-vite": "7.4.6",
|
||||
"@storybook/theming": "7.5.0",
|
||||
"@storybook/types": "7.5.0",
|
||||
"@storybook/vue3": "7.5.0",
|
||||
"@storybook/vue3-vite": "7.5.0",
|
||||
"@testing-library/vue": "7.0.0",
|
||||
"@types/escape-regexp": "0.0.1",
|
||||
"@types/estree": "1.0.2",
|
||||
|
@ -109,8 +109,8 @@
|
|||
"@types/uuid": "9.0.5",
|
||||
"@types/websocket": "1.0.7",
|
||||
"@types/ws": "8.5.7",
|
||||
"@typescript-eslint/eslint-plugin": "6.7.5",
|
||||
"@typescript-eslint/parser": "6.7.5",
|
||||
"@typescript-eslint/eslint-plugin": "6.8.0",
|
||||
"@typescript-eslint/parser": "6.8.0",
|
||||
"@vitest/coverage-v8": "0.34.6",
|
||||
"@vue/runtime-core": "3.3.4",
|
||||
"acorn": "8.10.0",
|
||||
|
@ -129,7 +129,7 @@
|
|||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"start-server-and-test": "2.0.1",
|
||||
"storybook": "7.4.6",
|
||||
"storybook": "7.5.0",
|
||||
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
|
||||
"summaly": "github:misskey-dev/summaly",
|
||||
"vite-plugin-turbosnap": "1.0.3",
|
||||
|
|
|
@ -42,6 +42,7 @@ import { useStream } from '@/stream.js';
|
|||
import { i18n } from '@/i18n.js';
|
||||
import { claimAchievement } from '@/scripts/achievements.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { defaultStore } from "@/store.js";
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
user: Misskey.entities.UserDetailed,
|
||||
|
@ -52,6 +53,10 @@ const props = withDefaults(defineProps<{
|
|||
large: false,
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
(_: 'update:user', value: Misskey.entities.UserDetailed): void
|
||||
}>();
|
||||
|
||||
let isFollowing = $ref(props.user.isFollowing);
|
||||
let hasPendingFollowRequestFromYou = $ref(props.user.hasPendingFollowRequestFromYou);
|
||||
let wait = $ref(false);
|
||||
|
@ -95,6 +100,11 @@ async function onClick() {
|
|||
} else {
|
||||
await os.api('following/create', {
|
||||
userId: props.user.id,
|
||||
withReplies: defaultStore.state.defaultWithReplies,
|
||||
});
|
||||
emit('update:user', {
|
||||
...props.user,
|
||||
withReplies: defaultStore.state.defaultWithReplies
|
||||
});
|
||||
hasPendingFollowRequestFromYou = true;
|
||||
|
||||
|
|
|
@ -25,11 +25,13 @@ const props = withDefaults(defineProps<{
|
|||
sound?: boolean;
|
||||
withRenotes?: boolean;
|
||||
withReplies?: boolean;
|
||||
withBots?: boolean;
|
||||
onlyFiles?: boolean;
|
||||
}>(), {
|
||||
withRenotes: true,
|
||||
withReplies: false,
|
||||
onlyFiles: false,
|
||||
withBots: true,
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
@ -93,11 +95,13 @@ if (props.src === 'antenna') {
|
|||
query = {
|
||||
withRenotes: props.withRenotes,
|
||||
withReplies: props.withReplies,
|
||||
withBots: props.withBots,
|
||||
withFiles: props.onlyFiles ? true : undefined,
|
||||
};
|
||||
connection = stream.useChannel('localTimeline', {
|
||||
withRenotes: props.withRenotes,
|
||||
withReplies: props.withReplies,
|
||||
withBots: props.withBots,
|
||||
withFiles: props.onlyFiles ? true : undefined,
|
||||
});
|
||||
connection.on('note', prepend);
|
||||
|
@ -106,11 +110,13 @@ if (props.src === 'antenna') {
|
|||
query = {
|
||||
withRenotes: props.withRenotes,
|
||||
withReplies: props.withReplies,
|
||||
withBots: props.withBots,
|
||||
withFiles: props.onlyFiles ? true : undefined,
|
||||
};
|
||||
connection = stream.useChannel('hybridTimeline', {
|
||||
withRenotes: props.withRenotes,
|
||||
withReplies: props.withReplies,
|
||||
withBots: props.withBots,
|
||||
withFiles: props.onlyFiles ? true : undefined,
|
||||
});
|
||||
connection.on('note', prepend);
|
||||
|
@ -118,10 +124,12 @@ if (props.src === 'antenna') {
|
|||
endpoint = 'notes/global-timeline';
|
||||
query = {
|
||||
withRenotes: props.withRenotes,
|
||||
withBots: props.withBots,
|
||||
withFiles: props.onlyFiles ? true : undefined,
|
||||
};
|
||||
connection = stream.useChannel('globalTimeline', {
|
||||
withRenotes: props.withRenotes,
|
||||
withBots: props.withBots,
|
||||
withFiles: props.onlyFiles ? true : undefined,
|
||||
});
|
||||
connection.on('note', prepend);
|
||||
|
|
|
@ -46,7 +46,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div>
|
||||
</div>
|
||||
<button class="_button" :class="$style.menu" @click="showMenu"><i class="ph-dots-three ph-bold ph-lg"></i></button>
|
||||
<MkFollowButton v-if="$i && user.id != $i.id" :class="$style.follow" :user="user" mini/>
|
||||
<MkFollowButton v-if="$i && user.id != $i.id" v-model:user="user" :class="$style.follow" mini/>
|
||||
</div>
|
||||
<div v-else>
|
||||
<MkLoading/>
|
||||
|
|
|
@ -78,6 +78,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<FormSection>
|
||||
<div class="_gaps">
|
||||
<MkSwitch v-model="silenced" @update:modelValue="toggleSilence">{{ i18n.ts.silence }}</MkSwitch>
|
||||
<MkSwitch v-model="suspended" @update:modelValue="toggleSuspend">{{ i18n.ts.suspend }}</MkSwitch>
|
||||
<MkSwitch v-model="markedAsNSFW" @update:modelValue="toggleNSFW">{{ i18n.ts.markAsNSFW }}</MkSwitch>
|
||||
|
||||
|
@ -327,6 +328,19 @@ async function toggleNSFW(v) {
|
|||
}
|
||||
}
|
||||
|
||||
async function toggleSilence(v) {
|
||||
const confirm = await os.confirm({
|
||||
type: 'warning',
|
||||
text: v ? i18n.ts.silenceConfirm : i18n.ts.unsilenceConfirm,
|
||||
});
|
||||
if (confirm.canceled) {
|
||||
silenced = !v;
|
||||
} else {
|
||||
await os.api(v ? 'admin/silence-user' : 'admin/unsilence-user', { userId: user.id });
|
||||
await refreshUser();
|
||||
}
|
||||
}
|
||||
|
||||
async function toggleSuspend(v) {
|
||||
const confirm = await os.confirm({
|
||||
type: 'warning',
|
||||
|
|
|
@ -18,8 +18,15 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<div class="_panel" style="padding: 16px;">
|
||||
<MkSwitch v-model="enableAchievements">
|
||||
<template #label>Enable Achievements</template>
|
||||
<template #caption>Turning this off will disable the achievement system</template>
|
||||
<template #label>{{ i18n.ts.enableAchievements }}</template>
|
||||
<template #caption>{{ i18n.ts.turnOffAchievements}}</template>
|
||||
</MkSwitch>
|
||||
</div>
|
||||
|
||||
<div class="_panel" style="padding: 16px;">
|
||||
<MkSwitch v-model="enableBotTrending">
|
||||
<template #label>{{ i18n.ts.enableBotTrending }}</template>
|
||||
<template #caption>{{ i18n.ts.turnOffBotTrending }}</template>
|
||||
</MkSwitch>
|
||||
</div>
|
||||
|
||||
|
@ -61,6 +68,7 @@ import MkSwitch from '@/components/MkSwitch.vue';
|
|||
|
||||
let enableServerMachineStats: boolean = $ref(false);
|
||||
let enableAchievements: boolean = $ref(false);
|
||||
let enableBotTrending: boolean = $ref(false);
|
||||
let enableIdenticonGeneration: boolean = $ref(false);
|
||||
let enableChartsForRemoteUser: boolean = $ref(false);
|
||||
let enableChartsForFederatedInstances: boolean = $ref(false);
|
||||
|
@ -69,6 +77,7 @@ async function init() {
|
|||
const meta = await os.api('admin/meta');
|
||||
enableServerMachineStats = meta.enableServerMachineStats;
|
||||
enableAchievements = meta.enableAchievements;
|
||||
enableBotTrending = meta.enableBotTrending;
|
||||
enableIdenticonGeneration = meta.enableIdenticonGeneration;
|
||||
enableChartsForRemoteUser = meta.enableChartsForRemoteUser;
|
||||
enableChartsForFederatedInstances = meta.enableChartsForFederatedInstances;
|
||||
|
@ -78,6 +87,7 @@ function save() {
|
|||
os.apiWithDialog('admin/update-meta', {
|
||||
enableServerMachineStats,
|
||||
enableAchievements,
|
||||
enableBotTrending,
|
||||
enableIdenticonGeneration,
|
||||
enableChartsForRemoteUser,
|
||||
enableChartsForFederatedInstances,
|
||||
|
|
|
@ -14,6 +14,7 @@ import * as Misskey from 'misskey-js';
|
|||
import * as os from '@/os.js';
|
||||
import { mainRouter } from '@/router.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { defaultStore } from "@/store.js";
|
||||
|
||||
async function follow(user): Promise<void> {
|
||||
const { canceled } = await os.confirm({
|
||||
|
@ -28,7 +29,9 @@ async function follow(user): Promise<void> {
|
|||
|
||||
os.apiWithDialog('following/create', {
|
||||
userId: user.id,
|
||||
withReplies: defaultStore.state.defaultWithReplies,
|
||||
});
|
||||
user.withReplies = defaultStore.state.defaultWithReplies;
|
||||
}
|
||||
|
||||
const acct = new URL(location.href).searchParams.get('acct');
|
||||
|
|
|
@ -38,7 +38,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkUserName :user="post.user" style="display: block;"/>
|
||||
<MkAcct :user="post.user"/>
|
||||
</div>
|
||||
<MkFollowButton v-if="!$i || $i.id != post.user.id" :user="post.user" :inline="true" :transparent="false" :full="true" large class="koudoku"/>
|
||||
<MkFollowButton v-if="!$i || $i.id != post.user.id" v-model:user="post.user" :inline="true" :transparent="false" :full="true" large class="koudoku"/>
|
||||
</div>
|
||||
</div>
|
||||
<MkAd :prefer="['horizontal', 'horizontal-big']"/>
|
||||
|
|
|
@ -29,6 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<div class="_gaps_s">
|
||||
<MkSwitch v-model="showFixedPostForm">{{ i18n.ts.showFixedPostForm }}</MkSwitch>
|
||||
<MkSwitch v-model="showFixedPostFormInChannel">{{ i18n.ts.showFixedPostFormInChannel }}</MkSwitch>
|
||||
<MkSwitch v-model="defaultWithReplies">{{ i18n.ts.withRepliesByDefaultForNewlyFollowed }}</MkSwitch>
|
||||
<MkFolder>
|
||||
<template #label>{{ i18n.ts.pinnedList }}</template>
|
||||
<!-- 複数ピン止め管理できるようにしたいけどめんどいので一旦ひとつのみ -->
|
||||
|
@ -152,6 +153,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkSwitch v-model="enableInfiniteScroll">{{ i18n.ts.enableInfiniteScroll }}</MkSwitch>
|
||||
<MkSwitch v-model="keepScreenOn">{{ i18n.ts.keepScreenOn }}</MkSwitch>
|
||||
<MkSwitch v-model="clickToOpen">{{ i18n.ts.clickToOpen }}</MkSwitch>
|
||||
<MkSwitch v-model="showBots">{{ i18n.ts.showBots }}</MkSwitch>
|
||||
</div>
|
||||
<MkSelect v-model="serverDisconnectedBehavior">
|
||||
<template #label>{{ i18n.ts.whenServerDisconnected }}</template>
|
||||
|
@ -227,6 +229,7 @@ const showClipButtonInNoteFooter = computed(defaultStore.makeGetterSetter('showC
|
|||
const reactionsDisplaySize = computed(defaultStore.makeGetterSetter('reactionsDisplaySize'));
|
||||
const collapseRenotes = computed(defaultStore.makeGetterSetter('collapseRenotes'));
|
||||
const clickToOpen = computed(defaultStore.makeGetterSetter('clickToOpen'));
|
||||
const showBots = computed(defaultStore.makeGetterSetter('tlWithBots'));
|
||||
const collapseFiles = computed(defaultStore.makeGetterSetter('collapseFiles'));
|
||||
const autoloadConversation = computed(defaultStore.makeGetterSetter('autoloadConversation'));
|
||||
const reduceAnimation = computed(defaultStore.makeGetterSetter('animation', v => !v, v => !v));
|
||||
|
@ -255,6 +258,7 @@ const mediaListWithOneImageAppearance = computed(defaultStore.makeGetterSetter('
|
|||
const notificationPosition = computed(defaultStore.makeGetterSetter('notificationPosition'));
|
||||
const notificationStackAxis = computed(defaultStore.makeGetterSetter('notificationStackAxis'));
|
||||
const keepScreenOn = computed(defaultStore.makeGetterSetter('keepScreenOn'));
|
||||
const defaultWithReplies = computed(defaultStore.makeGetterSetter('defaultWithReplies'));
|
||||
|
||||
watch(lang, () => {
|
||||
miLocalStorage.setItem('lang', lang.value as string);
|
||||
|
|
|
@ -40,6 +40,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkFolder v-if="$i && !$i.movedTo">
|
||||
<template #label>{{ i18n.ts.import }}</template>
|
||||
<template #icon><i class="ph-upload ph-bold ph-lg"></i></template>
|
||||
<MkSwitch v-model="withReplies">
|
||||
{{ i18n.ts._exportOrImport.withReplies }}
|
||||
</MkSwitch>
|
||||
<MkButton primary :class="$style.button" inline @click="importFollowing($event)"><i class="ph-upload ph-bold ph-lg"></i> {{ i18n.ts.import }}</MkButton>
|
||||
</MkFolder>
|
||||
</div>
|
||||
|
@ -118,9 +121,11 @@ import { selectFile } from '@/scripts/select-file.js';
|
|||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { defaultStore } from "@/store.js";
|
||||
|
||||
const excludeMutingUsers = ref(false);
|
||||
const excludeInactiveUsers = ref(false);
|
||||
const withReplies = ref(defaultStore.state.defaultWithReplies);
|
||||
|
||||
const onExportSuccess = () => {
|
||||
os.alert({
|
||||
|
@ -177,7 +182,10 @@ const exportAntennas = () => {
|
|||
|
||||
const importFollowing = async (ev) => {
|
||||
const file = await selectFile(ev.currentTarget ?? ev.target);
|
||||
os.api('i/import-following', { fileId: file.id }).then(onImportSuccess).catch(onError);
|
||||
os.api('i/import-following', {
|
||||
fileId: file.id,
|
||||
withReplies: withReplies.value,
|
||||
}).then(onImportSuccess).catch(onError);
|
||||
};
|
||||
|
||||
const importUserLists = async (ev) => {
|
||||
|
|
|
@ -21,6 +21,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
:withRenotes="withRenotes"
|
||||
:withReplies="withReplies"
|
||||
:onlyFiles="onlyFiles"
|
||||
:withBots="withBots"
|
||||
:sound="true"
|
||||
@queue="queueUpdated"
|
||||
/>
|
||||
|
@ -63,6 +64,7 @@ let srcWhenNotSignin = $ref(isLocalTimelineAvailable ? 'local' : 'global');
|
|||
const src = $computed({ get: () => ($i ? defaultStore.reactiveState.tl.value.src : srcWhenNotSignin), set: (x) => saveSrc(x) });
|
||||
const withRenotes = $ref(true);
|
||||
const withReplies = $ref($i ? defaultStore.state.tlWithReplies : false);
|
||||
const withBots = $ref($i ? defaultStore.state.tlWithBots : true);
|
||||
const onlyFiles = $ref(false);
|
||||
|
||||
watch($$(src), () => queue = 0);
|
||||
|
|
|
@ -7,9 +7,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkSpacer :contentMax="narrow ? 800 : 1100" :style="background">
|
||||
<div ref="rootEl" class="ftskorzw" :class="{ wide: !narrow }" style="container-type: inline-size;">
|
||||
<div class="main _gaps">
|
||||
<!-- TODO -->
|
||||
<!-- <div class="punished" v-if="user.isSuspended"><i class="ph-warning ph-bold ph-lg" style="margin-right: 8px;"></i> {{ i18n.ts.userSuspended }}</div> -->
|
||||
<!-- <div class="punished" v-if="user.isSilenced"><i class="ph-warning ph-bold ph-lg" style="margin-right: 8px;"></i> {{ i18n.ts.userSilenced }}</div> -->
|
||||
<MkInfo v-if="user.isSuspended" :warn="true">{{ i18n.ts.userSuspended }}</MkInfo>
|
||||
<MkInfo v-if="user.isSilenced" :warn="true">{{ i18n.ts.userSilenced }}</MkInfo>
|
||||
|
||||
<div class="profile _gaps">
|
||||
<MkAccountMoved v-if="user.movedTo" :movedTo="user.movedTo"/>
|
||||
|
@ -34,7 +33,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<span v-if="$i && $i.id != user.id && user.isFollowed" class="followed">{{ i18n.ts.followsYou }}</span>
|
||||
<div v-if="$i" class="actions">
|
||||
<button class="menu _button" @click="menu"><i class="ph-dots-three ph-bold ph-lg"></i></button>
|
||||
<MkFollowButton v-if="$i.id != user.id" :user="user" :inline="true" :transparent="false" :full="true" class="koudoku"/>
|
||||
<MkFollowButton v-if="$i.id != user.id" v-model:user="user" :inline="true" :transparent="false" :full="true" class="koudoku"/>
|
||||
</div>
|
||||
</div>
|
||||
<MkAvatar class="avatar" :user="user" indicator/>
|
||||
|
@ -213,6 +212,7 @@ const props = withDefaults(defineProps<{
|
|||
|
||||
const router = useRouter();
|
||||
|
||||
let user = $ref(props.user);
|
||||
let parallaxAnimationId = $ref<null | number>(null);
|
||||
let narrow = $ref<null | boolean>(null);
|
||||
let rootEl = $ref<null | HTMLElement>(null);
|
||||
|
@ -285,7 +285,7 @@ const age = $computed(() => {
|
|||
});
|
||||
|
||||
function menu(ev) {
|
||||
const { menu, cleanup } = getUserMenu(props.user, router);
|
||||
const { menu, cleanup } = getUserMenu(user, router);
|
||||
os.popupMenu(menu, ev.currentTarget ?? ev.target).finally(cleanup);
|
||||
}
|
||||
|
||||
|
|
|
@ -373,6 +373,14 @@ export const defaultStore = markRaw(new Storage('base', {
|
|||
where: 'device',
|
||||
default: false,
|
||||
},
|
||||
tlWithBots: {
|
||||
where: 'device',
|
||||
default: true,
|
||||
},
|
||||
defaultWithReplies: {
|
||||
where: 'account',
|
||||
default: false,
|
||||
},
|
||||
}));
|
||||
|
||||
// TODO: 他のタブと永続化されたstateを同期
|
||||
|
|
|
@ -1185,6 +1185,7 @@ export type Endpoints = {
|
|||
'following/create': {
|
||||
req: {
|
||||
userId: User['id'];
|
||||
withReplies?: boolean;
|
||||
};
|
||||
res: User;
|
||||
};
|
||||
|
@ -2987,7 +2988,7 @@ type UserSorting = '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+u
|
|||
//
|
||||
// src/api.types.ts:16:32 - (ae-forgotten-export) The symbol "TODO" needs to be exported by the entry point index.d.ts
|
||||
// src/api.types.ts:18:25 - (ae-forgotten-export) The symbol "NoParams" needs to be exported by the entry point index.d.ts
|
||||
// src/api.types.ts:630:18 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts
|
||||
// src/api.types.ts:633:18 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts
|
||||
// src/entities.ts:107:2 - (ae-forgotten-export) The symbol "notificationTypes_2" needs to be exported by the entry point index.d.ts
|
||||
// src/entities.ts:603:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts
|
||||
// src/streaming.types.ts:33:4 - (ae-forgotten-export) The symbol "FIXME" needs to be exported by the entry point index.d.ts
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
"@swc/jest": "0.2.29",
|
||||
"@types/jest": "29.5.5",
|
||||
"@types/node": "20.8.6",
|
||||
"@typescript-eslint/eslint-plugin": "6.7.5",
|
||||
"@typescript-eslint/parser": "6.7.5",
|
||||
"@typescript-eslint/eslint-plugin": "6.8.0",
|
||||
"@typescript-eslint/parser": "6.8.0",
|
||||
"eslint": "8.51.0",
|
||||
"jest": "29.7.0",
|
||||
"jest-fetch-mock": "3.0.3",
|
||||
|
|
|
@ -31,6 +31,8 @@ export type Endpoints = {
|
|||
'admin/show-users': { req: TODO; res: TODO; };
|
||||
'admin/silence-user': { req: TODO; res: TODO; };
|
||||
'admin/suspend-user': { req: TODO; res: TODO; };
|
||||
'admin/nsfw-user': { req: TODO; res: TODO; };
|
||||
'admin/unnsfw-user': { req: TODO; res: TODO; };
|
||||
'admin/unsilence-user': { req: TODO; res: TODO; };
|
||||
'admin/unsuspend-user': { req: TODO; res: TODO; };
|
||||
'admin/update-meta': { req: TODO; res: TODO; };
|
||||
|
@ -321,7 +323,10 @@ export type Endpoints = {
|
|||
'federation/users': { req: { host: string; limit?: number; sinceId?: User['id']; untilId?: User['id']; }; res: UserDetailed[]; };
|
||||
|
||||
// following
|
||||
'following/create': { req: { userId: User['id'] }; res: User; };
|
||||
'following/create': { req: {
|
||||
userId: User['id'],
|
||||
withReplies?: boolean,
|
||||
}; res: User; };
|
||||
'following/delete': { req: { userId: User['id'] }; res: User; };
|
||||
'following/requests/accept': { req: { userId: User['id'] }; res: null; };
|
||||
'following/requests/cancel': { req: { userId: User['id'] }; res: User; };
|
||||
|
|
|
@ -406,6 +406,7 @@ export type AdminInstanceMetadata = DetailedInstanceMetadata & {
|
|||
app192IconUrl: string | null;
|
||||
app512IconUrl: string | null;
|
||||
manifestJsonOverride: string;
|
||||
enableBotTrending: boolean;
|
||||
};
|
||||
|
||||
export type ServerInfo = {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"misskey-js": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/parser": "6.7.5",
|
||||
"@typescript-eslint/parser": "6.8.0",
|
||||
"@typescript/lib-webworker": "npm:@types/serviceworker@0.0.67",
|
||||
"eslint": "8.51.0",
|
||||
"eslint-plugin-import": "2.28.1",
|
||||
|
|
1078
pnpm-lock.yaml
1078
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue