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