release: 2023.11.1
This commit is contained in:
commit
f7afd1ae4a
137 changed files with 5409 additions and 2385 deletions
|
@ -9,3 +9,9 @@ body:
|
|||
description: Tell us what the suggestion is
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Purpose
|
||||
description: Describe the specific problem or need you think this feature will solve, and who it will help.
|
||||
validations:
|
||||
required: true
|
1
.github/workflows/docker-develop.yml
vendored
1
.github/workflows/docker-develop.yml
vendored
|
@ -56,6 +56,7 @@ jobs:
|
|||
labels: develop
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
build-args: NODE_ENV=development
|
||||
- name: Push update to server
|
||||
if: steps.build.outcome == 'success'
|
||||
uses: indiesdev/curl@v1.1
|
||||
|
|
6
.github/workflows/pr-preview-deploy.yml
vendored
6
.github/workflows/pr-preview-deploy.yml
vendored
|
@ -13,7 +13,7 @@ jobs:
|
|||
github.event.client_payload.slash_command.sha != '' &&
|
||||
contains(github.event.client_payload.pull_request.head.sha, github.event.client_payload.slash_command.sha)
|
||||
steps:
|
||||
- uses: actions/github-script@v6.4.1
|
||||
- uses: actions/github-script@v7
|
||||
id: check-id
|
||||
env:
|
||||
number: ${{ github.event.client_payload.pull_request.number }}
|
||||
|
@ -37,7 +37,7 @@ jobs:
|
|||
|
||||
return check[0].id;
|
||||
|
||||
- uses: actions/github-script@v6.4.1
|
||||
- uses: actions/github-script@v7
|
||||
env:
|
||||
check_id: ${{ steps.check-id.outputs.result }}
|
||||
details_url: ${{ github.server_url }}/${{ github.repository }}/runs/${{ github.run_id }}
|
||||
|
@ -72,7 +72,7 @@ jobs:
|
|||
timeout: 15m
|
||||
|
||||
# Update check run called "integration-fork"
|
||||
- uses: actions/github-script@v6.4.1
|
||||
- uses: actions/github-script@v7
|
||||
id: update-check-run
|
||||
if: ${{ always() }}
|
||||
env:
|
||||
|
|
2
.github/workflows/pr-preview-destroy.yml
vendored
2
.github/workflows/pr-preview-destroy.yml
vendored
|
@ -10,7 +10,7 @@ jobs:
|
|||
destroy-preview-environment:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6.4.1
|
||||
- uses: actions/github-script@v7
|
||||
id: check-conclusion
|
||||
env:
|
||||
number: ${{ github.event.number }}
|
||||
|
|
2
.github/workflows/report-api-diff.yml
vendored
2
.github/workflows/report-api-diff.yml
vendored
|
@ -16,7 +16,7 @@ jobs:
|
|||
# api-artifact
|
||||
steps:
|
||||
- name: Download artifact
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
||||
|
|
33
CHANGELOG.md
33
CHANGELOG.md
|
@ -12,6 +12,39 @@
|
|||
|
||||
-->
|
||||
|
||||
## 2023.11.1
|
||||
|
||||
### General
|
||||
- Feat: 管理者がコントロールパネルからメールアドレスの照会を行えるようになりました
|
||||
- Enhance: ローカリゼーションの更新
|
||||
- Enhance: 依存関係の更新
|
||||
|
||||
### Client
|
||||
- Enhance: MFMでルビを振れるように
|
||||
- 例: `$[ruby 三須木 みすき]`
|
||||
- Enhance: MFMでUNIX時間を指定して日時を表示できるように
|
||||
- 例: `$[unixtime 1701356400]`
|
||||
- Enhance: プラグインでエラーが発生した場合のハンドリングを強化
|
||||
- Enhance: 細かなUIのブラッシュアップ
|
||||
- Fix: 効果音が再生されるとデバイスで再生している動画や音声が停止する問題を修正 #12339
|
||||
- Fix: デッキに表示されたチャンネルの表示先チャンネルを切り替えた際、即座に反映されない問題を修正 #12236
|
||||
- Fix: プラグインでノートの表示を書き換えられない問題を修正
|
||||
- Fix: アイコンデコレーションが見切れる場合がある問題を修正
|
||||
- Fix: 「フォロー中の人全員の返信を含める/含めないようにする」のボタンを押下した際の確認が機能していない問題を修正
|
||||
- Fix: 非ログイン時に「メモを追加」を表示しないように変更 #12309
|
||||
- Fix: 絵文字ピッカーでの検索が更新されない問題を修正
|
||||
- Fix: 特定の条件下でノートがnyaizeされない問題を修正
|
||||
|
||||
### Server
|
||||
- Enhance: FTTのデータベースへのフォールバック処理を行うかどうかを設定可能に
|
||||
- Fix: トークンのないプラグインをアンインストールするときにエラーが出ないように
|
||||
- Fix: 投稿通知がオンでもダイレクト投稿はユーザーに通知されないようにされました
|
||||
- Fix: ユーザタイムラインの「ノート」選択時にリノートが混ざり込んでしまうことがある問題の修正 #12306
|
||||
- Fix: LTLに特定条件下にてチャンネルへの投稿が混ざり込む現象を修正
|
||||
- Fix: ActivityPub: 追加情報のカスタム絵文字がユーザー情報のtagに含まれない問題を修正
|
||||
- Fix: ActivityPubに関するセキュリティの向上
|
||||
- Fix: 非公開の投稿に対して返信できないように
|
||||
|
||||
## 2023.11.0
|
||||
|
||||
### Note
|
||||
|
|
|
@ -2,45 +2,131 @@
|
|||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, caste, color, religion, or sexual
|
||||
identity and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the overall
|
||||
community
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* The use of sexualized language or imagery, and sexual attention or advances of
|
||||
any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
* Publishing others' private information, such as a physical or email address,
|
||||
without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at syuilotan@yahoo.co.jp. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
<syuilotan@yahoo.co.jp>.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series of
|
||||
actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or permanent
|
||||
ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within the
|
||||
community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.1, available at
|
||||
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
Community Impact Guidelines were inspired by
|
||||
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
||||
[https://www.contributor-covenant.org/translations][translations].
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
||||
[Mozilla CoC]: https://github.com/mozilla/diversity
|
||||
[FAQ]: https://www.contributor-covenant.org/faq
|
||||
[translations]: https://www.contributor-covenant.org/translations
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
<a href="https://ko-fi.com/transfem">
|
||||
<img src="https://custom-icon-badges.herokuapp.com/badge/donate-F96854?logoColor=F96854&style=for-the-badge&logo=kofi&labelColor=363B40" alt="donate"/></a>
|
||||
<a href="https://hosted.weblate.org/projects/sharkey/">
|
||||
<img src="https://custom-icon-badges.herokuapp.com/badge/translate-sharkey-124437?logoColor=acea31&style=for-the-badge&logo=translate-sharkey&labelColor=363B40" alt="Translate Sharkey"/></a>
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -24,13 +24,13 @@ services:
|
|||
|
||||
redis:
|
||||
restart: always
|
||||
image: eqalpha/keydb:latest
|
||||
image: redis:7-alpine
|
||||
networks:
|
||||
- shonk
|
||||
volumes:
|
||||
- ./redis:/data
|
||||
healthcheck:
|
||||
test: "keydb-cli ping"
|
||||
test: "redis-cli ping"
|
||||
interval: 5s
|
||||
retries: 20
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ pin: "Fixar al perfil"
|
|||
unpin: "Para de fixar del perfil"
|
||||
copyContent: "Copiar el contingut"
|
||||
copyLink: "Copiar l'enllaç"
|
||||
copyLinkRenote: "Copiar l'enllaç de la renota"
|
||||
delete: "Elimina"
|
||||
deleteAndEdit: "Elimina i edita"
|
||||
deleteAndEditConfirm: "Segur que vols eliminar aquesta publicació i editar-la? Perdràs totes les reaccions, impulsos i respostes."
|
||||
|
@ -110,6 +111,8 @@ renoted: "S'ha impulsat"
|
|||
cantRenote: "No es pot impulsar aquesta publicació"
|
||||
cantReRenote: "No es pot impulsar l'impuls."
|
||||
quote: "Cita"
|
||||
inChannelRenote: "Renotar només al Canal"
|
||||
inChannelQuote: "Citar només al Canal"
|
||||
pinnedNote: "Nota fixada"
|
||||
pinned: "Fixar al perfil"
|
||||
you: "Tu"
|
||||
|
@ -127,6 +130,8 @@ unmarkAsSensitive: "Deixar de marcar com a sensible"
|
|||
enterFileName: "Defineix nom del fitxer"
|
||||
mute: "Silencia"
|
||||
unmute: "Deixa de silenciar"
|
||||
renoteMute: "Silenciar Renotes"
|
||||
renoteUnmute: "Treure el silenci de les renotes"
|
||||
block: "Bloqueja"
|
||||
unblock: "Desbloqueja"
|
||||
suspend: "Suspèn"
|
||||
|
@ -136,6 +141,8 @@ unblockConfirm: "Vols desbloquejar-lo?"
|
|||
suspendConfirm: "Estàs segur que vols suspendre aquest compte?"
|
||||
unsuspendConfirm: "Estàs segur que vols treure la suspensió d'aquest compte?"
|
||||
selectList: "Tria una llista"
|
||||
editList: "Editar llista"
|
||||
selectChannel: "Selecciona un canal"
|
||||
selectAntenna: "Tria una antena"
|
||||
editAntenna: "Modificar antena"
|
||||
selectWidget: "Triar un giny"
|
||||
|
|
|
@ -49,7 +49,7 @@ copyLink: "Copy link"
|
|||
copyLinkRenote: "Copy renote link"
|
||||
delete: "Delete"
|
||||
deleteAndEdit: "Delete and edit"
|
||||
deleteAndEditConfirm: "Are you sure you want to redraft this note? This means you will lose all reactions, renotes, and replies to it."
|
||||
deleteAndEditConfirm: "Are you sure you want to redraft this note? This means you will lose all reactions, boosts, and replies to it."
|
||||
addToList: "Add to list"
|
||||
addToAntenna: "Add to antenna"
|
||||
sendMessage: "Send a message"
|
||||
|
@ -710,7 +710,7 @@ manageAccessTokens: "Manage access tokens"
|
|||
accountInfo: "Account Info"
|
||||
notesCount: "Number of notes"
|
||||
repliesCount: "Number of replies sent"
|
||||
renotesCount: "Number of renotes sent"
|
||||
renotesCount: "Number of boosts sent"
|
||||
repliedCount: "Number of replies received"
|
||||
renotedCount: "Number of boosts received"
|
||||
followingCount: "Number of followed accounts"
|
||||
|
@ -1019,7 +1019,7 @@ thisPostMayBeAnnoying: "This note may annoy others."
|
|||
thisPostMayBeAnnoyingHome: "Post to home timeline"
|
||||
thisPostMayBeAnnoyingCancel: "Cancel"
|
||||
thisPostMayBeAnnoyingIgnore: "Post anyway"
|
||||
collapseRenotes: "Collapse renotes you've already seen"
|
||||
collapseRenotes: "Collapse boosts you've already seen"
|
||||
collapseFiles: "Collapse files"
|
||||
autoloadConversation: "Load conversation on replies"
|
||||
internalServerError: "Internal Server Error"
|
||||
|
@ -1070,7 +1070,7 @@ forceShowAds: "Always show ads"
|
|||
addMemo: "Add memo"
|
||||
editMemo: "Edit memo"
|
||||
reactionsList: "Reactions"
|
||||
renotesList: "Renotes"
|
||||
renotesList: "Boosts"
|
||||
notificationDisplay: "Notifications"
|
||||
leftTop: "Top left"
|
||||
rightTop: "Top right"
|
||||
|
@ -1145,7 +1145,7 @@ pastAnnouncements: "Past announcements"
|
|||
youHaveUnreadAnnouncements: "There are unread announcements."
|
||||
useSecurityKey: "Please follow your browser's or device's instructions to use your security- or passkey."
|
||||
replies: "Replies"
|
||||
renotes: "Renotes"
|
||||
renotes: "Boosts"
|
||||
loadReplies: "Show replies"
|
||||
loadConversation: "Show conversation"
|
||||
pinnedList: "Pinned list"
|
||||
|
@ -1158,7 +1158,7 @@ unnotifyNotes: "Stop notifying about new notes"
|
|||
authentication: "Authentication"
|
||||
authenticationRequiredToContinue: "Please authenticate to continue"
|
||||
dateAndTime: "Timestamp"
|
||||
showRenotes: "Show renotes"
|
||||
showRenotes: "Show boosts"
|
||||
edited: "Edited"
|
||||
notificationRecieveConfig: "Notification Settings"
|
||||
mutualFollow: "Mutual follow"
|
||||
|
@ -1201,6 +1201,8 @@ _announcement:
|
|||
readConfirmText: "This will mark the contents of \"{title}\" as read."
|
||||
shouldNotBeUsedToPresentPermanentInfo: "As it may significantly impact the user experience for new users, it is recommended to use notifications in the flow information rather than stock information."
|
||||
dialogAnnouncementUxWarn: "Having two or more dialog-style notifications simultaneously can significantly impact the user experience, so please use them carefully."
|
||||
silence: "No notification"
|
||||
silenceDescription: "Turning this on will skip the notification of this announcement and the user won't need to read it."
|
||||
_initialAccountSetting:
|
||||
accountCreated: "Your account was successfully created!"
|
||||
letsStartAccountSetup: "For starters, let's set up your profile."
|
||||
|
@ -1296,6 +1298,8 @@ _serverSettings:
|
|||
shortName: "Short name"
|
||||
shortNameDescription: "A shorthand for the instance's name that can be displayed if the full official name is long."
|
||||
fanoutTimelineDescription: "Greatly increases performance of timeline retrieval and reduces load on the database when enabled. In exchange, memory usage of Redis will increase. Consider disabling this in case of low server memory or server instability."
|
||||
fanoutTimelineDbFallback: "Fallback to database"
|
||||
fanoutTimelineDbFallbackDescription: "When enabled, fallback processing is performed by making an additional query to the DB if the timeline is not cached. Disabling it further reduces the server load by not performing fallback processing, but limits the range of timelines that can be retrieved."
|
||||
_accountMigration:
|
||||
moveFrom: "Migrate another account to this one"
|
||||
moveFromSub: "Create alias to another account"
|
||||
|
@ -1594,6 +1598,7 @@ _role:
|
|||
gtlAvailable: "Can view the global timeline"
|
||||
ltlAvailable: "Can view the local timeline"
|
||||
canPublicNote: "Can send public notes"
|
||||
canImportNotes: "Can import notes"
|
||||
canInvite: "Can create instance invite codes"
|
||||
inviteLimit: "Invite limit"
|
||||
inviteLimitCycle: "Invite limit cooldown"
|
||||
|
@ -1734,6 +1739,7 @@ _serverDisconnectedBehavior:
|
|||
reload: "Automatically reload"
|
||||
dialog: "Show warning dialog"
|
||||
quiet: "Show unobtrusive warning"
|
||||
disabled: "Disable warning"
|
||||
_channel:
|
||||
create: "Create channel"
|
||||
edit: "Edit channel"
|
||||
|
@ -1757,7 +1763,7 @@ _wordMute:
|
|||
muteWordsDescription: "Separate with spaces for an AND condition or with line breaks for an OR condition."
|
||||
muteWordsDescription2: "Surround keywords with slashes to use regular expressions."
|
||||
_instanceMute:
|
||||
instanceMuteDescription: "This will mute any notes/renotes from the listed instances, including those of users replying to a user from a muted instance."
|
||||
instanceMuteDescription: "This will mute any notes/boosts from the listed instances, including those of users replying to a user from a muted instance."
|
||||
instanceMuteDescription2: "Separate with newlines"
|
||||
title: "Hides notes from listed instances."
|
||||
heading: "List of instances to be muted"
|
||||
|
|
|
@ -616,9 +616,9 @@ notificationType: "Type de notifications"
|
|||
edit: "Editer"
|
||||
emailServer: "Serveur de messagerie"
|
||||
enableEmail: "Activer la distribution de courriel"
|
||||
emailConfigInfo: "Utilisé pour confirmer votre adresse de courriel et la réinitialisation de votre mot de passe en cas d’oubli."
|
||||
emailConfigInfo: "Utilisé pour confirmer votre adresse e-mail et réinitialiser votre mot de passe en cas d’oubli"
|
||||
email: "E-mail "
|
||||
emailAddress: "Adresses e-mail"
|
||||
emailAddress: "Adresse e-mail"
|
||||
smtpConfig: "Paramètres du serveur SMTP"
|
||||
smtpHost: "Serveur distant"
|
||||
smtpPort: "Port"
|
||||
|
@ -764,7 +764,7 @@ inUse: "utilisé"
|
|||
editCode: "Modifier le code"
|
||||
apply: "Appliquer"
|
||||
receiveAnnouncementFromInstance: "Recevoir les messages d'information de l'instance"
|
||||
emailNotification: "Notifications par mail"
|
||||
emailNotification: "Notifications par courriel"
|
||||
publish: "Public"
|
||||
inChannelSearch: "Chercher dans le canal"
|
||||
useReactionPickerForContextMenu: "Clic-droit pour ouvrir le panneau de réactions"
|
||||
|
@ -946,6 +946,7 @@ unsubscribePushNotification: "Désactiver les notifications push"
|
|||
pushNotificationAlreadySubscribed: "Les notifications push sont déjà activées"
|
||||
pushNotificationNotSupported: "Votre navigateur ou votre instance ne prend pas en charge les notifications push"
|
||||
sendPushNotificationReadMessage: "Supprimer les notifications push une fois que les notifications ou messages pertinents ont été lus."
|
||||
sendPushNotificationReadMessageCaption: "Cela peut augmenter la consommation de batterie de votre appareil."
|
||||
windowMaximize: "Maximiser"
|
||||
windowMinimize: "Minimaliser"
|
||||
windowRestore: "Restaurer"
|
||||
|
@ -986,6 +987,7 @@ thisPostMayBeAnnoyingIgnore: "Publier quand-même"
|
|||
collapseRenotes: "Réduire les renotes déjà vues"
|
||||
internalServerError: "Erreur interne du serveur"
|
||||
copyErrorInfo: "Copier les détails de l’erreur"
|
||||
joinThisServer: "S'inscrire à cette instance"
|
||||
exploreOtherServers: "Trouver une autre instance"
|
||||
disableFederationOk: "Désactiver"
|
||||
postToTheChannel: "Publier au canal"
|
||||
|
@ -996,6 +998,7 @@ license: "Licence"
|
|||
myClips: "Mes clips"
|
||||
retryAllQueuesConfirmText: "Cela peut augmenter temporairement la charge du serveur."
|
||||
showClipButtonInNoteFooter: "Ajouter « Clip » au menu d'action de la note"
|
||||
reactionsDisplaySize: "Taille de l'affichage des réactions"
|
||||
noteIdOrUrl: "Identifiant de la note ou URL"
|
||||
video: "Vidéo"
|
||||
videos: "Vidéos"
|
||||
|
@ -1022,6 +1025,7 @@ pleaseAgreeAllToContinue: "Pour continuer, veuillez accepter tous les champs ci-
|
|||
continue: "Continuer"
|
||||
preservedUsernames: "Noms d'utilisateur·rice réservés"
|
||||
archive: "Archive"
|
||||
thisChannelArchived: "Ce canal a été archivé."
|
||||
displayOfNote: "Affichage de la note"
|
||||
initialAccountSetting: "Configuration initiale du profil"
|
||||
youFollowing: "Abonné·e"
|
||||
|
@ -1033,6 +1037,7 @@ failedToPreviewUrl: "Aperçu d'URL échoué"
|
|||
update: "Mettre à jour"
|
||||
later: "Plus tard"
|
||||
goToMisskey: "Retour vers Misskey"
|
||||
installed: "Installé"
|
||||
expirationDate: "Date d’expiration"
|
||||
waitingForMailAuth: "En attente de la vérification de l'adresse courriel"
|
||||
usedAt: "Utilisé le"
|
||||
|
@ -1049,6 +1054,7 @@ pastAnnouncements: "Annonces passées"
|
|||
replies: "Réponses"
|
||||
renotes: "Renotes"
|
||||
loadReplies: "Inclure les réponses"
|
||||
loadConversation: "Afficher la conversation"
|
||||
pinnedList: "Liste épinglée"
|
||||
notifyNotes: "Notifier à propos des nouvelles notes"
|
||||
authentication: "Authentification"
|
||||
|
@ -1082,15 +1088,24 @@ refreshing: "Rafraîchissement..."
|
|||
pullDownToRefresh: "Tirer vers le bas pour rafraîchir"
|
||||
disableStreamingTimeline: "Désactiver les mises à jour en temps réel de la ligne du temps"
|
||||
useGroupedNotifications: "Grouper les notifications"
|
||||
signupPendingError: "Un problème est survenu lors de la vérification de votre adresse e-mail. Le lien a peut-être expiré."
|
||||
cwNotationRequired: "Si « Masquer le contenu » est activé, une description doit être fournie."
|
||||
doReaction: "Réagir"
|
||||
_announcement:
|
||||
readConfirmTitle: "Marquer comme lu ?"
|
||||
shouldNotBeUsedToPresentPermanentInfo: "Puisque cela pourrait nuire considérablement à l'expérience utilisateur pour les nouveaux utilisateurs, il est recommandé d'utiliser les annonces pour afficher des informations temporaires plutôt que des informations persistantes."
|
||||
dialogAnnouncementUxWarn: "Avoir deux ou plus annonces de style dialogue en même temps pourrait nuire considérablement à l'expérience utilisateur. Veuillez les utiliser avec caution."
|
||||
silence: "Ne pas me notifier"
|
||||
silenceDescription: "Si activée, vous ne recevrez pas de notifications sur les annonces et n'aurez pas besoin de les marquer comme lues."
|
||||
_initialAccountSetting:
|
||||
profileSetting: "Paramètres du profil"
|
||||
privacySetting: "Paramètres de confidentialité"
|
||||
initialAccountSettingCompleted: "Configuration du profil terminée avec succès !"
|
||||
youCanContinueTutorial: "Vous pouvez procéder au tutoriel sur l'utilisation de {nom}(Misskey) ou vous arrêter ici et commencer à l'utiliser immédiatement."
|
||||
startTutorial: "Démarrer le tutoriel"
|
||||
skipAreYouSure: "Désirez-vous ignorer la configuration du profil ?"
|
||||
_initialTutorial:
|
||||
launchTutorial: "Visionner le tutoriel"
|
||||
title: "Tutoriel"
|
||||
wellDone: "Bien joué !"
|
||||
skipAreYouSure: "Quitter le tutoriel ?"
|
||||
|
@ -1108,9 +1123,62 @@ _initialTutorial:
|
|||
title: "Qu'est-ce que les réactions ?"
|
||||
description: "Vous pouvez ajouter des « réactions » aux notes. Les réactions vous permettent d'exprimer à l'aise des nuances qui ne peuvent pas être exprimées par des mentions j'aime."
|
||||
letsTryReacting: "Des réactions peuvent être ajoutées en cliquant sur le bouton « + » de la note. Essayez d'ajouter une réaction à cet exemple de note !"
|
||||
reactToContinue: "Ajoutez une réaction pour procéder."
|
||||
reactNotification: "Vous recevez des notifications en temps réel lorsque quelqu'un réagit à votre note."
|
||||
reactDone: "Vous pouvez annuler la réaction en cliquant sur le bouton « - » ."
|
||||
_timeline:
|
||||
title: "Fonctionnement des fils"
|
||||
description1: "Misskey offre plusieurs fils selon l'usage (certains peuvent être désactivés par le serveur)."
|
||||
home: "Vous pouvez voir les notes des utilisateurs auxquels vous êtes abonné·e."
|
||||
local: "Vous pouvez voir les notes de tous les utilisateurs sur cette instance."
|
||||
social: "Les notes des fils principal et local sont affichées."
|
||||
global: "Vous pouvez voir les notes de toutes les instances connectées."
|
||||
description2: "Vous pouvez passer d'un fil à l'autre en haut de l'écran à tout moment."
|
||||
description3: "De plus, il y a les fils des listes et des canaux. Pour plus de détails, consultez {link}."
|
||||
_postNote:
|
||||
title: "Paramètres de la publication de note"
|
||||
description1: "Lorsque vous publiez des notes sur Misskey, diverses options sont disponibles. Voici le formulaire de publication."
|
||||
_visibility:
|
||||
description: "Vous pouvez choisir qui peut voir vos notes."
|
||||
public: "Visible à tous les utilisateurs."
|
||||
home: "Uniquement visible sur le fil principal. Les utilisateurs pourront la voir en visitant ton profil, en s'abonnant à vous et par les renotes."
|
||||
followers: "Uniquement visible à vos abonnés. Elle ne pourra être renotée que par vous-même."
|
||||
direct: "Uniquement visible aux utilisateurs de votre choix. Les récipients seront notifiés. Cette option peut être utilisée comme alternative aux messages directs."
|
||||
doNotSendConfidencialOnDirect1: "Faites attention quand vous envoyez vos informations sensibles !"
|
||||
doNotSendConfidencialOnDirect2: "Les administrateurs de l'instance destinataire peuvent voir toutes les notes publiées. Soyez prudent·e avec vos informations sensibles quand vous envoyez des notes directes aux utilisateurs dont vous ne vous fiez pas aux instances."
|
||||
localOnly: "Désactiver la fédération de la note aux autres instances. Les utilisateurs des autres instances ne pourront pas voir directement la note quelle que soit l'étendue de la publication mentionnée ci-dessus."
|
||||
_cw:
|
||||
title: "Masquer le contenu (CW)"
|
||||
description: "Au lieu du corps du texte, le contenu du champ « commentaires » s'affichera. Appuyez sur « afficher le contenu » pour voir le corps du texte."
|
||||
_exampleNote:
|
||||
cw: "Attention : cela vous donnera faim !"
|
||||
note: "J'ai mangé un beignet enrobé de chocolat 🍩😋"
|
||||
useCases: "Utilisé pour désigner certaines notes selon les règles du serveur ou pour cacher des spoilers ou des textes sensibles."
|
||||
_howToMakeAttachmentsSensitive:
|
||||
title: "Comment marquer un fichier joint comme sensible ?"
|
||||
description: "Attachez un drapeau « sensible » aux fichiers joints selon les règles du serveur ou si vous ne voulez pas que le fichier soit vu directement."
|
||||
tryThisFile: "Essayez de marquer l'image jointe à ce formulaire de publication comme sensible !"
|
||||
_exampleNote:
|
||||
note: "Oups, j'ai échoué à ouvrir le couvercle du natto..."
|
||||
method: "Pour marquer un fichier joint comme sensible, cliquez sur la vignette du fichier, ouvrez le menu et cliquez sur « marquer comme sensible » ."
|
||||
sensitiveSucceeded: "Quand vous joignez des fichiers, veuillez indiquer la sensibilité selon les règles du serveur."
|
||||
doItToContinue: "Marquez le fichier joint comme sensible pour procéder."
|
||||
_done:
|
||||
title: "Le tutoriel est terminé ! 🎉"
|
||||
description: "Les fonctionnalités introduites ici ne sont que quelques-unes. Pour savoir plus sur l'utilisation de Misskey, veuillez consulter {lien}."
|
||||
_timelineDescription:
|
||||
home: "Sur le fil principal, vous pouvez voir les notes des utilisateurs auxquels vous êtes abonné·e."
|
||||
local: "Sur le fil local, vous pouvez voir les notes de tous les utilisateurs sur cette instance."
|
||||
social: "Sur le fil social, les notes des fils principal et local sont affichées."
|
||||
global: "Sur le fil global, vous pouvez voir les notes de toutes les instances connectées."
|
||||
_serverSettings:
|
||||
iconUrl: "URL de l’icône"
|
||||
appIconResolutionMustBe: "La résolution doit être au moins {resolution}."
|
||||
shortName: "Nom court"
|
||||
shortNameDescription: "Si le nom officiel de l'instance est long, cette abréviation peut être affichée à la place."
|
||||
fanoutTimelineDescription: "Si activée, la performance de la récupération de la chronologie augmentera considérablement et la charge sur la base de données sera réduite. En revanche, l'utilisation de la mémoire de Redis augmentera. Considérez désactiver cette option si le serveur est bas en mémoire ou instable."
|
||||
fanoutTimelineDbFallback: "Recours à la base de données"
|
||||
fanoutTimelineDbFallbackDescription: "Si activée, une demande supplémentaire à la base de données est effectuée comme solution de rechange quand le fil n'est pas mis en cache. Si désactivée, la demande à la base de données n'est pas effectuée, ce qui réduit davantage la charge du serveur mais limite l'étendue du fil récupérable."
|
||||
_accountMigration:
|
||||
moveFrom: "Migrer un autre compte vers le présent compte"
|
||||
moveFromSub: "Créer un alias vers un autre compte"
|
||||
|
@ -1221,7 +1289,7 @@ _achievements:
|
|||
_viewInstanceChart:
|
||||
title: "Analyste"
|
||||
_outputHelloWorldOnScratchpad:
|
||||
title: "Bonjour tout le monde !"
|
||||
title: "Hello, world!"
|
||||
_open3windows:
|
||||
title: "Multi-fenêtres"
|
||||
_driveFolderCircularReference:
|
||||
|
@ -1243,6 +1311,12 @@ _achievements:
|
|||
flavor: "Attendez une minute, vous êtes sur le mauvais site web ?"
|
||||
_brainDiver:
|
||||
flavor: "Misskey-Misskey La-Tu-Ma"
|
||||
_smashTestNotificationButton:
|
||||
title: "Débordement de tests"
|
||||
description: "Détruire le bouton de test de notifications dans un intervalle extrêmement court"
|
||||
_tutorialCompleted:
|
||||
title: "Diplôme de la course élémentaire de Misskey"
|
||||
description: "Terminer le tutoriel"
|
||||
_role:
|
||||
new: "Nouveau rôle"
|
||||
edit: "Modifier le rôle"
|
||||
|
@ -1268,6 +1342,7 @@ _role:
|
|||
canManageCustomEmojis: "Gestion des émojis personnalisés"
|
||||
canManageAvatarDecorations: "Gestion des décorations d'avatar"
|
||||
wordMuteMax: "Nombre maximal de caractères dans le filtre de mots"
|
||||
canUseTranslator: "Usage de la fonctionnalité de traduction"
|
||||
_sensitiveMediaDetection:
|
||||
description: "L'apprentissage automatique peut être utilisé pour détecter automatiquement les médias sensibles à modérer. La sollicitation des serveurs augmente légèrement."
|
||||
sensitivity: "Sensibilité de la détection"
|
||||
|
@ -1304,7 +1379,7 @@ _ad:
|
|||
adsSettings: "Paramètres des publicités"
|
||||
notesPerOneAd: "Intervalle de diffusion de publicités lors de la mise à jour en temps réel (nombre de notes par publicité)"
|
||||
setZeroToDisable: "Mettre cette valeur à 0 pour désactiver la diffusion de publicités lors de la mise à jour en temps réel"
|
||||
adsTooClose: "L'expérience de l'utilisateur peut être gravement compromise par un intervalle de diffusion de publicités extrêmement court."
|
||||
adsTooClose: "L'expérience utilisateur peut être gravement compromise par un intervalle de diffusion de publicités extrêmement court."
|
||||
_forgotPassword:
|
||||
enterEmail: "Entrez ici l'adresse e-mail que vous avez enregistrée pour votre compte. Un lien vous permettant de réinitialiser votre mot de passe sera envoyé à cette adresse."
|
||||
ifNoEmail: "Si vous n'avez pas enregistré d'adresse e-mail, merci de contacter l'administrateur·rice de votre instance."
|
||||
|
@ -1380,6 +1455,7 @@ _channel:
|
|||
notesCount: "{n} Notes"
|
||||
nameAndDescription: "Nom et description"
|
||||
nameOnly: "Nom seulement"
|
||||
allowRenoteToExternal: "Permettre la renote et la citation hors du canal"
|
||||
_menuDisplay:
|
||||
sideFull: "Latéral"
|
||||
sideIcon: "Latéral (icônes)"
|
||||
|
@ -1585,7 +1661,7 @@ _widgets:
|
|||
chooseList: "Sélectionner une liste"
|
||||
_cw:
|
||||
hide: "Masquer"
|
||||
show: "Afficher plus …"
|
||||
show: "Afficher le contenu"
|
||||
chars: "{count} caractères"
|
||||
files: "{count} fichiers"
|
||||
_poll:
|
||||
|
@ -1754,6 +1830,7 @@ _notification:
|
|||
unreadAntennaNote: "Antenne {name}"
|
||||
emptyPushNotificationMessage: "Les notifications push ont été mises à jour"
|
||||
achievementEarned: "Accomplissement"
|
||||
testNotification: "Tester la notification"
|
||||
reactedBySomeUsers: "{n} utilisateur·rice·s ont réagi"
|
||||
renotedBySomeUsers: "{n} utilisateur·rice·s ont renoté"
|
||||
followedBySomeUsers: "{n} utilisateur·rice·s se sont abonné·e·s à vous"
|
||||
|
@ -1798,7 +1875,7 @@ _deck:
|
|||
tl: "Fil"
|
||||
antenna: "Antennes"
|
||||
list: "Listes"
|
||||
channel: "Canaux"
|
||||
channel: "Canal"
|
||||
mentions: "Mentions"
|
||||
direct: "Direct"
|
||||
_webhookSettings:
|
||||
|
|
13
locales/index.d.ts
vendored
13
locales/index.d.ts
vendored
|
@ -1317,6 +1317,8 @@ export interface Locale {
|
|||
"shortName": string;
|
||||
"shortNameDescription": string;
|
||||
"fanoutTimelineDescription": string;
|
||||
"fanoutTimelineDbFallback": string;
|
||||
"fanoutTimelineDbFallbackDescription": string;
|
||||
};
|
||||
"_accountMigration": {
|
||||
"moveFrom": string;
|
||||
|
@ -1696,6 +1698,7 @@ export interface Locale {
|
|||
"gtlAvailable": string;
|
||||
"ltlAvailable": string;
|
||||
"canPublicNote": string;
|
||||
"canImportNotes": string;
|
||||
"canInvite": string;
|
||||
"inviteLimit": string;
|
||||
"inviteLimitCycle": string;
|
||||
|
@ -1856,6 +1859,7 @@ export interface Locale {
|
|||
"reload": string;
|
||||
"dialog": string;
|
||||
"quiet": string;
|
||||
"disabled": string;
|
||||
};
|
||||
"_channel": {
|
||||
"create": string;
|
||||
|
@ -1980,6 +1984,15 @@ export interface Locale {
|
|||
"yearsAgo": string;
|
||||
"invalid": string;
|
||||
};
|
||||
"_timeIn": {
|
||||
"seconds": string;
|
||||
"minutes": string;
|
||||
"hours": string;
|
||||
"days": string;
|
||||
"weeks": string;
|
||||
"months": string;
|
||||
"years": string;
|
||||
};
|
||||
"_time": {
|
||||
"second": string;
|
||||
"minute": string;
|
||||
|
|
|
@ -241,7 +241,7 @@ publishing: "Pubblicazione"
|
|||
notResponding: "Nessuna risposta"
|
||||
instanceFollowing: "Seguiti dall'istanza"
|
||||
instanceFollowers: "Follower dell'istanza"
|
||||
instanceUsers: "Utenti dell'istanza"
|
||||
instanceUsers: "Profili nell'istanza"
|
||||
changePassword: "Aggiorna Password"
|
||||
security: "Sicurezza"
|
||||
retypedNotMatch: "Le password non corrispondono."
|
||||
|
@ -362,8 +362,8 @@ inMb: "in Megabytes"
|
|||
bannerUrl: "URL dell'immagine d'intestazione"
|
||||
backgroundImageUrl: "URL dello sfondo"
|
||||
basicInfo: "Informazioni fondamentali"
|
||||
pinnedUsers: "Utenti in evidenza"
|
||||
pinnedUsersDescription: "Elenca gli/le utenti che vuoi fissare in cima alla pagina \"Esplora\", un@ per riga."
|
||||
pinnedUsers: "Profili in evidenza"
|
||||
pinnedUsersDescription: "Elenca i profili delle persone che vuoi fissare nella pagina \"Esplora\"."
|
||||
pinnedPages: "Pagine in evidenza"
|
||||
pinnedPagesDescription: "Specifica il percorso delle pagine che vuoi fissare in cima alla pagina dell'istanza. Una pagina per riga."
|
||||
pinnedClipId: "ID della Clip in evidenza"
|
||||
|
@ -391,7 +391,7 @@ antennaKeywordsDescription: "Sparando con uno spazio indichi la condizione E (an
|
|||
notifyAntenna: "Invia notifiche delle nuove note"
|
||||
withFileAntenna: "Solo note con file in allegato"
|
||||
enableServiceworker: "Abilita ServiceWorker"
|
||||
antennaUsersDescription: "Inserisci solo un nome utente per riga"
|
||||
antennaUsersDescription: "Elenca un nome utente per riga"
|
||||
caseSensitive: "Sensibile alla distinzione tra maiuscole e minuscole"
|
||||
withReplies: "Includere le risposte"
|
||||
connectedTo: "Connessione ai seguenti profili:"
|
||||
|
@ -401,11 +401,11 @@ silence: "Silenzia"
|
|||
silenceConfirm: "Vuoi davvero silenziare questo profilo?"
|
||||
unsilence: "Riattiva"
|
||||
unsilenceConfirm: "Vuoi davvero riattivare questo profilo?"
|
||||
popularUsers: "Utenti popolari"
|
||||
popularUsers: "Profili popolari"
|
||||
recentlyUpdatedUsers: "Utenti attivi di recente"
|
||||
recentlyRegisteredUsers: "Utenti registrati di recente"
|
||||
recentlyDiscoveredUsers: "Utenti scoperti di recente"
|
||||
exploreUsersCount: "Ci sono {count} utenti"
|
||||
recentlyRegisteredUsers: "Profili iscritti di recente"
|
||||
recentlyDiscoveredUsers: "Profili scoperti di recente"
|
||||
exploreUsersCount: "Ci sono {count} profili"
|
||||
exploreFediverse: "Esplora il Fediverso"
|
||||
popularTags: "Tag di tendenza"
|
||||
userList: "Liste"
|
||||
|
@ -415,8 +415,8 @@ administrator: "Amministratore"
|
|||
token: "Token"
|
||||
2fa: "Autenticazione a due fattori"
|
||||
setupOf2fa: "Impostare l'autenticazione a due fattori"
|
||||
totp: "App di autenticazione"
|
||||
totpDescription: "Inserisci un codice OTP tramite un'app di autenticazione"
|
||||
totp: "App di autenticazione a due fattori (2FA/MFA)"
|
||||
totpDescription: "Puoi autenticarti inserendo un codice OTP tramite la tua App di autenticazione a due fattori (2FA/MFA)"
|
||||
moderator: "Moderatore"
|
||||
moderation: "moderazione"
|
||||
moderationNote: "Promemoria di moderazione"
|
||||
|
@ -463,7 +463,7 @@ invitations: "Invita"
|
|||
invitationCode: "Codice di invito"
|
||||
checking: "Confermando"
|
||||
available: "Disponibile"
|
||||
unavailable: "Il nome utente è già in uso"
|
||||
unavailable: "Non puoi usarlo"
|
||||
usernameInvalidFormat: "Il nome utente deve avere solo caratteri alfanumerici e trattino basso '_'"
|
||||
tooShort: "Troppo breve"
|
||||
tooLong: "Troppo lungo"
|
||||
|
@ -563,13 +563,13 @@ scratchpadDescription: "Lo Scratchpad offre un ambiente per esperimenti di AiScr
|
|||
output: "Uscita"
|
||||
script: "Script"
|
||||
disablePagesScript: "Disabilita AiScript nelle pagine"
|
||||
updateRemoteUser: "Aggiornare le informazioni di utente remot@"
|
||||
updateRemoteUser: "Aggiorna le informazioni dal profilo remoto"
|
||||
deleteAllFiles: "Elimina tutti i file"
|
||||
deleteAllFilesConfirm: "Vuoi davvero eliminare tutti i file?"
|
||||
removeAllFollowing: "Annulla tutti i follow"
|
||||
removeAllFollowingDescription: "Cancella tutti i follows del server {host}. Per favore, esegui se, ad esempio, l'istanza non esiste più."
|
||||
userSuspended: "L'utente è in sospensione"
|
||||
userSilenced: "L'utente è silenziat@."
|
||||
userSilenced: "Profilo silente."
|
||||
yourAccountSuspendedTitle: "Questo profilo è sospeso"
|
||||
yourAccountSuspendedDescription: "Questo profilo è stato sospeso a causa di una violazione del regolamento. Per informazioni, contattare l'amministrazione. Si prega di non creare un nuovo account."
|
||||
tokenRevoked: "Il token non è valido"
|
||||
|
@ -741,8 +741,8 @@ reloadToApplySetting: "Le tue preferenze verranno impostate dopo il ricaricament
|
|||
needReloadToApply: "È necessario riavviare per rendere effettive le modifiche."
|
||||
showTitlebar: "Visualizza la barra del titolo"
|
||||
clearCache: "Svuota la cache"
|
||||
onlineUsersCount: "{n} utenti online"
|
||||
nUsers: "{n} utenti"
|
||||
onlineUsersCount: "{n} persone online"
|
||||
nUsers: "{n} profili"
|
||||
nNotes: "{n}Note"
|
||||
sendErrorReports: "Invia segnalazioni di errori"
|
||||
sendErrorReportsDescription: "Quando abilitato, se si verifica un problema, informazioni dettagliate sugli errori verranno condivise con Misskey in modo da aiutare a migliorare la qualità del software.\nCiò include informazioni come la versione del sistema operativo, il tipo di navigatore web che usi, la cronologia delle attività, ecc."
|
||||
|
@ -788,7 +788,7 @@ addDescription: "Aggiungi descrizione"
|
|||
userPagePinTip: "Qui puoi appuntare note, premendo \"Fissa sul profilo\" nel menù delle singole note."
|
||||
notSpecifiedMentionWarning: "Sono stati menzionati profili non inclusi fra i destinatari"
|
||||
info: "Informazioni"
|
||||
userInfo: "Informazioni utente"
|
||||
userInfo: "Informazioni sul profilo"
|
||||
unknown: "Sconosciuto"
|
||||
onlineStatus: "Stato di connessione"
|
||||
hideOnlineStatus: "Modalità invisibile"
|
||||
|
@ -853,7 +853,7 @@ lastCommunication: "La comunicazione più recente"
|
|||
resolved: "Risolto"
|
||||
unresolved: "Non risolto"
|
||||
breakFollow: "Non farti più seguire"
|
||||
breakFollowConfirm: "Vuoi davvero smettere di seguire questo profilo?"
|
||||
breakFollowConfirm: "Vuoi davvero che questo profilo smetta di seguirti?"
|
||||
itsOn: "Abilitato"
|
||||
itsOff: "Disabilitato"
|
||||
on: "Acceso"
|
||||
|
@ -911,7 +911,7 @@ noEmailServerWarning: "Il server di posta non è configurato."
|
|||
thereIsUnresolvedAbuseReportWarning: "Ci sono report non evasi."
|
||||
recommended: "Consigliato"
|
||||
check: "Verifica"
|
||||
driveCapOverrideLabel: "Modificare il limite di spazio per questo utente"
|
||||
driveCapOverrideLabel: "Modificare la capienza del Drive per questo profilo"
|
||||
driveCapOverrideCaption: "Se viene specificato meno di 0, viene annullato."
|
||||
requireAdminForView: "Per visualizzarli, è necessario aver effettuato l'accesso con un profilo amministratore."
|
||||
isSystemAccount: "Questi profili vengono creati e gestiti automaticamente dal sistema"
|
||||
|
@ -1169,6 +1169,8 @@ _announcement:
|
|||
readConfirmText: "Hai già letto \"{title}˝?"
|
||||
shouldNotBeUsedToPresentPermanentInfo: "Ti consigliamo di utilizzare gli annunci per pubblicare informazioni tempestive e limitate nel tempo, anziché informazioni importanti a lungo andare nel tempo, poiché potrebbero risultare difficili da ritrovare e peggiorare la fruibilità del servizio, specialmente alle nuove persone iscritte."
|
||||
dialogAnnouncementUxWarn: "Ti consigliamo di usarli con cautela, poiché è molto probabile che avere più di un annuncio in stile \"finestra di dialogo\" peggiori sensibilmente la fruibilità del servizio, specialmente alle nuove persone iscritte."
|
||||
silence: "Silenzia gli annunci"
|
||||
silenceDescription: "Se attivi questa opzione, non riceverai notifiche sugli annunci, evitando di contrassegnarle come già lette."
|
||||
_initialAccountSetting:
|
||||
accountCreated: "Il tuo profilo è stato creato!"
|
||||
letsStartAccountSetup: "Per iniziare, impostiamo il tuo profilo."
|
||||
|
@ -1822,14 +1824,14 @@ _time:
|
|||
day: "giorni"
|
||||
_2fa:
|
||||
alreadyRegistered: "La configurazione è stata già completata."
|
||||
registerTOTP: "Registra un'app di autenticazione"
|
||||
step1: "Innanzitutto, installare sul dispositivo un'applicazione di autenticazione come {a} o {b}."
|
||||
step2: "Quindi, scansionare il codice QR visualizzato con l'app."
|
||||
registerTOTP: "Registra una App di autenticazione a due fattori (2FA/MFA)"
|
||||
step1: "Innanzitutto, installa sul dispositivo un'App di autenticazione come {a} o {b}."
|
||||
step2: "Quindi, tramite la App installata, scansiona questo codice QR."
|
||||
step2Click: "Cliccando sul codice QR, puoi registrarlo con l'app di autenticazione o il portachiavi installato sul tuo dispositivo."
|
||||
step2Uri: "Inserisci il seguente URL se desideri utilizzare una App per PC"
|
||||
step3Title: "Inserisci il codice di verifica"
|
||||
step3: "Inserite il token visualizzato nell'app e il gioco è fatto."
|
||||
setupCompleted: "Impostazione completata"
|
||||
setupCompleted: "Impostazione completata! 🎉"
|
||||
step4: "D'ora in poi, quando si accede, si inserisce il token nello stesso modo."
|
||||
securityKeyNotSupported: "Il tuo browser non supporta le chiavi di sicurezza."
|
||||
registerTOTPBeforeKey: "Ti occorre un'app di autenticazione con OTP, prima di registrare la chiave di sicurezza."
|
||||
|
@ -1874,8 +1876,8 @@ _permissions:
|
|||
"write:pages": "Gestire pagine"
|
||||
"read:page-likes": "Visualizzare i \"Mi piace\" di pagine"
|
||||
"write:page-likes": "Gestire i \"Mi piace\" di pagine"
|
||||
"read:user-groups": "Vedi gruppi di utenti"
|
||||
"write:user-groups": "Gestisci gruppi di utenti"
|
||||
"read:user-groups": "Vedere i gruppi di utenti"
|
||||
"write:user-groups": "Gestire i gruppi di utenti"
|
||||
"read:channels": "Visualizza canali"
|
||||
"write:channels": "Gerisci canali"
|
||||
"read:gallery": "Visualizza la galleria."
|
||||
|
@ -1930,7 +1932,7 @@ _widgets:
|
|||
postForm: "Finestra di pubblicazione"
|
||||
slideshow: "Diapositive"
|
||||
button: "Pulsante"
|
||||
onlineUsers: "Utenti online"
|
||||
onlineUsers: "Persone online"
|
||||
jobQueue: "Coda di lavoro"
|
||||
serverMetric: "Statistiche server"
|
||||
aiscript: "Console AiScript"
|
||||
|
@ -1942,7 +1944,7 @@ _widgets:
|
|||
clicker: "Cliccaggio"
|
||||
_cw:
|
||||
hide: "Nascondere"
|
||||
show: "Attenzione: continua la lettura"
|
||||
show: "Continua la lettura..."
|
||||
chars: "{count} caratteri"
|
||||
files: "{count} file"
|
||||
_poll:
|
||||
|
@ -2028,7 +2030,7 @@ _charts:
|
|||
storageUsageTotal: "Utilizzo totale dell'immagazzinamento"
|
||||
_instanceCharts:
|
||||
requests: "Richieste"
|
||||
users: "Variazione del numero di utenti"
|
||||
users: "Variazione del numero di profili"
|
||||
usersTotal: "Totale cumulativo di utenti"
|
||||
notes: "Variazione del numero di note"
|
||||
notesTotal: "Totale cumulato di note"
|
||||
|
@ -2089,8 +2091,8 @@ _pages:
|
|||
font: "Tipo di carattere"
|
||||
fontSerif: "Serif"
|
||||
fontSansSerif: "Sans serif"
|
||||
eyeCatchingImageSet: "Imposta un'immagine attrattiva"
|
||||
eyeCatchingImageRemove: "Elimina l'anteprima immagine"
|
||||
eyeCatchingImageSet: "Imposta un'immagine attraente"
|
||||
eyeCatchingImageRemove: "Elimina immagine attraente"
|
||||
chooseBlock: "Aggiungi blocco"
|
||||
selectType: "Seleziona tipo"
|
||||
contentBlocks: "Contenuto"
|
||||
|
|
|
@ -1304,6 +1304,8 @@ _serverSettings:
|
|||
shortName: "略称"
|
||||
shortNameDescription: "サーバーの正式名称が長い場合に、代わりに表示することのできる略称や通称。"
|
||||
fanoutTimelineDescription: "有効にすると、各種タイムラインを取得する際のパフォーマンスが大幅に向上し、データベースへの負荷を軽減することが可能です。ただし、Redisのメモリ使用量は増加します。サーバーのメモリ容量が少ない場合、または動作が不安定な場合は無効にすることができます。"
|
||||
fanoutTimelineDbFallback: "データベースへのフォールバック"
|
||||
fanoutTimelineDbFallbackDescription: "有効にすると、タイムラインがキャッシュされていない場合にDBへ追加で問い合わせを行うフォールバック処理を行います。無効にすると、フォールバック処理を行わないことでさらにサーバーの負荷を軽減することができますが、タイムラインが取得できる範囲に制限が生じます。"
|
||||
|
||||
_accountMigration:
|
||||
moveFrom: "別のアカウントからこのアカウントに移行"
|
||||
|
@ -1605,6 +1607,7 @@ _role:
|
|||
gtlAvailable: "グローバルタイムラインの閲覧"
|
||||
ltlAvailable: "ローカルタイムラインの閲覧"
|
||||
canPublicNote: "パブリック投稿の許可"
|
||||
canImportNotes: "ノートのインポートが可能"
|
||||
canInvite: "サーバー招待コードの発行"
|
||||
inviteLimit: "招待コードの作成可能数"
|
||||
inviteLimitCycle: "招待コードの発行間隔"
|
||||
|
@ -1761,6 +1764,7 @@ _serverDisconnectedBehavior:
|
|||
reload: "自動でリロード"
|
||||
dialog: "ダイアログで警告"
|
||||
quiet: "控えめに警告"
|
||||
disabled: "警告を無効にする"
|
||||
|
||||
_channel:
|
||||
create: "チャンネルを作成"
|
||||
|
@ -1885,6 +1889,15 @@ _ago:
|
|||
yearsAgo: "{n}年前"
|
||||
invalid: "ありません"
|
||||
|
||||
_timeIn:
|
||||
seconds: "{n}秒後"
|
||||
minutes: "{n}分後"
|
||||
hours: "{n}時間後"
|
||||
days: "{n}日後"
|
||||
weeks: "{n}週間後"
|
||||
months: "{n}ヶ月後"
|
||||
years: "{n}年後"
|
||||
|
||||
_time:
|
||||
second: "秒"
|
||||
minute: "分"
|
||||
|
|
|
@ -981,6 +981,7 @@ assign: "アサイン"
|
|||
unassign: "アサインを解除"
|
||||
color: "色"
|
||||
manageCustomEmojis: "カスタム絵文字の管理"
|
||||
manageAvatarDecorations: "アバターを飾るモンの管理"
|
||||
youCannotCreateAnymore: "これ以上作れなさそうやわ"
|
||||
cannotPerformTemporary: "一時的に利用できへんで"
|
||||
cannotPerformTemporaryDescription: "操作回数が制限を超えたから一時的に利用できへんくなったで。ちょっと時間置いてからもう一回やってやー。"
|
||||
|
@ -1151,6 +1152,14 @@ detach: ""
|
|||
angle: ""
|
||||
flip: "反転"
|
||||
showAvatarDecorations: ""
|
||||
releaseToRefresh: "離してリロード"
|
||||
refreshing: "リロード中"
|
||||
pullDownToRefresh: "引っ張ってリロードするで"
|
||||
disableStreamingTimeline: "タイムラインのリアルタイム更新をやめるで"
|
||||
useGroupedNotifications: "通知をグルーピングしてだすで"
|
||||
signupPendingError: "メールアドレスの確認中に問題が起こってえらいこっちゃ。リンクの有効期限が切れてるかもやで"
|
||||
cwNotationRequired: "「内容を隠す」がオンの場合は注釈の記述が必要やで。"
|
||||
doReaction: "ツッコミすんで"
|
||||
_announcement:
|
||||
forExistingUsers: "もうおるユーザーのみ"
|
||||
forExistingUsersDescription: "有効にすると、このお知らせ作成時点でおるユーザーにのみお知らせが表示されます。無効にすると、このお知らせ作成後にアカウントを作成したユーザーにもお知らせが表示されます。"
|
||||
|
@ -1160,6 +1169,10 @@ _announcement:
|
|||
tooManyActiveAnnouncementDescription: "アクティブなお知らせが多いため、UXが低下する可能性があります。終了したお知らせはアーカイブすることを検討した方がええよ。"
|
||||
readConfirmTitle: "既読にしてええんやな?"
|
||||
readConfirmText: "「{title}」の内容を読み、既読にします。"
|
||||
shouldNotBeUsedToPresentPermanentInfo: "新規ユーザーのUXを損ねやすいから、お知らせはストック情報やのうてフロー情報の掲示に使った方がええで。"
|
||||
dialogAnnouncementUxWarn: "ダイアログ形式のお知らせが同時に2つ以上ある場合、UXに悪影響を及ぼす可能性が高くなるから、使用は慎重にすんのがおすすめやで。"
|
||||
silence: "通知せんで"
|
||||
silenceDescription: "オンにすると、このお知らせは通知されないで、既読にする必要もなくなるで。"
|
||||
_initialAccountSetting:
|
||||
accountCreated: "アカウント作り終わったで。"
|
||||
letsStartAccountSetup: "アカウントの初期設定をしよか。"
|
||||
|
@ -1172,8 +1185,24 @@ _initialAccountSetting:
|
|||
pushNotificationDescription: "プッシュ通知を有効にすると{name}の通知をあんたのデバイスで受け取れるで。"
|
||||
initialAccountSettingCompleted: "初期設定が終わったで。"
|
||||
haveFun: "{name}、楽しんでな~"
|
||||
youCanContinueTutorial: "このまま{name}(Misskey)の使い方のチュートリアルに進めるけど、ここで中断してすぐに使い始めることもできるで。"
|
||||
startTutorial: "チュートリアルを開始するで"
|
||||
skipAreYouSure: "初期設定飛ばすか?"
|
||||
laterAreYouSure: "初期設定あとでやり直すん?"
|
||||
_initialTutorial:
|
||||
launchTutorial: "チュートリアルを見るで"
|
||||
title: "チュートリアルやで"
|
||||
wellDone: "やるやん"
|
||||
skipAreYouSure: "チュートリアルをやめるか?"
|
||||
_landing:
|
||||
title: "チュートリアルによう来たな"
|
||||
description: "ここでは、Misskeyの基本的な使い方や機能を確認できるで。"
|
||||
_note:
|
||||
title: "ノートってなんや?"
|
||||
description: "Misskeyでの投稿は「ノート」って呼ばれてるで。ノートはタイムラインに時系列で並んでいて、リアルタイムで更新されてるで。"
|
||||
reply: "返信することもできるで。返信に対しての返信も可能で、スレッドのように会話を続けることもできるで。"
|
||||
renote: "そのノートを自分のタイムラインに流して共有することもできるで。テキストを追加して引用することもできるで。"
|
||||
reaction: "ツッコミをつけることもできるで。細かいことは次のページで解説するで。"
|
||||
_serverRules:
|
||||
description: "新規登録前に見せる、サーバーの簡潔なルールを設定すんで。内容は使うための決め事の要約とすることを推奨するわ。"
|
||||
_serverSettings:
|
||||
|
@ -1486,6 +1515,7 @@ _role:
|
|||
inviteLimitCycle: "招待コードの発行間隔"
|
||||
inviteExpirationTime: "招待コードの有効期限"
|
||||
canManageCustomEmojis: "カスタム絵文字の管理"
|
||||
canManageAvatarDecorations: "アバターを飾るモンの管理"
|
||||
driveCapacity: "ドライブ容量"
|
||||
alwaysMarkNsfw: "勝手にファイルにNSFWをくっつける"
|
||||
pinMax: "ノートのピン留めの最大数"
|
||||
|
|
|
@ -113,7 +113,7 @@ cantReRenote: "리노트를 리노트할 수 없습니다."
|
|||
quote: "인용"
|
||||
inChannelRenote: "채널 내 리노트"
|
||||
inChannelQuote: "채널 내 인용"
|
||||
pinnedNote: "고정해놓은 노트"
|
||||
pinnedNote: "고정된 노트"
|
||||
pinned: "프로필에 고정"
|
||||
you: "당신"
|
||||
clickToShow: "클릭하여 보기"
|
||||
|
@ -195,6 +195,7 @@ perHour: "1시간마다"
|
|||
perDay: "1일마다"
|
||||
stopActivityDelivery: "액티비티 보내지 않기"
|
||||
blockThisInstance: "이 서버를 차단"
|
||||
silenceThisInstance: "서버를 사일런스"
|
||||
operations: "작업"
|
||||
software: "소프트웨어"
|
||||
version: "버전"
|
||||
|
@ -214,6 +215,8 @@ clearCachedFiles: "캐시 비우기"
|
|||
clearCachedFilesConfirm: "캐시된 리모트 파일을 모두 삭제하시겠습니까?"
|
||||
blockedInstances: "차단된 서버"
|
||||
blockedInstancesDescription: "차단하려는 서버의 호스트 이름을 줄바꿈으로 구분하여 설정합니다. 차단된 인스턴스는 이 인스턴스와 통신할 수 없게 됩니다."
|
||||
silencedInstances: "사일런스한 서버"
|
||||
silencedInstancesDescription: "사일런스하려는 서버의 호스트명을 한 줄에 하나씩 입력합니다. 사일런스된 서버에 소속된 유저는 모두 '사일런스'된 상태로 취급되며, 이 서버로부터의 팔로우가 프로필 설정과 무관하게 승인제로 변경되고, 팔로워가 아닌 로컬 유저에게는 멘션할 수 없게 됩니다. 정지된 서버에는 적용되지 않습니다."
|
||||
muteAndBlock: "뮤트 및 차단"
|
||||
mutedUsers: "뮤트한 유저"
|
||||
blockedUsers: "차단한 유저"
|
||||
|
@ -364,7 +367,7 @@ pinnedUsersDescription: "\"발견하기\" 페이지 등에 고정하고 싶은
|
|||
pinnedPages: "고정한 페이지"
|
||||
pinnedPagesDescription: "서버의 대문에 고정하고 싶은 페이지의 경로를 한 줄에 하나씩 적습니다."
|
||||
pinnedClipId: "고정할 클립의 ID"
|
||||
pinnedNotes: "고정해놓은 노트"
|
||||
pinnedNotes: "고정된 노트"
|
||||
hcaptcha: "hCaptcha"
|
||||
enableHcaptcha: "hCaptcha 활성화"
|
||||
hcaptchaSiteKey: "사이트 키"
|
||||
|
@ -976,6 +979,7 @@ assign: "할당"
|
|||
unassign: "할당 취소"
|
||||
color: "색"
|
||||
manageCustomEmojis: "커스텀 이모지 관리"
|
||||
manageAvatarDecorations: "아바타 꾸미기 관리"
|
||||
youCannotCreateAnymore: "더 이상 생성할 수 없습니다."
|
||||
cannotPerformTemporary: "일시적으로 사용할 수 없음"
|
||||
cannotPerformTemporaryDescription: "조작 횟수 제한을 초과하여 일시적으로 사용이 불가합니다. 잠시 후 다시 시도해 주세요."
|
||||
|
@ -1114,16 +1118,19 @@ replies: "답글"
|
|||
renotes: "리노트"
|
||||
loadReplies: "답글 보기"
|
||||
loadConversation: "대화 보기"
|
||||
pinnedList: "고정해놓은 리스트"
|
||||
pinnedList: "고정된 리스트"
|
||||
keepScreenOn: "기기 화면을 항상 켜기"
|
||||
verifiedLink: "이 링크의 소유자임이 확인되었습니다."
|
||||
notifyNotes: "새 노트 알림 켜기"
|
||||
unnotifyNotes: "새 노트 알림 끄기"
|
||||
authentication: "인증"
|
||||
authenticationRequiredToContinue: "계속하려면 인증하십시오"
|
||||
dateAndTime: "일시"
|
||||
showRenotes: "리노트 표시"
|
||||
edited: "수정됨"
|
||||
notificationRecieveConfig: "알림 설정"
|
||||
mutualFollow: "맞팔로우"
|
||||
fileAttachedOnly: "미디어를 포함한 노트만"
|
||||
showRepliesToOthersInTimeline: "타임라인에 다른 사람에게 보내는 답글을 포함"
|
||||
hideRepliesToOthersInTimeline: "타임라인에 다른 사람에게 보내는 답글을 포함하지 않음"
|
||||
showRepliesToOthersInTimelineAll: "타임라인에 현재 팔로우 중인 사람 전원의 답글을 포함하게 하기"
|
||||
|
@ -1134,16 +1141,23 @@ externalServices: "외부 서비스"
|
|||
impressum: "운영자 정보"
|
||||
impressumUrl: "운영자 정보 URL"
|
||||
impressumDescription: "독일 등의 일부 나라와 지역에서는 꼭 표시해야 합니다(Impressum)."
|
||||
privacyPolicy: "개인정보 보호 정책"
|
||||
privacyPolicyUrl: "개인정보 보호 정책 URL"
|
||||
tosAndPrivacyPolicy: "약관 및 개인정보 보호 정책"
|
||||
avatarDecorations: "아이콘 장식"
|
||||
attach: "붙이기"
|
||||
detach: "떼기"
|
||||
angle: "각도"
|
||||
flip: "플립"
|
||||
showAvatarDecorations: "아이콘 장식을 표시"
|
||||
releaseToRefresh: "놓아서 새로고침"
|
||||
refreshing: "새로고침 중"
|
||||
pullDownToRefresh: "아래로 내려서 새로고침"
|
||||
disableStreamingTimeline: "타임라인의 실시간 갱신을 무효화하기"
|
||||
useGroupedNotifications: "알림을 그룹화하고 표시"
|
||||
signupPendingError: "메일 주소 확인중에 문제가 발생했습니다. 링크의 유효기간이 지났을 가능성이 있습니다."
|
||||
cwNotationRequired: "'내용을 숨기기'를 체크했을 경우 주석을 써야 합니다."
|
||||
cwNotationRequired: "'내용을 숨기기'를 체크한 경우 주석을 써야 합니다."
|
||||
doReaction: "리액션 추가"
|
||||
_announcement:
|
||||
forExistingUsers: "기존 유저에게만 알림"
|
||||
forExistingUsersDescription: "활성화하면 이 공지사항을 게시한 시점에서 이미 가입한 유저에게만 표시합니다. 비활성화하면 게시 후에 가입한 유저에게도 표시합니다."
|
||||
|
@ -1153,6 +1167,10 @@ _announcement:
|
|||
tooManyActiveAnnouncementDescription: "공지사항이 너무 많을 경우, 사용자 경험에 영향을 끼칠 가능성이 있습니다. 오래된 공지사항은 아카이브하시는 것을 권장드립니다."
|
||||
readConfirmTitle: "읽음으로 표시합니까?"
|
||||
readConfirmText: "\"{title}\"을(를) 읽음으로 표시합니다."
|
||||
shouldNotBeUsedToPresentPermanentInfo: "신규 유저의 이용 경험에 악영향을 끼칠 수 있으므로, 일시적인 알림 수단으로만 사용하고 고정된 정보에는 사용을 지양하는 것을 추천합니다."
|
||||
dialogAnnouncementUxWarn: "다이얼로그 형태의 알림이 동시에 2개 이상 존재하는 경우, 사용자 경험에 악영향을 끼칠 수 있으므로 신중히 결정하십시오."
|
||||
silence: "조용히 알림"
|
||||
silenceDescription: "활성화하면 공지사항에 대한 알림이 가지 않게 되며, 확인 버튼을 누를 필요가 없게 됩니다."
|
||||
_initialAccountSetting:
|
||||
accountCreated: "계정 생성이 완료되었습니다!"
|
||||
letsStartAccountSetup: "계정의 초기 설정을 진행합니다."
|
||||
|
@ -1175,22 +1193,79 @@ _initialTutorial:
|
|||
wellDone: "잘 하셨습니다"
|
||||
skipAreYouSure: "튜토리얼을 종료하시겠습니까?"
|
||||
_landing:
|
||||
title: "튜토리얼에 오신 걸 환영합니다"
|
||||
description: "여기서는 미스키의 기본적인 사용법이나 기능을 확인할 수 있습니다."
|
||||
_note:
|
||||
title: "'노트'가 무엇인가요?"
|
||||
description: "미스키에서는 게시물을 '노트'라고 합니다. 노트는 타임라인에 시간순으로 정렬되어 있고, 실시간으로 갱신됩니다."
|
||||
reply: "답글을 다는 것이 가능합니다. 답글에 답글을 다는 것도 가능하며 스레드처럼 대화를 계속하는 것도 가능합니다."
|
||||
renote: "그 노트를 자기 타임라인에 가져와서 공유하는 것이 가능합니다. 글을 추가해서 인용하는 것도 가능합니다."
|
||||
reaction: "리액션을 다는 것이 가능합니다. 다음 페이지에서 자세한 설명을 볼 수 있습니다."
|
||||
menu: "노트의 상세 정보를 표시하거나, 링크를 복사하는 등의 다양한 조작을 할 수 있습니다."
|
||||
_reaction:
|
||||
title: "'리액션'이 무엇인가요?"
|
||||
description: "노트에 '리액션'을 보낼 수 있습니다. '좋아요'만으로는 충분히 전해지지 않는 감정을, 이모지에 실어서 가볍게 보낼 수 있습니다."
|
||||
letsTryReacting: "리액션은 노트의 '+' 버튼을 클릭하여 붙일 수 있습니다. 지금 표시되는 샘플 노트에 리액션을 달아 보세요!"
|
||||
reactToContinue: "다음으로 진행하려면 리액션을 보내세요."
|
||||
reactNotification: "누군가가 나의 노트에 리액션을 보내면 실시간으로 알림을 받게 됩니다."
|
||||
reactDone: "'-' 버튼을 눌러서 리액션을 취소할 수 있습니다."
|
||||
_timeline:
|
||||
title: "타임라인에 대하여"
|
||||
description1: "Misskey에는 종류에 따라 여러 가지의 타임라인으로 구성되어 있습니다. (서버에 따라서는 일부 타임라인을 사용할 수 없는 경우가 있습니다)"
|
||||
home: "내가 팔로우 중인 계정의 노트를 볼 수 있습니다."
|
||||
local: "이 서버에 있는 모든 유저의 게시물을 볼 수 있습니다."
|
||||
social: "홈 타임라인과 로컬 타임라인의 게시물을 모두 볼 수 있습니다."
|
||||
global: "연결되어 있는 모든 서버의 게시물을 볼 수 있습니다."
|
||||
description2: "각각의 타임라인은 화면 상단에서 언제든지 변경할 수 있습니다."
|
||||
description3: "이 외에도, '리스트 타임라인'이나 '채널 타임라인' 등이 있습니다. 자세한 사항은 {link}에서 확인하실 수 있습니다."
|
||||
_postNote:
|
||||
title: "노트 게시 설정"
|
||||
description1: "Misskey에 노트를 쓸 때에는 다양한 옵션을 설정할 수 있습니다. 노트를 작성하는 화면은 이렇게 생겼습니다."
|
||||
_visibility:
|
||||
description: "노트를 볼 수 있는 사람을 제한할 수 있습니다."
|
||||
public: "모든 유저에게 공개합니다."
|
||||
home: "홈 타임라인에만 공개합니다. 팔로워, 프로필 화면, 리노트를 통해서 다른 유저가 볼 수 있습니다."
|
||||
followers: "팔로워에게만 공개. 자기 자신을 제외하고는 리노트가 불가능하며, 팔로워 외에는 열람할 수 없습니다."
|
||||
direct: "지정한 유저에게만 공개되며, 상대방에게 알림이 갑니다. 다이렉트 메시지(DM) 대용으로써 사용하실 수 있습니다."
|
||||
doNotSendConfidencialOnDirect1: "민감한 정보를 보낼 때에는 주의하십시오."
|
||||
doNotSendConfidencialOnDirect2: "서버 관리자는 기술적으로 게시물 내용을 열람할 수 있습니다. 신뢰할 수 없는 서버의 유저에게 다이렉트 메시지를 보내는 경우, 민감한 정보가 포함되어 있는 지 확인하십시오."
|
||||
localOnly: "다른 서버에 게시물을 보내지 않습니다. 앞서 설정한 공개 범위와 상관 없이, 다른 서버의 유저는 이 게시물을 직접 열람할 수 없게 됩니다."
|
||||
_cw:
|
||||
title: "내용 가리기 (CW)"
|
||||
description: "본문 대신에 '내용에 대한 주석'에 입력한 텍스트가 먼저 표시됩니다. '더 보기' 버튼을 누르면 본문이 표시됩니다."
|
||||
_exampleNote:
|
||||
cw: "배고픈 사람 주의"
|
||||
note: "방금 초코도넛을 먹었어요 🍩😋"
|
||||
useCases: "서버의 가이드라인에 따라 특정 주제를 다룰 때에 사용하거나, 스포일러 및 민감한 화제를 다룰 때에 자율적으로 사용하기도 합니다."
|
||||
_howToMakeAttachmentsSensitive:
|
||||
title: "첨부 파일을 열람주의로 설정하려면?"
|
||||
description: "서버의 가이드라인에 따라 필요한 이미지, 또는 그대로 노출되기에 부적절한 미디어는 '열람 주의'를 설정해 주세요."
|
||||
tryThisFile: "이 작성 창에 첨부된 이미지를 열람 주의로 설정해 보세요!"
|
||||
_exampleNote:
|
||||
note: "낫또 뚜껑 뜯다가 실수했다…"
|
||||
method: "첨부 파일을 열람 주의로 설정하려면, 해당 파일을 클릭하여 메뉴를 열고, '열람주의로 설정'을 클릭합니다."
|
||||
sensitiveSucceeded: "파일을 첨부할 때에는 서버의 가이드라인에 따라 적절히 열람주의를 설정해 주시기 바랍니다."
|
||||
doItToContinue: "이미지를 열람 주의로 설정하면 다음으로 넘어갈 수 있게 됩니다."
|
||||
_done:
|
||||
title: "튜토리얼이 끝났습니다! 🎉"
|
||||
description: "여기에서 소개한 기능은 극히 일부에 지나지 않습니다. Misskey의 사용 방법을 더 자세히 알아보려면 {link}를 확인해 주세요!"
|
||||
_timelineDescription:
|
||||
home: "홈 타임라인에서는, 내가 팔로우한 계정의 게시물을 볼 수 있습니다."
|
||||
local: "로컬 타임라인에서는, 이 서버의 모든 유저의 게시물을 볼 수 있습니다."
|
||||
social: "소셜 타임라인에서는, 홈 타임라인과 로컬 타임라인의 게시물을 모두 볼 수 있습니다."
|
||||
global: "글로벌 타임라인에서는, 여기와 연결된 다른 모든 서버의 게시물을 볼 수 있습니다."
|
||||
_serverRules:
|
||||
description: "회원 가입 이전에 간단하게 표시할 서버 규칙입니다. 이용 약관의 요약으로 구성하는 것을 추천합니다."
|
||||
_serverSettings:
|
||||
iconUrl: "아이콘 URL"
|
||||
appIconDescription: "{host}이 앱으로 표시될 때의 아이콘을 지정합니다."
|
||||
appIconUsageExample: "예를 들어, PWA나 스마트폰 홈 화면에 북마크로 추가되었을 때 등"
|
||||
appIconStyleRecommendation: "아이콘이 원형 또는 둥근 사각형으로 잘리는 경우가 있으므로, 가장자리 여백이 충분한 사진을 사용하는 것을 추천합니다."
|
||||
appIconResolutionMustBe: "해상도는 반드시 {resolution} 이어야 합니다."
|
||||
manifestJsonOverride: "manifest.json 오버라이드"
|
||||
shortName: "약칭"
|
||||
shortNameDescription: "서버의 정식 명칭이 긴 경우에, 대신에 표시할 수 있는 약칭이나 통칭."
|
||||
fanoutTimelineDescription: "활성화하면 각종 타임라인을 가져올 때의 성능을 대폭 향상하며, 데이터베이스의 부하를 줄일 수 있습니다. 단, Redis의 메모리 사용량이 증가합니다. 서버의 메모리 용량이 작거나, 서비스가 불안정해지는 경우 비활성화할 수 있습니다."
|
||||
_accountMigration:
|
||||
moveFrom: "다른 계정에서 이 계정으로 이사"
|
||||
moveFromSub: "다른 계정에 대한 별칭을 생성"
|
||||
|
@ -1445,6 +1520,12 @@ _achievements:
|
|||
title: "Brain Diver"
|
||||
description: "Brain Diver로의 링크를 첨부했습니다"
|
||||
flavor: "Misskey-Misskey La-Tu-Ma"
|
||||
_smashTestNotificationButton:
|
||||
title: "테스트 과잉"
|
||||
description: "매우 짧은 시간 안에 알림 테스트를 여러 번 수행했습니다"
|
||||
_tutorialCompleted:
|
||||
title: "Misskey 입문자 과정 수료증"
|
||||
description: "튜토리얼을 완료했습니다"
|
||||
_role:
|
||||
new: "새 역할 생성"
|
||||
edit: "역할 수정"
|
||||
|
@ -1488,6 +1569,7 @@ _role:
|
|||
inviteLimitCycle: "초대 발급 간격"
|
||||
inviteExpirationTime: "초대 만료 기간"
|
||||
canManageCustomEmojis: "커스텀 이모지 관리"
|
||||
canManageAvatarDecorations: "아바타 꾸미기 관리"
|
||||
driveCapacity: "드라이브 용량"
|
||||
alwaysMarkNsfw: "파일을 항상 NSFW로 지정"
|
||||
pinMax: "고정할 수 있는 노트 수"
|
||||
|
@ -1502,6 +1584,7 @@ _role:
|
|||
descriptionOfRateLimitFactor: "작을수록 제한이 완화되고, 클수록 제한이 강화됩니다."
|
||||
canHideAds: "광고 숨기기"
|
||||
canSearchNotes: "노트 검색 이용 가능 여부"
|
||||
canUseTranslator: "번역 기능의 사용"
|
||||
_condition:
|
||||
isLocal: "로컬 사용자"
|
||||
isRemote: "리모트 사용자"
|
||||
|
@ -1550,6 +1633,10 @@ _ad:
|
|||
reduceFrequencyOfThisAd: "이 광고의 표시 빈도 낮추기"
|
||||
hide: "보이지 않음"
|
||||
timezoneinfo: "요일은 서버의 표준 시간대에 따라 결정됩니다."
|
||||
adsSettings: "광고 표시 설정"
|
||||
notesPerOneAd: "실시간으로 갱신되는 타임라인에서 광고를 노출시키는 간격 (노트 당)"
|
||||
setZeroToDisable: "0으로 지정하면 실시간 타임라인에서의 광고를 비활성화합니다"
|
||||
adsTooClose: "광고의 표시 간격이 매우 작아, 사용자 경험에 부정적인 영향을 미칠 수 있습니다."
|
||||
_forgotPassword:
|
||||
enterEmail: "여기에 계정에 등록한 메일 주소를 입력해 주세요. 입력한 메일 주소로 비밀번호 재설정 링크를 발송합니다."
|
||||
ifNoEmail: "메일 주소를 등록하지 않은 경우, 관리자에 문의해 주십시오."
|
||||
|
@ -1602,6 +1689,7 @@ _aboutMisskey:
|
|||
donate: "Misskey에 기부하기"
|
||||
morePatrons: "이 외에도 다른 많은 분들이 도움을 주시고 계십니다. 감사합니다🥰"
|
||||
patrons: "후원자"
|
||||
projectMembers: "프로젝트 구성원"
|
||||
_displayOfSensitiveMedia:
|
||||
respect: "민감한 콘텐츠로 표시된 미디어 숨기기"
|
||||
ignore: "민감한 콘텐츠로 표시된 미디어 보이기"
|
||||
|
@ -1626,6 +1714,7 @@ _channel:
|
|||
notesCount: "{n}노트"
|
||||
nameAndDescription: "이름과 설명"
|
||||
nameOnly: "이름만"
|
||||
allowRenoteToExternal: "채널 외부로의 리노트와 인용 리노트를 허가"
|
||||
_menuDisplay:
|
||||
sideFull: "가로"
|
||||
sideIcon: "가로(아이콘)"
|
||||
|
@ -1812,8 +1901,9 @@ _auth:
|
|||
_antennaSources:
|
||||
all: "모든 노트"
|
||||
homeTimeline: "팔로우중인 유저의 노트"
|
||||
users: "지정한 한 명 혹은 여러 명의 유저의 노트"
|
||||
users: "지정한 유저의 노트"
|
||||
userList: "지정한 리스트에 속한 유저의 노트"
|
||||
userBlacklist: "지정한 유저를 제외한 모든 노트"
|
||||
_weekday:
|
||||
sunday: "일요일"
|
||||
monday: "월요일"
|
||||
|
@ -1913,6 +2003,7 @@ _profile:
|
|||
metadataContent: "내용"
|
||||
changeAvatar: "아바타 이미지 변경"
|
||||
changeBanner: "배너 이미지 변경"
|
||||
verifiedLinkDescription: "내용에 자신의 프로필로 향하는 링크가 포함된 페이지의 URL을 삽입하면 소유자 인증 마크가 표시됩니다."
|
||||
_exportOrImport:
|
||||
allNotes: "모든 노트"
|
||||
favoritedNotes: "즐겨찾기한 노트"
|
||||
|
@ -1922,6 +2013,7 @@ _exportOrImport:
|
|||
userLists: "리스트"
|
||||
excludeMutingUsers: "뮤트한 유저 제외하기"
|
||||
excludeInactiveUsers: "휴면 중인 계정 제외하기"
|
||||
withReplies: "가져오기한 유저에 의한 답글을 타임라인에 포함"
|
||||
_charts:
|
||||
federation: "연합"
|
||||
apRequest: "요청"
|
||||
|
@ -1995,7 +2087,7 @@ _pages:
|
|||
url: "페이지 URL"
|
||||
summary: "페이지 요약"
|
||||
alignCenter: "가운데 정렬"
|
||||
hideTitleWhenPinned: "프로필에 고정해놓은 경우 타이틀을 표시하지 않음"
|
||||
hideTitleWhenPinned: "프로필에 고정한 경우 타이틀을 표시하지 않음"
|
||||
font: "폰트"
|
||||
fontSerif: "명조체"
|
||||
fontSansSerif: "고딕체"
|
||||
|
@ -2031,6 +2123,7 @@ _notification:
|
|||
youReceivedFollowRequest: "새로운 팔로우 요청이 있습니다"
|
||||
yourFollowRequestAccepted: "팔로우 요청이 수락되었습니다"
|
||||
pollEnded: "투표 결과가 발표되었습니다"
|
||||
newNote: "새 게시물"
|
||||
unreadAntennaNote: "안테나 {name}"
|
||||
emptyPushNotificationMessage: "푸시 알림이 갱신되었습니다"
|
||||
achievementEarned: "도전 과제를 달성했습니다"
|
||||
|
@ -2043,6 +2136,7 @@ _notification:
|
|||
followedBySomeUsers: "{n}명에게 팔로우됨"
|
||||
_types:
|
||||
all: "전부"
|
||||
note: "유저의 새 게시물"
|
||||
follow: "팔로잉"
|
||||
mention: "멘션"
|
||||
reply: "답글"
|
||||
|
@ -2113,6 +2207,85 @@ _webhookSettings:
|
|||
reaction: "누군가 내 노트에 리액션했을 때"
|
||||
mention: "누군가 나를 멘션했을 때"
|
||||
_moderationLogTypes:
|
||||
createRole: "역할 생성"
|
||||
deleteRole: "역할 삭제"
|
||||
updateRole: "역할 수정"
|
||||
assignRole: "역할 할당"
|
||||
unassignRole: "역할 해제"
|
||||
suspend: "정지"
|
||||
unsuspend: "정지 해제"
|
||||
addCustomEmoji: "커스텀 이모지 추가"
|
||||
updateCustomEmoji: "커스텀 이모지 수정"
|
||||
deleteCustomEmoji: "커스텀 이모지 삭제"
|
||||
updateServerSettings: "서버 설정 갱신"
|
||||
updateUserNote: "모더레이션 노트 갱신"
|
||||
deleteDriveFile: "파일 삭제"
|
||||
deleteNote: "노트 삭제"
|
||||
createGlobalAnnouncement: "전역 공지사항 생성"
|
||||
createUserAnnouncement: "유저 공지사항 생성"
|
||||
updateGlobalAnnouncement: "전역 공지사항 수정"
|
||||
updateUserAnnouncement: "유저 공지사항 수정"
|
||||
deleteGlobalAnnouncement: "전역 공지사항 삭제"
|
||||
deleteUserAnnouncement: "유저 공지사항 삭제"
|
||||
resetPassword: "비밀번호 재설정"
|
||||
suspendRemoteInstance: "리모트 서버를 정지"
|
||||
unsuspendRemoteInstance: "리모트 서버의 정지를 해제"
|
||||
markSensitiveDriveFile: "파일에 열람주의를 설정"
|
||||
unmarkSensitiveDriveFile: "파일에 열람주의를 해제"
|
||||
resolveAbuseReport: "신고 해결"
|
||||
createInvitation: "초대 코드 생성"
|
||||
createAd: "광고 생성"
|
||||
deleteAd: "광고 삭제"
|
||||
updateAd: "광고 수정"
|
||||
createAvatarDecoration: "아이콘 장식 추가"
|
||||
updateAvatarDecoration: "아이콘 장식 수정"
|
||||
deleteAvatarDecoration: "아이콘 장식 삭제"
|
||||
_fileViewer:
|
||||
title: "파일 상세"
|
||||
type: "파일 유형"
|
||||
size: "파일 크기"
|
||||
url: "URL"
|
||||
uploadedAt: "업로드 날짜"
|
||||
attachedNotes: "첨부된 노트"
|
||||
thisPageCanBeSeenFromTheAuthor: "이 페이지는 파일 소유자만 열람할 수 있습니다"
|
||||
_externalResourceInstaller:
|
||||
title: "외부 사이트로부터 설치"
|
||||
checkVendorBeforeInstall: "제공자를 신뢰할 수 있는 경우에만 설치하십시오."
|
||||
_plugin:
|
||||
title: "이 플러그인을 설치하시겠습니까?"
|
||||
metaTitle: "플러그인 정보"
|
||||
_theme:
|
||||
title: "이 테마를 설치하시겠습니까?"
|
||||
metaTitle: "테마 정보"
|
||||
_meta:
|
||||
base: "기본 컬러 스키마"
|
||||
_vendorInfo:
|
||||
title: "제공자 정보"
|
||||
endpoint: "참조한 엔드포인트"
|
||||
hashVerify: "파일 무결성 확인"
|
||||
_errors:
|
||||
_invalidParams:
|
||||
title: "파라미터가 부족합니다"
|
||||
description: "외부 사이트로부터 데이터를 불러오기 위해 필요한 정보가 부족합니다. URL을 다시 한 번 확인하십시오."
|
||||
_resourceTypeNotSupported:
|
||||
title: "해당하는 외부 리소스는 지원되지 않습니다."
|
||||
description: "외부 사이트의 해당 리소스는 지원되지 않습니다. 사이트 관리자에게 문의하십시오."
|
||||
_failedToFetch:
|
||||
title: "데이터를 불러올 수 없습니다"
|
||||
fetchErrorDescription: "외부 사이트와의 통신에 실패하였습니다. 여러 번 시도해도 동일한 오류가 표시되는 경우 사이트 관리자에게 문의하십시오."
|
||||
parseErrorDescription: "외부 사이트에서 불러온 데이터를 읽어들일 수 없습니다. 사이트 관리자에게 문의하십시오."
|
||||
_hashUnmatched:
|
||||
title: "데이터가 올바르지 않습니다."
|
||||
description: "데이터의 무결성 확인에 실패하여, 보안을 위해 설치가 중단되었습니다. 사이트 관리자에게 문의하십시오."
|
||||
_pluginParseFailed:
|
||||
title: "AiScript 오류"
|
||||
description: "데이터를 성공적으로 불러왔으나, AiScript 분석 과정에서 오류가 발생하여 읽어들일 수 없습니다. 플러그인 작성자에게 문의하십시오. 자세한 사항은 브라우저에 내장된 개발자 도구의 Javascript 콘솔에서 확인하실 수 있습니다."
|
||||
_pluginInstallFailed:
|
||||
title: "플러그인 설치에 실패했습니다"
|
||||
description: "플러그인을 설치하는 도중 문제가 발생하였습니다. 다시 한 번 시도하십시오. 자세한 사항은 브라우저에 내장된 개발자 도구의 Javascript 콘솔에서 확인하실 수 있습니다."
|
||||
_themeParseFailed:
|
||||
title: "테마 코드 분석 오류"
|
||||
description: "데이터를 성공적으로 불러왔으나, 테마 코드 분석 과정에서 오류가 발생하여 읽어들일 수 없습니다. 테마 작성자에게 문의하십시오. 자세한 사항은 브라우저에 내장된 개발자 도구의 Javascript 콘솔에서 확인하실 수 있습니다."
|
||||
_themeInstallFailed:
|
||||
title: "테마를 설치하지 못했습니다"
|
||||
description: "테마를 설치하는 도중 문제가 발생하였습니다. 다시 한 번 시도하십시오. 자세한 사항은 브라우저에 내장된 개발자 도구의 Javascript 콘솔에서 확인하실 수 있습니다."
|
||||
|
|
|
@ -59,7 +59,7 @@ copyFileId: "Скопировать ID файла"
|
|||
copyFolderId: "Скопировать ID папки"
|
||||
copyProfileUrl: "Скопировать URL профиля "
|
||||
searchUser: "Поиск людей"
|
||||
reply: "Ответить"
|
||||
reply: "Ответ"
|
||||
loadMore: "Показать еще"
|
||||
showMore: "Показать еще"
|
||||
showLess: "Закрыть"
|
||||
|
@ -409,6 +409,7 @@ aboutMisskey: "О Misskey"
|
|||
administrator: "Администратор"
|
||||
token: "Токен"
|
||||
2fa: "2-х факторная аутентификация"
|
||||
setupOf2fa: "Настроить двухфакторную аутентификацию"
|
||||
totp: "Приложение-аутентификатор"
|
||||
totpDescription: "Описание приложения-аутентификатора"
|
||||
moderator: "Модератор"
|
||||
|
@ -652,6 +653,7 @@ behavior: "Поведение"
|
|||
sample: "Пример"
|
||||
abuseReports: "Жалобы"
|
||||
reportAbuse: "Жалоба"
|
||||
reportAbuseRenote: "Пожаловаться на репост"
|
||||
reportAbuseOf: "Пожаловаться на пользователя {name}"
|
||||
fillAbuseReportDescription: "Опишите, пожалуйста, причину жалобы подробнее. Если речь о конкретной заметке, будьте добры приложить ссылку на неё."
|
||||
abuseReported: "Жалоба отправлена. Большое спасибо за информацию."
|
||||
|
@ -1060,12 +1062,14 @@ goToMisskey: "К Misskey"
|
|||
additionalEmojiDictionary: "Дополнительные словари эмодзи"
|
||||
installed: "Установлено"
|
||||
branding: "Бренд"
|
||||
enableIdenticonGeneration: "Включить генерацию иконки пользователя"
|
||||
turnOffToImprovePerformance: "Отключение этого параметра может повысить производительность."
|
||||
expirationDate: "Дата истечения"
|
||||
unused: "Неиспользуемый"
|
||||
expired: "Срок действия приглашения истёк"
|
||||
doYouAgree: "Согласны?"
|
||||
icon: "Аватар"
|
||||
replies: "Ответить"
|
||||
replies: "Ответы"
|
||||
renotes: "Репост"
|
||||
flip: "Переворот"
|
||||
_initialAccountSetting:
|
||||
|
@ -1075,6 +1079,9 @@ _initialAccountSetting:
|
|||
privacySetting: "Настройки конфиденциальности"
|
||||
initialAccountSettingCompleted: "Первоначальная настройка успешно завершена!"
|
||||
skipAreYouSure: "Пропустить настройку?"
|
||||
_initialTutorial:
|
||||
_note:
|
||||
description: "Посты в Misskey называются 'Заметками.' Заметки отсортированы в хронологическом порядке в ленте и обновляются в режиме реального времени."
|
||||
_serverSettings:
|
||||
iconUrl: "Адрес на иконку роли"
|
||||
_achievements:
|
||||
|
@ -1892,7 +1899,7 @@ _notification:
|
|||
app: "Уведомления из приложений"
|
||||
_actions:
|
||||
followBack: "отвечает взаимной подпиской"
|
||||
reply: "Ответить"
|
||||
reply: "Ответ"
|
||||
renote: "Репост"
|
||||
_deck:
|
||||
alwaysShowMainColumn: "Всегда показывать главную колонку"
|
||||
|
|
|
@ -9,6 +9,7 @@ notifications: "Bildirim"
|
|||
username: "Kullanıcı Adı"
|
||||
password: "Şifre"
|
||||
forgotPassword: "şifremi unuttum"
|
||||
fetchingAsApObject: "從聯邦宇宙取得中..."
|
||||
ok: "TAMAM"
|
||||
gotIt: "Anladım"
|
||||
cancel: "İptal"
|
||||
|
@ -44,6 +45,7 @@ pin: "Sabitlenmiş"
|
|||
unpin: "Sabitlemeyi kaldır"
|
||||
copyContent: "İçeriği kopyala"
|
||||
copyLink: "Bağlantıyı Kopyala"
|
||||
copyLinkRenote: "Turkish"
|
||||
delete: "Sil"
|
||||
deleteAndEdit: "Sil ve yeniden düzenle"
|
||||
deleteAndEditConfirm: "Bu notu silip yeniden düzenlemek istiyor musunuz? Bu nota ilişkin tüm Tepkiler, Yeniden Notlar ve Yanıtlar da silinecektir."
|
||||
|
@ -155,6 +157,7 @@ addEmoji: "Emoji ekle"
|
|||
settingGuide: "Önerilen ayarlar"
|
||||
cacheRemoteFiles: "Uzak dosyalar ön belleğe alınsın"
|
||||
cacheRemoteFilesDescription: "Bu ayar açık olduğunda diğer sitelerin dosyaları doğrudan uzak sunucudan yüklenecektir. Bu ayarı kapatmak depolama kullanımını azaltacak ama küçük resimler oluşturulmadığından trafiği arttıracaktır."
|
||||
youCanCleanRemoteFilesCache: ""
|
||||
cacheRemoteSensitiveFiles: "Hassas uzak dosyalar ön belleğe alınsın"
|
||||
cacheRemoteSensitiveFilesDescription: "Bu ayar kapalı olduğunda hassas uzak dosyalar ön belleğe alınmadan doğrudan uzak sunucudan yüklenecektir."
|
||||
flagAsBot: "Bot olarak işaretle"
|
||||
|
@ -192,6 +195,7 @@ perHour: "Saatlik"
|
|||
perDay: "Günlük"
|
||||
stopActivityDelivery: "Durum güncellemelerini gönderme"
|
||||
blockThisInstance: "Bu sunucuyu engelle"
|
||||
silenceThisInstance: ""
|
||||
operations: "İşlemler"
|
||||
software: "Yazılımlar"
|
||||
version: "Sürüm"
|
||||
|
@ -211,6 +215,8 @@ clearCachedFiles: "Ön belleği temizle"
|
|||
clearCachedFilesConfirm: "Ön belleğe alınmış tüm uzak sunucu dosyaları silinsin mi?"
|
||||
blockedInstances: "Engellenen sunucular"
|
||||
blockedInstancesDescription: "Engellemek istediğiniz sunucuların alan adlarını satır sonlarıyla ayırarak yazın. Yazılan sunucular bu sunucuyla iletişime geçemeyecek."
|
||||
silencedInstances: "Turkısh"
|
||||
silencedInstancesDescription: ""
|
||||
muteAndBlock: "Susturma ve Engelleme"
|
||||
mutedUsers: "Susturulan kullanıcılar"
|
||||
blockedUsers: "Engellenen kullanıcılar"
|
||||
|
|
|
@ -299,7 +299,7 @@ light: "淺色"
|
|||
dark: "深色"
|
||||
lightThemes: "淺色主題"
|
||||
darkThemes: "深色主題"
|
||||
syncDeviceDarkMode: "同步至此裝置的深色模式設定"
|
||||
syncDeviceDarkMode: "與設備的深色模式同步"
|
||||
drive: "雲端硬碟"
|
||||
fileName: "檔案名稱"
|
||||
selectFile: "選擇檔案"
|
||||
|
@ -584,7 +584,7 @@ relays: "中繼"
|
|||
addRelay: "新增中繼"
|
||||
inboxUrl: "收件夾URL"
|
||||
addedRelays: "已加入的中繼"
|
||||
serviceworkerInfo: "您需要啟用推送通知。"
|
||||
serviceworkerInfo: "如要使用推播通知,需要啟用此選項並設定金鑰。"
|
||||
deletedNote: "已刪除的貼文"
|
||||
invisibleNote: "私密的貼文"
|
||||
enableInfiniteScroll: "啟用自動滾動頁面模式"
|
||||
|
@ -731,7 +731,7 @@ thisIsExperimentalFeature: "這是實驗性的功能。可能會有變更規格
|
|||
developer: "開發者"
|
||||
makeExplorable: "使自己的帳戶能夠在「探索」頁面中顯示"
|
||||
makeExplorableDescription: "如果關閉,帳戶將不會被顯示在「探索」頁面中。"
|
||||
showGapBetweenNotesInTimeline: "分開顯示時間軸上的貼文。"
|
||||
showGapBetweenNotesInTimeline: "分開顯示時間軸上的貼文"
|
||||
duplicate: "複製"
|
||||
left: "左"
|
||||
center: "置中"
|
||||
|
@ -1030,7 +1030,7 @@ retryAllQueuesConfirmTitle: "要現在重試嗎?"
|
|||
retryAllQueuesConfirmText: "伺服器的負荷可能會暫時增加。"
|
||||
enableChartsForRemoteUser: "生成遠端使用者的圖表"
|
||||
enableChartsForFederatedInstances: "生成遠端伺服器的圖表"
|
||||
showClipButtonInNoteFooter: "新增摘錄至貼文"
|
||||
showClipButtonInNoteFooter: "新增摘錄按鈕至貼文"
|
||||
reactionsDisplaySize: "反應的顯示尺寸"
|
||||
noteIdOrUrl: "貼文ID或URL"
|
||||
video: "影片"
|
||||
|
@ -1169,6 +1169,8 @@ _announcement:
|
|||
readConfirmText: "閱讀「{title}」的內容並標記為已讀。"
|
||||
shouldNotBeUsedToPresentPermanentInfo: "由於可能會破壞使用者體驗,尤其是對於新使用者而言,我們建議使用公告來發布有時效性的資訊而不是固定不變的資訊。"
|
||||
dialogAnnouncementUxWarn: "如果同時有 2 個以上對話方塊形式的公告存在,對於使用者體驗很可能會有不良的影響,因此建議謹慎使用。"
|
||||
silence: "不發送通知"
|
||||
silenceDescription: "啟用此選項後,將不會發送此公告的通知,並且無需將其標記為已讀。"
|
||||
_initialAccountSetting:
|
||||
accountCreated: "帳戶已建立完成!"
|
||||
letsStartAccountSetup: "來進行帳戶的初始設定吧。"
|
||||
|
@ -1248,7 +1250,7 @@ _initialTutorial:
|
|||
title: "教學課程已結束"
|
||||
description: "這裡介紹的功能只是其中的一小部分。要了解更多有關如何使用Misskey的資訊,請瀏覽{link}。"
|
||||
_timelineDescription:
|
||||
home: "在首頁時間線上,可以看到您追隨的使用者的貼文。"
|
||||
home: "在首頁時間軸上,可以看到您追隨的使用者的貼文。"
|
||||
local: "在本地時間軸上,可以看到此伺服器所有使用者的貼文。"
|
||||
social: "在社交時間軸上,可以看到首頁與本地時間軸的貼文。"
|
||||
global: "在公開時間軸上,可以看到其他已連接伺服器的貼文。\n"
|
||||
|
@ -1264,6 +1266,8 @@ _serverSettings:
|
|||
shortName: "簡稱"
|
||||
shortNameDescription: "如果伺服器的正式名稱很長,可用簡稱或通稱代替。"
|
||||
fanoutTimelineDescription: "如果啟用的話,檢索各個時間軸的性能會顯著提昇,資料庫的負荷也會減少。不過,Redis 的記憶體使用量會增加。如果伺服器的記憶體容量比較少或者運行不穩定,可以停用。"
|
||||
fanoutTimelineDbFallback: "資料庫的回退"
|
||||
fanoutTimelineDbFallbackDescription: "若啟用,在時間軸沒有快取的情況下將執行回退處理以額外查詢資料庫。若停用,可以透過不執行回退處理來進一步減少伺服器的負荷,但會限制可取得的時間軸範圍。"
|
||||
_accountMigration:
|
||||
moveFrom: "從其他帳戶遷移到這個帳戶"
|
||||
moveFromSub: "為另一個帳戶建立別名"
|
||||
|
@ -1272,7 +1276,7 @@ _accountMigration:
|
|||
moveTo: "將這個帳戶遷移至新的帳戶"
|
||||
moveToLabel: "要遷移到的帳戶:"
|
||||
moveCannotBeUndone: "一旦遷移帳戶,就無法取消。"
|
||||
moveAccountDescription: "遷移至新帳戶。\n ・此帳戶的追隨者將自動追隨新帳戶;\n ・此帳戶的所有追隨者將被取消追隨;\n ・此帳戶不能再發文。\n\n雖然會自動遷移您追隨者,但必須手動遷移您追隨的帳戶。請在遷移前匯出此帳戶的「追隨中」名單,並在遷移後自行匯入。\n列表名單、靜音名單及封鎖名單也必須如此處理。\n\n(此說明適用於本伺服器,以及運行 Misskey v13.12.0 或更新版本的其他伺服器;如 Mastodon 等使用 ActivityPub 協定的其他軟體或有不同的處理方式。)"
|
||||
moveAccountDescription: "遷移至新帳戶。\n ・此帳戶的追隨者將自動追隨新帳戶;\n ・此帳戶的所有追隨者將被取消追隨;\n ・此帳戶不能再發文。\n\n雖然會自動遷移您的追隨者,但必須手動遷移您追隨的帳戶。請在遷移前匯出此帳戶的「追隨中」名單,並在遷移後自行匯入。\n列表名單、靜音名單及封鎖名單也必須如此處理。\n\n(此說明適用於本伺服器,以及運行 Misskey v13.12.0 或更新版本的其他伺服器;如 Mastodon 等使用 ActivityPub 協定的其他軟體或有不同的處理方式。)"
|
||||
moveAccountHowTo: "要遷移帳戶,首先要在目標帳戶中為此帳戶建立一個別名。\n 建立別名後,像這樣輸入目標帳戶:@username@server.example.com"
|
||||
startMigration: "遷移"
|
||||
migrationConfirm: "確定要將這個帳戶遷移至 {account} 嗎?一旦遷移就無法撤銷,也就無法以原來的狀態使用這個帳戶。\n另外,請確認在要遷移到的帳戶已經建立了一個別名。"
|
||||
|
@ -1723,7 +1727,7 @@ _wordMute:
|
|||
muteWordsDescription: "空格代表「以及」(AND),換行代表「或者」(OR)。"
|
||||
muteWordsDescription2: "用斜線包圍關鍵字代表正規表達式。"
|
||||
_instanceMute:
|
||||
instanceMuteDescription: "包括對被靜音實例上的使用者的回覆,被設定的實例上所有貼文及轉發都會被靜音。"
|
||||
instanceMuteDescription: "包括對被靜音伺服器上的使用者的回覆,被設定的伺服器上所有貼文及轉發都會被靜音。"
|
||||
instanceMuteDescription2: "設定時以換行進行分隔"
|
||||
title: "將隱藏被設定的實例貼文。"
|
||||
heading: "將實例靜音"
|
||||
|
@ -1815,6 +1819,14 @@ _ago:
|
|||
monthsAgo: "{n} 個月前"
|
||||
yearsAgo: "{n} 年前"
|
||||
invalid: "無"
|
||||
_timeIn:
|
||||
seconds: "{n} 秒後"
|
||||
minutes: "{n} 分後"
|
||||
hours: "{n} 小時後"
|
||||
days: "{n} 日後"
|
||||
weeks: "{n} 週後"
|
||||
months: "{n} 個月後"
|
||||
years: "{n} 年後"
|
||||
_time:
|
||||
second: "秒"
|
||||
minute: "分鐘"
|
||||
|
|
14
package.json
14
package.json
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "sharkey",
|
||||
"version": "2023.11.0",
|
||||
"version": "2023.11.1",
|
||||
"codename": "shonk",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/transfem-org/sharkey.git"
|
||||
},
|
||||
"packageManager": "pnpm@8.10.0",
|
||||
"packageManager": "pnpm@8.10.5",
|
||||
"workspaces": [
|
||||
"packages/frontend",
|
||||
"packages/backend",
|
||||
|
@ -52,11 +52,11 @@
|
|||
"typescript": "5.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "6.9.1",
|
||||
"@typescript-eslint/parser": "6.9.1",
|
||||
"@typescript-eslint/eslint-plugin": "6.11.0",
|
||||
"@typescript-eslint/parser": "6.11.0",
|
||||
"cross-env": "7.0.3",
|
||||
"cypress": "13.4.0",
|
||||
"eslint": "8.52.0",
|
||||
"start-server-and-test": "2.0.1"
|
||||
"cypress": "13.5.1",
|
||||
"eslint": "8.53.0",
|
||||
"start-server-and-test": "2.0.3"
|
||||
}
|
||||
}
|
||||
|
|
11
packages/backend/migration/1699819257000-defaultLike.js
Normal file
11
packages/backend/migration/1699819257000-defaultLike.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
export class instanceDefaultLike1699819257000 {
|
||||
name = 'instanceDefaultLike1699819257000'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "meta" ADD "defaultLike" character varying(500) DEFAULT '❤️'`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "defaultLike"`);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
export class EnableFanoutTimelineDbFallback1700096812223 {
|
||||
name = 'EnableFanoutTimelineDbFallback1700096812223'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "meta" ADD "enableFanoutTimelineDbFallback" boolean NOT NULL DEFAULT true`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableFanoutTimelineDbFallback"`);
|
||||
}
|
||||
}
|
15
packages/backend/migration/1700228972000-update-indexable.js
Normal file
15
packages/backend/migration/1700228972000-update-indexable.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
export class UpdateIndexable1700228972000 {
|
||||
name = 'UpdateIndexable1700228972000'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "user" RENAME COLUMN "isIndexable" TO "noindex"`);
|
||||
await queryRunner.query(`ALTER TABLE "user" ALTER COLUMN "noindex" SET DEFAULT false`);
|
||||
await queryRunner.query(`UPDATE "user" SET "noindex" = NOT "noindex"`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(`UPDATE "user" SET "noindex" = NOT "noindex"`);
|
||||
await queryRunner.query(`ALTER TABLE "user" ALTER COLUMN "noindex" SET DEFAULT true`);
|
||||
await queryRunner.query(`ALTER TABLE "user" RENAME COLUMN "noindex" TO "isIndexable"`);
|
||||
}
|
||||
}
|
|
@ -57,16 +57,15 @@
|
|||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "3.412.0",
|
||||
"@aws-sdk/lib-storage": "3.412.0",
|
||||
"@smithy/node-http-handler": "2.1.5",
|
||||
"@bull-board/api": "5.9.1",
|
||||
"@bull-board/fastify": "5.9.1",
|
||||
"@bull-board/ui": "5.9.1",
|
||||
"@discordapp/twemoji": "14.1.2",
|
||||
"@fastify/accepts": "4.2.0",
|
||||
"@fastify/cookie": "9.1.0",
|
||||
"@fastify/cookie": "9.2.0",
|
||||
"@fastify/cors": "8.4.1",
|
||||
"@fastify/express": "2.3.0",
|
||||
"@fastify/http-proxy": "9.2.1",
|
||||
"@fastify/http-proxy": "9.3.0",
|
||||
"@fastify/multipart": "8.0.0",
|
||||
"@fastify/static": "6.12.0",
|
||||
"@fastify/view": "8.2.0",
|
||||
|
@ -76,8 +75,9 @@
|
|||
"@peertube/http-signature": "1.7.0",
|
||||
"@simplewebauthn/server": "8.3.5",
|
||||
"@sinonjs/fake-timers": "11.2.2",
|
||||
"@swc/cli": "0.1.62",
|
||||
"@swc/core": "1.3.95",
|
||||
"@smithy/node-http-handler": "2.1.5",
|
||||
"@swc/cli": "0.1.63",
|
||||
"@swc/core": "1.3.96",
|
||||
"accepts": "1.3.8",
|
||||
"ajv": "8.12.0",
|
||||
"archiver": "6.0.1",
|
||||
|
@ -86,7 +86,7 @@
|
|||
"bcryptjs": "2.4.3",
|
||||
"blurhash": "2.0.5",
|
||||
"body-parser": "1.20.2",
|
||||
"bullmq": "4.12.8",
|
||||
"bullmq": "4.13.3",
|
||||
"cacheable-lookup": "7.0.0",
|
||||
"cbor": "9.0.1",
|
||||
"chalk": "5.3.0",
|
||||
|
@ -99,8 +99,9 @@
|
|||
"deep-email-validator": "0.1.21",
|
||||
"fastify-multer": "^2.0.3",
|
||||
"fastify": "4.24.3",
|
||||
"fastify-raw-body": "4.3.0",
|
||||
"feed": "4.2.2",
|
||||
"file-type": "18.6.0",
|
||||
"file-type": "18.7.0",
|
||||
"fluent-ffmpeg": "2.1.2",
|
||||
"form-data": "4.0.0",
|
||||
"got": "13.0.0",
|
||||
|
@ -123,7 +124,7 @@
|
|||
"mime-types": "2.1.35",
|
||||
"misskey-js": "workspace:*",
|
||||
"ms": "3.0.0-canary.1",
|
||||
"nanoid": "5.0.2",
|
||||
"nanoid": "5.0.3",
|
||||
"nested-property": "4.0.0",
|
||||
"node-fetch": "3.3.2",
|
||||
"nodemailer": "6.9.7",
|
||||
|
@ -131,7 +132,7 @@
|
|||
"oauth2orize": "1.12.0",
|
||||
"oauth2orize-pkce": "0.1.2",
|
||||
"os-utils": "0.0.14",
|
||||
"otpauth": "9.1.5",
|
||||
"otpauth": "9.2.0",
|
||||
"parse5": "7.1.2",
|
||||
"pg": "8.11.3",
|
||||
"pkce-challenge": "4.0.1",
|
||||
|
@ -143,20 +144,21 @@
|
|||
"qrcode": "1.5.3",
|
||||
"random-seed": "0.3.0",
|
||||
"ratelimiter": "3.4.1",
|
||||
"re2": "1.20.5",
|
||||
"re2": "1.20.8",
|
||||
"redis-lock": "0.1.4",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rename": "1.0.4",
|
||||
"rss-parser": "3.13.0",
|
||||
"rxjs": "7.8.1",
|
||||
"sanitize-html": "2.11.0",
|
||||
"secure-json-parse": "2.7.0",
|
||||
"sharp": "0.32.6",
|
||||
"sharp-read-bmp": "github:misskey-dev/sharp-read-bmp",
|
||||
"slacc": "0.0.10",
|
||||
"strict-event-emitter-types": "2.0.0",
|
||||
"stringz": "2.1.0",
|
||||
"summaly": "github:misskey-dev/summaly",
|
||||
"systeminformation": "5.21.15",
|
||||
"systeminformation": "5.21.17",
|
||||
"tinycolor2": "1.6.0",
|
||||
"tmp": "0.2.1",
|
||||
"tsc-alias": "1.8.8",
|
||||
|
@ -175,51 +177,51 @@
|
|||
"@jest/globals": "29.7.0",
|
||||
"@simplewebauthn/typescript-types": "8.3.4",
|
||||
"@swc/jest": "0.2.29",
|
||||
"@types/accepts": "1.3.6",
|
||||
"@types/archiver": "6.0.0",
|
||||
"@types/bcryptjs": "2.4.5",
|
||||
"@types/body-parser": "1.19.4",
|
||||
"@types/accepts": "1.3.7",
|
||||
"@types/archiver": "6.0.1",
|
||||
"@types/bcryptjs": "2.4.6",
|
||||
"@types/body-parser": "1.19.5",
|
||||
"@types/cbor": "6.0.0",
|
||||
"@types/color-convert": "2.0.2",
|
||||
"@types/content-disposition": "0.5.7",
|
||||
"@types/fluent-ffmpeg": "2.1.23",
|
||||
"@types/http-link-header": "1.0.4",
|
||||
"@types/jest": "29.5.7",
|
||||
"@types/js-yaml": "4.0.8",
|
||||
"@types/jsdom": "21.1.4",
|
||||
"@types/jsonld": "1.5.11",
|
||||
"@types/jsrsasign": "10.5.11",
|
||||
"@types/mime-types": "2.1.3",
|
||||
"@types/ms": "0.7.33",
|
||||
"@types/node": "20.8.10",
|
||||
"@types/color-convert": "2.0.3",
|
||||
"@types/content-disposition": "0.5.8",
|
||||
"@types/fluent-ffmpeg": "2.1.24",
|
||||
"@types/http-link-header": "1.0.5",
|
||||
"@types/jest": "29.5.8",
|
||||
"@types/js-yaml": "4.0.9",
|
||||
"@types/jsdom": "21.1.5",
|
||||
"@types/jsonld": "1.5.12",
|
||||
"@types/jsrsasign": "10.5.12",
|
||||
"@types/mime-types": "2.1.4",
|
||||
"@types/ms": "0.7.34",
|
||||
"@types/node": "20.9.1",
|
||||
"@types/node-fetch": "3.0.3",
|
||||
"@types/nodemailer": "6.4.13",
|
||||
"@types/oauth": "0.9.3",
|
||||
"@types/oauth2orize": "1.11.2",
|
||||
"@types/oauth2orize-pkce": "0.1.1",
|
||||
"@types/pg": "8.10.7",
|
||||
"@types/pug": "2.0.8",
|
||||
"@types/punycode": "2.1.1",
|
||||
"@types/qrcode": "1.5.4",
|
||||
"@types/random-seed": "0.3.4",
|
||||
"@types/ratelimiter": "3.4.5",
|
||||
"@types/rename": "1.0.6",
|
||||
"@types/sanitize-html": "2.9.3",
|
||||
"@types/semver": "7.5.4",
|
||||
"@types/nodemailer": "6.4.14",
|
||||
"@types/oauth": "0.9.4",
|
||||
"@types/oauth2orize": "1.11.3",
|
||||
"@types/oauth2orize-pkce": "0.1.2",
|
||||
"@types/pg": "8.10.9",
|
||||
"@types/pug": "2.0.9",
|
||||
"@types/punycode": "2.1.2",
|
||||
"@types/qrcode": "1.5.5",
|
||||
"@types/random-seed": "0.3.5",
|
||||
"@types/ratelimiter": "3.4.6",
|
||||
"@types/rename": "1.0.7",
|
||||
"@types/sanitize-html": "2.9.4",
|
||||
"@types/semver": "7.5.5",
|
||||
"@types/sharp": "0.32.0",
|
||||
"@types/simple-oauth2": "5.0.6",
|
||||
"@types/sinonjs__fake-timers": "8.1.4",
|
||||
"@types/tinycolor2": "1.4.5",
|
||||
"@types/tmp": "0.2.5",
|
||||
"@types/vary": "1.1.2",
|
||||
"@types/web-push": "3.6.2",
|
||||
"@types/simple-oauth2": "5.0.7",
|
||||
"@types/sinonjs__fake-timers": "8.1.5",
|
||||
"@types/tinycolor2": "1.4.6",
|
||||
"@types/tmp": "0.2.6",
|
||||
"@types/vary": "1.1.3",
|
||||
"@types/web-push": "3.6.3",
|
||||
"@types/ws": "8.5.9",
|
||||
"@types/uuid": "^9.0.4",
|
||||
"@types/ws": "8.5.8",
|
||||
"@typescript-eslint/eslint-plugin": "6.9.1",
|
||||
"@typescript-eslint/parser": "6.9.1",
|
||||
"@typescript-eslint/eslint-plugin": "6.11.0",
|
||||
"@typescript-eslint/parser": "6.11.0",
|
||||
"aws-sdk-client-mock": "3.0.0",
|
||||
"cross-env": "7.0.3",
|
||||
"eslint": "8.52.0",
|
||||
"eslint": "8.53.0",
|
||||
"eslint-plugin-import": "2.29.0",
|
||||
"execa": "8.0.1",
|
||||
"jest": "29.7.0",
|
||||
|
|
|
@ -35,16 +35,10 @@ export class FeaturedService {
|
|||
`${name}:${currentWindow}`,
|
||||
score,
|
||||
element);
|
||||
|
||||
const TTL = await this.redisClient.ttl(`${name}:${currentWindow}`);
|
||||
|
||||
if (TTL === -1) {
|
||||
this.redisClient.expire(`${name}:${currentWindow}`,
|
||||
(windowRange * 3) / 1000, // 1時間
|
||||
//'NX', // "NX -- Set expiry only when the key has no expiry" = 有効期限がないときだけ設定
|
||||
);
|
||||
}
|
||||
|
||||
redisTransaction.expire(
|
||||
`${name}:${currentWindow}`,
|
||||
(windowRange * 3) / 1000,
|
||||
'NX'); // "NX -- Set expiry only when the key has no expiry" = 有効期限がないときだけ設定
|
||||
await redisTransaction.exec();
|
||||
}
|
||||
|
||||
|
|
|
@ -176,30 +176,20 @@ export class HashtagService {
|
|||
|
||||
// チャート用
|
||||
redisPipeline.pfadd(`hashtagUsers:${hashtag}:${window}`, userId);
|
||||
redisPipeline.expire(`hashtagUsers:${hashtag}:${window}`,
|
||||
60 * 60 * 24 * 3, // 3日間
|
||||
'NX', // "NX -- Set expiry only when the key has no expiry" = 有効期限がないときだけ設定
|
||||
);
|
||||
|
||||
// ユニークカウント用
|
||||
// TODO: Bloom Filter を使うようにしても良さそう
|
||||
redisPipeline.sadd(`hashtagUsers:${hashtag}`, userId);
|
||||
|
||||
await redisPipeline.exec();
|
||||
|
||||
const TTL = await this.redisClient.ttl(`hashtagUsers:${hashtag}`);
|
||||
|
||||
if (TTL === -1) {
|
||||
this.redisClient.expire(`hashtagUsers:${hashtag}`,
|
||||
redisPipeline.expire(`hashtagUsers:${hashtag}`,
|
||||
60 * 60, // 1時間
|
||||
//'NX', // "NX -- Set expiry only when the key has no expiry" = 有効期限がないときだけ設定
|
||||
'NX', // "NX -- Set expiry only when the key has no expiry" = 有効期限がないときだけ設定
|
||||
);
|
||||
}
|
||||
|
||||
const TTLwindow = await this.redisClient.ttl(`hashtagUsers:${hashtag}:${window}`);
|
||||
|
||||
if (TTLwindow === -1) {
|
||||
this.redisClient.expire(`hashtagUsers:${hashtag}:${window}`,
|
||||
60 * 60 * 24 * 3, // 3日間
|
||||
//'NX', // "NX -- Set expiry only when the key has no expiry" = 有効期限がないときだけ設定
|
||||
);
|
||||
}
|
||||
redisPipeline.exec();
|
||||
}
|
||||
|
||||
@bindThis
|
||||
|
|
|
@ -276,9 +276,18 @@ export class MfmService {
|
|||
},
|
||||
|
||||
fn: (node) => {
|
||||
if (node.props.name === 'unixtime') {
|
||||
const text = node.children[0]!.type === 'text' ? node.children[0].props.text : '';
|
||||
const date = new Date(parseInt(text, 10) * 1000);
|
||||
const el = doc.createElement('time');
|
||||
el.setAttribute('datetime', date.toISOString());
|
||||
el.textContent = date.toISOString();
|
||||
return el;
|
||||
} else {
|
||||
const el = doc.createElement('i');
|
||||
appendChildren(node.children, el);
|
||||
return el;
|
||||
}
|
||||
},
|
||||
|
||||
blockCode: (node) => {
|
||||
|
|
|
@ -223,7 +223,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
username: MiUser['username'];
|
||||
host: MiUser['host'];
|
||||
isBot: MiUser['isBot'];
|
||||
isIndexable: MiUser['isIndexable'];
|
||||
noindex: MiUser['noindex'];
|
||||
}, data: Option, silent = false): Promise<MiNote> {
|
||||
// チャンネル外にリプライしたら対象のスコープに合わせる
|
||||
// (クライアントサイドでやっても良い処理だと思うけどとりあえずサーバーサイドで)
|
||||
|
@ -378,6 +378,167 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
return note;
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async import(user: {
|
||||
id: MiUser['id'];
|
||||
username: MiUser['username'];
|
||||
host: MiUser['host'];
|
||||
isBot: MiUser['isBot'];
|
||||
noindex: MiUser['noindex'];
|
||||
}, data: Option, silent = false): Promise<MiNote> {
|
||||
// チャンネル外にリプライしたら対象のスコープに合わせる
|
||||
// (クライアントサイドでやっても良い処理だと思うけどとりあえずサーバーサイドで)
|
||||
if (data.reply && data.channel && data.reply.channelId !== data.channel.id) {
|
||||
if (data.reply.channelId) {
|
||||
data.channel = await this.channelsRepository.findOneBy({ id: data.reply.channelId });
|
||||
} else {
|
||||
data.channel = null;
|
||||
}
|
||||
}
|
||||
|
||||
// チャンネル内にリプライしたら対象のスコープに合わせる
|
||||
// (クライアントサイドでやっても良い処理だと思うけどとりあえずサーバーサイドで)
|
||||
if (data.reply && (data.channel == null) && data.reply.channelId) {
|
||||
data.channel = await this.channelsRepository.findOneBy({ id: data.reply.channelId });
|
||||
}
|
||||
|
||||
if (data.createdAt == null) data.createdAt = new Date();
|
||||
if (data.visibility == null) data.visibility = 'public';
|
||||
if (data.localOnly == null) data.localOnly = false;
|
||||
if (data.channel != null) data.visibility = 'public';
|
||||
if (data.channel != null) data.visibleUsers = [];
|
||||
if (data.channel != null) data.localOnly = true;
|
||||
|
||||
const meta = await this.metaService.fetch();
|
||||
|
||||
if (data.visibility === 'public' && data.channel == null) {
|
||||
const sensitiveWords = meta.sensitiveWords;
|
||||
if (this.isSensitive(data, sensitiveWords)) {
|
||||
data.visibility = 'home';
|
||||
} else if ((await this.roleService.getUserPolicies(user.id)).canPublicNote === false) {
|
||||
data.visibility = 'home';
|
||||
}
|
||||
}
|
||||
|
||||
const inSilencedInstance = this.utilityService.isSilencedHost(meta.silencedHosts, user.host);
|
||||
|
||||
if (data.visibility === 'public' && inSilencedInstance && user.host !== null) {
|
||||
data.visibility = 'home';
|
||||
}
|
||||
|
||||
if (data.renote) {
|
||||
switch (data.renote.visibility) {
|
||||
case 'public':
|
||||
// public noteは無条件にrenote可能
|
||||
break;
|
||||
case 'home':
|
||||
// home noteはhome以下にrenote可能
|
||||
if (data.visibility === 'public') {
|
||||
data.visibility = 'home';
|
||||
}
|
||||
break;
|
||||
case 'followers':
|
||||
// 他人のfollowers noteはreject
|
||||
if (data.renote.userId !== user.id) {
|
||||
throw new Error('Renote target is not public or home');
|
||||
}
|
||||
|
||||
// Renote対象がfollowersならfollowersにする
|
||||
data.visibility = 'followers';
|
||||
break;
|
||||
case 'specified':
|
||||
// specified / direct noteはreject
|
||||
throw new Error('Renote target is not public or home');
|
||||
}
|
||||
}
|
||||
|
||||
// Check blocking
|
||||
if (data.renote && data.text == null && data.poll == null && (data.files == null || data.files.length === 0)) {
|
||||
if (data.renote.userHost === null) {
|
||||
if (data.renote.userId !== user.id) {
|
||||
const blocked = await this.userBlockingService.checkBlocked(data.renote.userId, user.id);
|
||||
if (blocked) {
|
||||
throw new Error('blocked');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 返信対象がpublicではないならhomeにする
|
||||
if (data.reply && data.reply.visibility !== 'public' && data.visibility === 'public') {
|
||||
data.visibility = 'home';
|
||||
}
|
||||
|
||||
// ローカルのみをRenoteしたらローカルのみにする
|
||||
if (data.renote && data.renote.localOnly && data.channel == null) {
|
||||
data.localOnly = true;
|
||||
}
|
||||
|
||||
// ローカルのみにリプライしたらローカルのみにする
|
||||
if (data.reply && data.reply.localOnly && data.channel == null) {
|
||||
data.localOnly = true;
|
||||
}
|
||||
|
||||
if (data.text) {
|
||||
if (data.text.length > DB_MAX_NOTE_TEXT_LENGTH) {
|
||||
data.text = data.text.slice(0, DB_MAX_NOTE_TEXT_LENGTH);
|
||||
}
|
||||
data.text = data.text.trim();
|
||||
} else {
|
||||
data.text = null;
|
||||
}
|
||||
|
||||
let tags = data.apHashtags;
|
||||
let emojis = data.apEmojis;
|
||||
let mentionedUsers = data.apMentions;
|
||||
|
||||
// Parse MFM if needed
|
||||
if (!tags || !emojis || !mentionedUsers) {
|
||||
const tokens = (data.text ? mfm.parse(data.text)! : []);
|
||||
const cwTokens = data.cw ? mfm.parse(data.cw)! : [];
|
||||
const choiceTokens = data.poll && data.poll.choices
|
||||
? concat(data.poll.choices.map(choice => mfm.parse(choice)!))
|
||||
: [];
|
||||
|
||||
const combinedTokens = tokens.concat(cwTokens).concat(choiceTokens);
|
||||
|
||||
tags = data.apHashtags ?? extractHashtags(combinedTokens);
|
||||
|
||||
emojis = data.apEmojis ?? extractCustomEmojisFromMfm(combinedTokens);
|
||||
|
||||
mentionedUsers = data.apMentions ?? await this.extractMentionedUsers(user, combinedTokens);
|
||||
}
|
||||
|
||||
tags = tags.filter(tag => Array.from(tag).length <= 128).splice(0, 32);
|
||||
|
||||
if (data.reply && (user.id !== data.reply.userId) && !mentionedUsers.some(u => u.id === data.reply!.userId)) {
|
||||
mentionedUsers.push(await this.usersRepository.findOneByOrFail({ id: data.reply!.userId }));
|
||||
}
|
||||
|
||||
if (data.visibility === 'specified') {
|
||||
if (data.visibleUsers == null) throw new Error('invalid param');
|
||||
|
||||
for (const u of data.visibleUsers) {
|
||||
if (!mentionedUsers.some(x => x.id === u.id)) {
|
||||
mentionedUsers.push(u);
|
||||
}
|
||||
}
|
||||
|
||||
if (data.reply && !data.visibleUsers.some(x => x.id === data.reply!.userId)) {
|
||||
data.visibleUsers.push(await this.usersRepository.findOneByOrFail({ id: data.reply!.userId }));
|
||||
}
|
||||
}
|
||||
|
||||
const note = await this.insertNote(user, data, tags, emojis, mentionedUsers);
|
||||
|
||||
setImmediate('post created', { signal: this.#shutdownController.signal }).then(
|
||||
() => this.postNoteImported(note, user, data, silent, tags!, mentionedUsers!),
|
||||
() => { /* aborted, ignore this */ },
|
||||
);
|
||||
|
||||
return note;
|
||||
}
|
||||
|
||||
@bindThis
|
||||
private async insertNote(user: { id: MiUser['id']; host: MiUser['host']; }, data: Option, tags: string[], emojis: string[], mentionedUsers: MinimumUser[]) {
|
||||
const insert = new MiNote({
|
||||
|
@ -481,7 +642,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
username: MiUser['username'];
|
||||
host: MiUser['host'];
|
||||
isBot: MiUser['isBot'];
|
||||
isIndexable: MiUser['isIndexable'];
|
||||
noindex: MiUser['noindex'];
|
||||
}, data: Option, silent: boolean, tags: string[], mentionedUsers: MinimumUser[]) {
|
||||
const meta = await this.metaService.fetch();
|
||||
|
||||
|
@ -535,12 +696,14 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
followeeId: user.id,
|
||||
notify: 'normal',
|
||||
}).then(followings => {
|
||||
if (note.visibility !== 'specified') {
|
||||
for (const following of followings) {
|
||||
// TODO: ワードミュート考慮
|
||||
this.notificationService.createNotification(following.followerId, 'note', {
|
||||
noteId: note.id,
|
||||
}, user.id);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -712,7 +875,106 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
}
|
||||
|
||||
// Register to search database
|
||||
if (user.isIndexable) this.index(note);
|
||||
if (!user.noindex) this.index(note);
|
||||
}
|
||||
|
||||
@bindThis
|
||||
private async postNoteImported(note: MiNote, user: {
|
||||
id: MiUser['id'];
|
||||
username: MiUser['username'];
|
||||
host: MiUser['host'];
|
||||
isBot: MiUser['isBot'];
|
||||
noindex: MiUser['noindex'];
|
||||
}, data: Option, silent: boolean, tags: string[], mentionedUsers: MinimumUser[]) {
|
||||
const meta = await this.metaService.fetch();
|
||||
|
||||
this.notesChart.update(note, true);
|
||||
if (meta.enableChartsForRemoteUser || (user.host == null)) {
|
||||
this.perUserNotesChart.update(user, note, true);
|
||||
}
|
||||
|
||||
// Register host
|
||||
if (this.userEntityService.isRemoteUser(user)) {
|
||||
this.federatedInstanceService.fetch(user.host).then(async i => {
|
||||
if (note.renote && note.text) {
|
||||
this.instancesRepository.increment({ id: i.id }, 'notesCount', 1);
|
||||
} else if (!note.renote) {
|
||||
this.instancesRepository.increment({ id: i.id }, 'notesCount', 1);
|
||||
}
|
||||
if ((await this.metaService.fetch()).enableChartsForFederatedInstances) {
|
||||
this.instanceChart.updateNote(i.host, note, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (data.renote && data.text) {
|
||||
// Increment notes count (user)
|
||||
this.incNotesCountOfUser(user);
|
||||
} else if (!data.renote) {
|
||||
// Increment notes count (user)
|
||||
this.incNotesCountOfUser(user);
|
||||
}
|
||||
|
||||
this.pushToTl(note, user);
|
||||
|
||||
this.antennaService.addNoteToAntennas(note, user);
|
||||
|
||||
if (data.reply) {
|
||||
this.saveReply(data.reply, note);
|
||||
}
|
||||
|
||||
if (data.reply == null) {
|
||||
// TODO: キャッシュ
|
||||
this.followingsRepository.findBy({
|
||||
followeeId: user.id,
|
||||
notify: 'normal',
|
||||
}).then(followings => {
|
||||
for (const following of followings) {
|
||||
// TODO: ワードミュート考慮
|
||||
this.notificationService.createNotification(following.followerId, 'note', {
|
||||
noteId: note.id,
|
||||
}, user.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (data.renote && data.text == null && data.renote.userId !== user.id && !user.isBot) {
|
||||
this.incRenoteCount(data.renote);
|
||||
}
|
||||
|
||||
if (data.poll && data.poll.expiresAt) {
|
||||
const delay = data.poll.expiresAt.getTime() - Date.now();
|
||||
this.queueService.endedPollNotificationQueue.add(note.id, {
|
||||
noteId: note.id,
|
||||
}, {
|
||||
delay,
|
||||
removeOnComplete: true,
|
||||
});
|
||||
}
|
||||
|
||||
// Pack the note
|
||||
const noteObj = await this.noteEntityService.pack(note, null, { skipHide: true, withReactionAndUserPairCache: true });
|
||||
|
||||
if (data.channel) {
|
||||
this.channelsRepository.increment({ id: data.channel.id }, 'notesCount', 1);
|
||||
this.channelsRepository.update(data.channel.id, {
|
||||
lastNotedAt: new Date(),
|
||||
});
|
||||
|
||||
this.notesRepository.countBy({
|
||||
userId: user.id,
|
||||
channelId: data.channel.id,
|
||||
}).then(count => {
|
||||
// この処理が行われるのはノート作成後なので、ノートが一つしかなかったら最初の投稿だと判断できる
|
||||
// TODO: とはいえノートを削除して何回も投稿すればその分だけインクリメントされる雑さもあるのでどうにかしたい
|
||||
if (count === 1) {
|
||||
this.channelsRepository.increment({ id: data.channel!.id }, 'usersCount', 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Register to search database
|
||||
if (!user.noindex) this.index(note);
|
||||
}
|
||||
|
||||
@bindThis
|
||||
|
|
|
@ -224,7 +224,7 @@ export class NoteEditService implements OnApplicationShutdown {
|
|||
username: MiUser['username'];
|
||||
host: MiUser['host'];
|
||||
isBot: MiUser['isBot'];
|
||||
isIndexable: MiUser['isIndexable'];
|
||||
noindex: MiUser['noindex'];
|
||||
}, editid: MiNote['id'], data: Option, silent = false): Promise<MiNote> {
|
||||
if (!editid) {
|
||||
throw new Error('fail');
|
||||
|
@ -499,7 +499,7 @@ export class NoteEditService implements OnApplicationShutdown {
|
|||
username: MiUser['username'];
|
||||
host: MiUser['host'];
|
||||
isBot: MiUser['isBot'];
|
||||
isIndexable: MiUser['isIndexable'];
|
||||
noindex: MiUser['noindex'];
|
||||
}, data: Option, silent: boolean, tags: string[], mentionedUsers: MinimumUser[]) {
|
||||
// Register host
|
||||
if (this.userEntityService.isRemoteUser(user)) {
|
||||
|
@ -688,7 +688,7 @@ export class NoteEditService implements OnApplicationShutdown {
|
|||
}
|
||||
|
||||
// Register to search database
|
||||
if (user.isIndexable) this.index(note);
|
||||
if (!user.noindex) this.index(note);
|
||||
}
|
||||
|
||||
@bindThis
|
||||
|
|
|
@ -16,6 +16,7 @@ import type { DbQueue, DeliverQueue, EndedPollNotificationQueue, InboxQueue, Obj
|
|||
import type { DbJobData, DeliverJobData, RelationshipJobData, ThinUser } from '../queue/types.js';
|
||||
import type httpSignature from '@peertube/http-signature';
|
||||
import type * as Bull from 'bullmq';
|
||||
import { MiNote } from '@/models/Note.js';
|
||||
|
||||
@Injectable()
|
||||
export class QueueService {
|
||||
|
@ -258,6 +259,54 @@ export class QueueService {
|
|||
});
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public createImportNotesJob(user: ThinUser, fileId: MiDriveFile['id'], type: string | null | undefined) {
|
||||
return this.dbQueue.add('importNotes', {
|
||||
user: { id: user.id },
|
||||
fileId: fileId,
|
||||
type: type,
|
||||
}, {
|
||||
removeOnComplete: true,
|
||||
removeOnFail: true,
|
||||
});
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public createImportTweetsToDbJob(user: ThinUser, targets: string[], note: MiNote['id'] | null) {
|
||||
const jobs = targets.map(rel => this.generateToDbJobData('importTweetsToDb', { user, target: rel, note }));
|
||||
return this.dbQueue.addBulk(jobs);
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public createImportMastoToDbJob(user: ThinUser, targets: string[]) {
|
||||
const jobs = targets.map(rel => this.generateToDbJobData('importMastoToDb', { user, target: rel }));
|
||||
return this.dbQueue.addBulk(jobs);
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public createImportPleroToDbJob(user: ThinUser, targets: string[]) {
|
||||
const jobs = targets.map(rel => this.generateToDbJobData('importPleroToDb', { user, target: rel }));
|
||||
return this.dbQueue.addBulk(jobs);
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public createImportKeyNotesToDbJob(user: ThinUser, targets: string[], note: MiNote['id'] | null) {
|
||||
const jobs = targets.map(rel => this.generateToDbJobData('importKeyNotesToDb', { user, target: rel, note }));
|
||||
return this.dbQueue.addBulk(jobs);
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public createImportIGToDbJob(user: ThinUser, targets: string[]) {
|
||||
const jobs = targets.map(rel => this.generateToDbJobData('importIGToDb', { user, target: rel }));
|
||||
return this.dbQueue.addBulk(jobs);
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public createImportFBToDbJob(user: ThinUser, targets: string[]) {
|
||||
const jobs = targets.map(rel => this.generateToDbJobData('importFBToDb', { user, target: rel }));
|
||||
return this.dbQueue.addBulk(jobs);
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public createImportFollowingToDbJob(user: ThinUser, targets: string[], withReplies?: boolean) {
|
||||
const jobs = targets.map(rel => this.generateToDbJobData('importFollowingToDb', { user, target: rel, withReplies }));
|
||||
|
@ -293,7 +342,7 @@ export class QueueService {
|
|||
}
|
||||
|
||||
@bindThis
|
||||
private generateToDbJobData<T extends 'importFollowingToDb' | 'importBlockingToDb', D extends DbJobData<T>>(name: T, data: D): {
|
||||
private generateToDbJobData<T extends 'importFollowingToDb' | 'importBlockingToDb' | 'importTweetsToDb' | 'importIGToDb' | 'importFBToDb' | 'importMastoToDb' | 'importPleroToDb' | 'importKeyNotesToDb', D extends DbJobData<T>>(name: T, data: D): {
|
||||
name: string,
|
||||
data: D,
|
||||
opts: Bull.JobsOptions,
|
||||
|
|
|
@ -47,6 +47,7 @@ export type RolePolicies = {
|
|||
userListLimit: number;
|
||||
userEachUserListsLimit: number;
|
||||
rateLimitFactor: number;
|
||||
canImportNotes: boolean;
|
||||
};
|
||||
|
||||
export const DEFAULT_POLICIES: RolePolicies = {
|
||||
|
@ -73,6 +74,7 @@ export const DEFAULT_POLICIES: RolePolicies = {
|
|||
userListLimit: 10,
|
||||
userEachUserListsLimit: 50,
|
||||
rateLimitFactor: 1,
|
||||
canImportNotes: true,
|
||||
};
|
||||
|
||||
@Injectable()
|
||||
|
@ -323,6 +325,7 @@ export class RoleService implements OnApplicationShutdown {
|
|||
userListLimit: calc('userListLimit', vs => Math.max(...vs)),
|
||||
userEachUserListsLimit: calc('userEachUserListsLimit', vs => Math.max(...vs)),
|
||||
rateLimitFactor: calc('rateLimitFactor', vs => Math.max(...vs)),
|
||||
canImportNotes: calc('canImportNotes', vs => vs.some(v => v === true)),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -93,6 +93,7 @@ export class SearchService {
|
|||
'userHost',
|
||||
'channelId',
|
||||
'tags',
|
||||
'attachedFileTypes',
|
||||
],
|
||||
typoTolerance: {
|
||||
enabled: false,
|
||||
|
@ -138,6 +139,7 @@ export class SearchService {
|
|||
cw: note.cw,
|
||||
text: note.text,
|
||||
tags: note.tags,
|
||||
attachedFileTypes: note.attachedFileTypes,
|
||||
}], {
|
||||
primaryKey: 'id',
|
||||
});
|
||||
|
@ -182,6 +184,44 @@ export class SearchService {
|
|||
filter.qs.push({ op: '=', k: 'userHost', v: opts.host });
|
||||
}
|
||||
}
|
||||
if (opts.filetype) {
|
||||
if (opts.filetype === 'image') {
|
||||
filter.qs.push({ op: 'or', qs: [
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'image/webp' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'image/png' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'image/jpeg' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'image/avif' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'image/apng' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'image/gif' },
|
||||
] });
|
||||
} else if (opts.filetype === 'video') {
|
||||
filter.qs.push({ op: 'or', qs: [
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'video/mp4' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'video/webm' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'video/mpeg' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'video/x-m4v' },
|
||||
] });
|
||||
} else if (opts.filetype === 'audio') {
|
||||
filter.qs.push({ op: 'or', qs: [
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'audio/mpeg' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'audio/flac' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'audio/wav' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'audio/aac' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'audio/webm' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'audio/opus' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'audio/ogg' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'audio/x-m4a' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'audio/mod' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'audio/s3m' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'audio/xm' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'audio/it' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'audio/x-mod' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'audio/x-s3m' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'audio/x-xm' },
|
||||
{ op: '=', k: 'attachedFileTypes', v: 'audio/x-it' },
|
||||
] });
|
||||
}
|
||||
}
|
||||
const res = await this.meilisearchNoteIndex!.search(q, {
|
||||
sort: [`createdAt:${opts.order ? opts.order : 'desc'}`],
|
||||
matchingStrategy: 'all',
|
||||
|
|
|
@ -23,7 +23,7 @@ import { MfmService } from '@/core/MfmService.js';
|
|||
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
||||
import { DriveFileEntityService } from '@/core/entities/DriveFileEntityService.js';
|
||||
import type { MiUserKeypair } from '@/models/UserKeypair.js';
|
||||
import type { UsersRepository, UserProfilesRepository, NotesRepository, DriveFilesRepository, PollsRepository } from '@/models/_.js';
|
||||
import type { UsersRepository, UserProfilesRepository, NotesRepository, DriveFilesRepository, PollsRepository, InstancesRepository } from '@/models/_.js';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
import { isNotNull } from '@/misc/is-not-null.js';
|
||||
|
@ -31,6 +31,7 @@ import { IdService } from '@/core/IdService.js';
|
|||
import { LdSignatureService } from './LdSignatureService.js';
|
||||
import { ApMfmService } from './ApMfmService.js';
|
||||
import type { IAccept, IActivity, IAdd, IAnnounce, IApDocument, IApEmoji, IApHashtag, IApImage, IApMention, IBlock, ICreate, IDelete, IFlag, IFollow, IKey, ILike, IMove, IObject, IPost, IQuestion, IReject, IRemove, ITombstone, IUndo, IUpdate } from './type.js';
|
||||
import { MetaService } from '../MetaService.js';
|
||||
|
||||
@Injectable()
|
||||
export class ApRendererService {
|
||||
|
@ -53,6 +54,9 @@ export class ApRendererService {
|
|||
@Inject(DI.pollsRepository)
|
||||
private pollsRepository: PollsRepository,
|
||||
|
||||
@Inject(DI.instancesRepository)
|
||||
private instancesRepository: InstancesRepository,
|
||||
|
||||
private customEmojiService: CustomEmojiService,
|
||||
private userEntityService: UserEntityService,
|
||||
private driveFileEntityService: DriveFileEntityService,
|
||||
|
@ -61,6 +65,7 @@ export class ApRendererService {
|
|||
private apMfmService: ApMfmService,
|
||||
private mfmService: MfmService,
|
||||
private idService: IdService,
|
||||
private metaService: MetaService,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@ -265,14 +270,28 @@ export class ApRendererService {
|
|||
@bindThis
|
||||
public async renderLike(noteReaction: MiNoteReaction, note: { uri: string | null }): Promise<ILike> {
|
||||
const reaction = noteReaction.reaction;
|
||||
const meta = await this.metaService.fetch(true);
|
||||
let isMastodon = false;
|
||||
|
||||
if (meta.defaultLike && reaction.replaceAll(':', '') === meta.defaultLike.replaceAll(':', '')) {
|
||||
const note = await this.notesRepository.findOneBy({ id: noteReaction.noteId });
|
||||
|
||||
if (note && note.userHost) {
|
||||
const instance = await this.instancesRepository.findOneBy({ host: note.userHost });
|
||||
|
||||
if (instance && instance.softwareName === 'mastodon') isMastodon = true;
|
||||
if (instance && instance.softwareName === 'akkoma') isMastodon = true;
|
||||
if (instance && instance.softwareName === 'pleroma') isMastodon = true;
|
||||
}
|
||||
}
|
||||
|
||||
const object: ILike = {
|
||||
type: 'Like',
|
||||
id: `${this.config.url}/likes/${noteReaction.id}`,
|
||||
actor: `${this.config.url}/users/${noteReaction.userId}`,
|
||||
object: note.uri ? note.uri : `${this.config.url}/notes/${noteReaction.noteId}`,
|
||||
content: reaction,
|
||||
_misskey_reaction: reaction,
|
||||
content: isMastodon ? undefined : reaction,
|
||||
_misskey_reaction: isMastodon ? undefined : reaction,
|
||||
};
|
||||
|
||||
if (reaction.startsWith(':')) {
|
||||
|
@ -466,7 +485,7 @@ export class ApRendererService {
|
|||
const attachment = profile.fields.map(field => ({
|
||||
type: 'PropertyValue',
|
||||
name: field.name,
|
||||
value: /^https?:/.test(field.value)
|
||||
value: (field.value.startsWith('http://') || field.value.startsWith('https://'))
|
||||
? `<a href="${new URL(field.value).href}" rel="me nofollow noopener" target="_blank">${new URL(field.value).href}</a>`
|
||||
: field.value,
|
||||
}));
|
||||
|
@ -506,7 +525,7 @@ export class ApRendererService {
|
|||
discoverable: user.isExplorable,
|
||||
publicKey: this.renderKey(user, keypair, '#main-key'),
|
||||
isCat: user.isCat,
|
||||
isIndexable: user.isIndexable,
|
||||
noindex: user.noindex,
|
||||
speakAsCat: user.speakAsCat,
|
||||
attachment: attachment.length ? attachment : undefined,
|
||||
};
|
||||
|
|
|
@ -310,7 +310,7 @@ export class ApPersonService implements OnModuleInit {
|
|||
backgroundId: null,
|
||||
lastFetchedAt: new Date(),
|
||||
name: truncate(person.name, nameLength),
|
||||
isIndexable: person.isIndexable ?? true,
|
||||
noindex: (person as any).noindex ?? false,
|
||||
isLocked: person.manuallyApprovesFollowers,
|
||||
movedToUri: person.movedTo,
|
||||
movedAt: person.movedTo ? new Date() : null,
|
||||
|
@ -477,7 +477,7 @@ export class ApPersonService implements OnModuleInit {
|
|||
isBot: getApType(object) === 'Service' || getApType(object) === 'Application',
|
||||
isCat: (person as any).isCat === true,
|
||||
speakAsCat: (person as any).speakAsCat != null ? (person as any).speakAsCat === true : (person as any).isCat === true,
|
||||
isIndexable: person.isIndexable ?? true,
|
||||
noindex: (person as any).noindex ?? false,
|
||||
isLocked: person.manuallyApprovesFollowers,
|
||||
movedToUri: person.movedTo ?? null,
|
||||
alsoKnownAs: person.alsoKnownAs ?? null,
|
||||
|
|
|
@ -184,7 +184,7 @@ export interface IActor extends IObject {
|
|||
};
|
||||
'vcard:bday'?: string;
|
||||
'vcard:Address'?: string;
|
||||
isIndexable?: boolean;
|
||||
noindex?: boolean;
|
||||
listenbrainz?: string;
|
||||
backgroundUrl?: string;
|
||||
}
|
||||
|
|
|
@ -399,7 +399,7 @@ export class UserEntityService implements OnModuleInit {
|
|||
}))) : [],
|
||||
isBot: user.isBot,
|
||||
isCat: user.isCat,
|
||||
isIndexable: user.isIndexable,
|
||||
noindex: user.noindex,
|
||||
isSilenced: user.isSilenced || this.roleService.getUserPolicies(user.id).then(r => !r.canPublicNote),
|
||||
speakAsCat: user.speakAsCat ?? false,
|
||||
approved: user.approved,
|
||||
|
|
|
@ -9,7 +9,7 @@ export function createTemp(): Promise<[string, () => void]> {
|
|||
return new Promise<[string, () => void]>((res, rej) => {
|
||||
tmp.file((e, path, fd, cleanup) => {
|
||||
if (e) return rej(e);
|
||||
res([path, process.env.NODE_ENV === 'production' ? cleanup : () => {}]);
|
||||
res([path, process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'development' ? cleanup : () => {}]);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ export function createTempDir(): Promise<[string, () => void]> {
|
|||
},
|
||||
(e, path, cleanup) => {
|
||||
if (e) return rej(e);
|
||||
res([path, process.env.NODE_ENV === 'production' ? cleanup : () => {}]);
|
||||
res([path, process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'development' ? cleanup : () => {}]);
|
||||
},
|
||||
);
|
||||
});
|
||||
|
|
|
@ -509,6 +509,11 @@ export class MiMeta {
|
|||
})
|
||||
public enableFanoutTimeline: boolean;
|
||||
|
||||
@Column('boolean', {
|
||||
default: true,
|
||||
})
|
||||
public enableFanoutTimelineDbFallback: boolean;
|
||||
|
||||
@Column('integer', {
|
||||
default: 300,
|
||||
})
|
||||
|
@ -533,4 +538,10 @@ export class MiMeta {
|
|||
default: 0,
|
||||
})
|
||||
public notesPerOneAd: number;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 500,
|
||||
nullable: true,
|
||||
})
|
||||
public defaultLike: string | null;
|
||||
}
|
||||
|
|
|
@ -189,10 +189,10 @@ export class MiUser {
|
|||
public isSilenced: boolean;
|
||||
|
||||
@Column('boolean', {
|
||||
default: true,
|
||||
comment: 'Whether the User\'s notes get indexed.',
|
||||
default: false,
|
||||
comment: 'Whether the User\'s notes dont get indexed.',
|
||||
})
|
||||
public isIndexable: boolean;
|
||||
public noindex: boolean;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
|
|
|
@ -79,7 +79,7 @@ export const packedUserLiteSchema = {
|
|||
type: 'boolean',
|
||||
nullable: false, optional: false,
|
||||
},
|
||||
isIndexable: {
|
||||
noindex: {
|
||||
type: 'boolean',
|
||||
nullable: false, optional: false,
|
||||
},
|
||||
|
|
|
@ -29,6 +29,7 @@ import { ExportUserListsProcessorService } from './processors/ExportUserListsPro
|
|||
import { ExportAntennasProcessorService } from './processors/ExportAntennasProcessorService.js';
|
||||
import { ImportBlockingProcessorService } from './processors/ImportBlockingProcessorService.js';
|
||||
import { ImportCustomEmojisProcessorService } from './processors/ImportCustomEmojisProcessorService.js';
|
||||
import { ImportNotesProcessorService } from './processors/ImportNotesProcessorService.js';
|
||||
import { ImportFollowingProcessorService } from './processors/ImportFollowingProcessorService.js';
|
||||
import { ImportMutingProcessorService } from './processors/ImportMutingProcessorService.js';
|
||||
import { ImportUserListsProcessorService } from './processors/ImportUserListsProcessorService.js';
|
||||
|
@ -61,6 +62,7 @@ import { RelationshipProcessorService } from './processors/RelationshipProcessor
|
|||
ExportBlockingProcessorService,
|
||||
ExportUserListsProcessorService,
|
||||
ExportAntennasProcessorService,
|
||||
ImportNotesProcessorService,
|
||||
ImportFollowingProcessorService,
|
||||
ImportMutingProcessorService,
|
||||
ImportBlockingProcessorService,
|
||||
|
|
|
@ -41,6 +41,7 @@ import { CleanProcessorService } from './processors/CleanProcessorService.js';
|
|||
import { AggregateRetentionProcessorService } from './processors/AggregateRetentionProcessorService.js';
|
||||
import { QueueLoggerService } from './QueueLoggerService.js';
|
||||
import { QUEUE, baseQueueOptions } from './const.js';
|
||||
import { ImportNotesProcessorService } from './processors/ImportNotesProcessorService.js';
|
||||
|
||||
// ref. https://github.com/misskey-dev/misskey/pull/7635#issue-971097019
|
||||
function httpRelatedBackoff(attemptsMade: number) {
|
||||
|
@ -100,6 +101,7 @@ export class QueueProcessorService implements OnApplicationShutdown {
|
|||
private exportUserListsProcessorService: ExportUserListsProcessorService,
|
||||
private exportAntennasProcessorService: ExportAntennasProcessorService,
|
||||
private importFollowingProcessorService: ImportFollowingProcessorService,
|
||||
private importNotesProcessorService: ImportNotesProcessorService,
|
||||
private importMutingProcessorService: ImportMutingProcessorService,
|
||||
private importBlockingProcessorService: ImportBlockingProcessorService,
|
||||
private importUserListsProcessorService: ImportUserListsProcessorService,
|
||||
|
@ -174,6 +176,13 @@ export class QueueProcessorService implements OnApplicationShutdown {
|
|||
case 'exportUserLists': return this.exportUserListsProcessorService.process(job);
|
||||
case 'exportAntennas': return this.exportAntennasProcessorService.process(job);
|
||||
case 'importFollowing': return this.importFollowingProcessorService.process(job);
|
||||
case 'importNotes': return this.importNotesProcessorService.process(job);
|
||||
case 'importTweetsToDb': return this.importNotesProcessorService.processTwitterDb(job);
|
||||
case 'importIGToDb': return this.importNotesProcessorService.processIGDb(job);
|
||||
case 'importFBToDb': return this.importNotesProcessorService.processFBDb(job);
|
||||
case 'importMastoToDb': return this.importNotesProcessorService.processMastoToDb(job);
|
||||
case 'importPleroToDb': return this.importNotesProcessorService.processPleroToDb(job);
|
||||
case 'importKeyNotesToDb': return this.importNotesProcessorService.processKeyNotesToDb(job);
|
||||
case 'importFollowingToDb': return this.importFollowingProcessorService.processDb(job);
|
||||
case 'importMuting': return this.importMutingProcessorService.process(job);
|
||||
case 'importBlocking': return this.importBlockingProcessorService.process(job);
|
||||
|
|
|
@ -0,0 +1,606 @@
|
|||
import * as fs from 'node:fs';
|
||||
import * as vm from 'node:vm';
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { ZipReader } from 'slacc';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import type { UsersRepository, DriveFilesRepository, MiDriveFile, MiNote, NotesRepository, MiUser } from '@/models/_.js';
|
||||
import type Logger from '@/logger.js';
|
||||
import { DownloadService } from '@/core/DownloadService.js';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
import { QueueService } from '@/core/QueueService.js';
|
||||
import { createTemp, createTempDir } from '@/misc/create-temp.js';
|
||||
import { NoteCreateService } from '@/core/NoteCreateService.js';
|
||||
import { DriveService } from '@/core/DriveService.js';
|
||||
import { MfmService } from '@/core/MfmService.js';
|
||||
import { ApNoteService } from '@/core/activitypub/models/ApNoteService.js';
|
||||
import { extractApHashtagObjects } from '@/core/activitypub/models/tag.js';
|
||||
import { QueueLoggerService } from '../QueueLoggerService.js';
|
||||
import type * as Bull from 'bullmq';
|
||||
import type { DbNoteImportToDbJobData, DbNoteImportJobData, DbKeyNoteImportToDbJobData } from '../types.js';
|
||||
|
||||
@Injectable()
|
||||
export class ImportNotesProcessorService {
|
||||
private logger: Logger;
|
||||
|
||||
constructor(
|
||||
@Inject(DI.usersRepository)
|
||||
private usersRepository: UsersRepository,
|
||||
|
||||
@Inject(DI.driveFilesRepository)
|
||||
private driveFilesRepository: DriveFilesRepository,
|
||||
|
||||
@Inject(DI.notesRepository)
|
||||
private notesRepository: NotesRepository,
|
||||
|
||||
private queueService: QueueService,
|
||||
private noteCreateService: NoteCreateService,
|
||||
private mfmService: MfmService,
|
||||
private apNoteService: ApNoteService,
|
||||
private driveService: DriveService,
|
||||
private downloadService: DownloadService,
|
||||
private queueLoggerService: QueueLoggerService,
|
||||
) {
|
||||
this.logger = this.queueLoggerService.logger.createSubLogger('import-notes');
|
||||
}
|
||||
|
||||
@bindThis
|
||||
private async uploadFiles(dir: string, user: MiUser) {
|
||||
const fileList = fs.readdirSync(dir);
|
||||
for await (const file of fileList) {
|
||||
const name = `${dir}/${file}`;
|
||||
if (fs.statSync(name).isDirectory()) {
|
||||
await this.uploadFiles(name, user);
|
||||
} else {
|
||||
const exists = await this.driveFilesRepository.findOneBy({ name: file, userId: user.id });
|
||||
|
||||
if (file.endsWith('.srt')) return;
|
||||
|
||||
if (!exists) {
|
||||
await this.driveService.addFile({
|
||||
user: user,
|
||||
path: name,
|
||||
name: file,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Function was taken from Firefish and modified for our needs
|
||||
@bindThis
|
||||
private async recreateChain(idField: string, replyField: string, arr: any[]): Promise<any[]> {
|
||||
type NotesMap = {
|
||||
[id: string]: any;
|
||||
};
|
||||
const notesTree: any[] = [];
|
||||
const noteById: NotesMap = {};
|
||||
const notesWaitingForParent: NotesMap = {};
|
||||
|
||||
for await (const note of arr) {
|
||||
noteById[note[idField]] = note;
|
||||
note.childNotes = [];
|
||||
|
||||
const children = notesWaitingForParent[note[idField]];
|
||||
if (children) {
|
||||
note.childNotes.push(...children);
|
||||
}
|
||||
|
||||
if (note[replyField] == null) {
|
||||
notesTree.push(note);
|
||||
continue;
|
||||
}
|
||||
|
||||
const parent = noteById[note[replyField]];
|
||||
if (parent) {
|
||||
parent.childNotes.push(note);
|
||||
} else {
|
||||
notesWaitingForParent[note[replyField]] ||= [];
|
||||
notesWaitingForParent[note[replyField]].push(note);
|
||||
}
|
||||
}
|
||||
|
||||
return notesTree;
|
||||
}
|
||||
|
||||
@bindThis
|
||||
private isIterable(obj: any) {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
return typeof obj[Symbol.iterator] === 'function';
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async process(job: Bull.Job<DbNoteImportJobData>): Promise<void> {
|
||||
this.logger.info(`Starting note import of ${job.data.user.id} ...`);
|
||||
|
||||
const user = await this.usersRepository.findOneBy({ id: job.data.user.id });
|
||||
if (user == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
const file = await this.driveFilesRepository.findOneBy({
|
||||
id: job.data.fileId,
|
||||
});
|
||||
if (file == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
const type = job.data.type;
|
||||
|
||||
if (type === 'Twitter' || file.name.startsWith('twitter') && file.name.endsWith('.zip')) {
|
||||
const [path, cleanup] = await createTempDir();
|
||||
|
||||
this.logger.info(`Temp dir is ${path}`);
|
||||
|
||||
const destPath = path + '/twitter.zip';
|
||||
|
||||
try {
|
||||
fs.writeFileSync(destPath, '', 'binary');
|
||||
await this.downloadService.downloadUrl(file.url, destPath);
|
||||
} catch (e) { // TODO: 何度か再試行
|
||||
if (e instanceof Error || typeof e === 'string') {
|
||||
this.logger.error(e);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
||||
const outputPath = path + '/twitter';
|
||||
try {
|
||||
this.logger.succ(`Unzipping to ${outputPath}`);
|
||||
ZipReader.withDestinationPath(outputPath).viaBuffer(await fs.promises.readFile(destPath));
|
||||
const fakeWindow: any = {
|
||||
window: {
|
||||
YTD: {
|
||||
tweets: {
|
||||
part0: {},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
const script = new vm.Script(fs.readFileSync(outputPath + '/data/tweets.js', 'utf-8'));
|
||||
const context = vm.createContext(fakeWindow);
|
||||
script.runInContext(context);
|
||||
const tweets = Object.keys(fakeWindow.window.YTD.tweets.part0).reduce((m, key, i, obj) => {
|
||||
return m.concat(fakeWindow.window.YTD.tweets.part0[key].tweet);
|
||||
}, []);
|
||||
const processedTweets = await this.recreateChain("id_str", "in_reply_to_status_id_str", tweets);
|
||||
this.queueService.createImportTweetsToDbJob(job.data.user, processedTweets, null);
|
||||
} finally {
|
||||
cleanup();
|
||||
}
|
||||
} else if (type === 'Facebook' || file.name.startsWith('facebook-') && file.name.endsWith('.zip')) {
|
||||
const [path, cleanup] = await createTempDir();
|
||||
|
||||
this.logger.info(`Temp dir is ${path}`);
|
||||
|
||||
const destPath = path + '/facebook.zip';
|
||||
|
||||
try {
|
||||
fs.writeFileSync(destPath, '', 'binary');
|
||||
await this.downloadService.downloadUrl(file.url, destPath);
|
||||
} catch (e) { // TODO: 何度か再試行
|
||||
if (e instanceof Error || typeof e === 'string') {
|
||||
this.logger.error(e);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
||||
const outputPath = path + '/facebook';
|
||||
try {
|
||||
this.logger.succ(`Unzipping to ${outputPath}`);
|
||||
ZipReader.withDestinationPath(outputPath).viaBuffer(await fs.promises.readFile(destPath));
|
||||
const postsJson = fs.readFileSync(outputPath + '/your_activity_across_facebook/posts/your_posts__check_ins__photos_and_videos_1.json', 'utf-8');
|
||||
const posts = JSON.parse(postsJson);
|
||||
await this.uploadFiles(outputPath + '/your_activity_across_facebook/posts/media', user);
|
||||
this.queueService.createImportFBToDbJob(job.data.user, posts);
|
||||
} finally {
|
||||
cleanup();
|
||||
}
|
||||
} else if (file.name.endsWith('.zip')) {
|
||||
const [path, cleanup] = await createTempDir();
|
||||
|
||||
this.logger.info(`Temp dir is ${path}`);
|
||||
|
||||
const destPath = path + '/unknown.zip';
|
||||
|
||||
try {
|
||||
fs.writeFileSync(destPath, '', 'binary');
|
||||
await this.downloadService.downloadUrl(file.url, destPath);
|
||||
} catch (e) { // TODO: 何度か再試行
|
||||
if (e instanceof Error || typeof e === 'string') {
|
||||
this.logger.error(e);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
||||
const outputPath = path + '/unknown';
|
||||
try {
|
||||
this.logger.succ(`Unzipping to ${outputPath}`);
|
||||
ZipReader.withDestinationPath(outputPath).viaBuffer(await fs.promises.readFile(destPath));
|
||||
const isInstagram = type === 'Instagram' || fs.existsSync(outputPath + '/instagram_live') || fs.existsSync(outputPath + '/instagram_ads_and_businesses');
|
||||
const isOutbox = type === 'Mastodon' || fs.existsSync(outputPath + '/outbox.json');
|
||||
if (isInstagram) {
|
||||
const postsJson = fs.readFileSync(outputPath + '/content/posts_1.json', 'utf-8');
|
||||
const posts = JSON.parse(postsJson);
|
||||
await this.uploadFiles(outputPath + '/media/posts', user);
|
||||
this.queueService.createImportIGToDbJob(job.data.user, posts);
|
||||
} else if (isOutbox) {
|
||||
const actorJson = fs.readFileSync(outputPath + '/actor.json', 'utf-8');
|
||||
const actor = JSON.parse(actorJson);
|
||||
const isPleroma = actor['@context'].some((v: any) => typeof v === 'string' && v.match(/litepub(.*)/));
|
||||
if (isPleroma) {
|
||||
const outboxJson = fs.readFileSync(outputPath + '/outbox.json', 'utf-8');
|
||||
const outbox = JSON.parse(outboxJson);
|
||||
this.queueService.createImportPleroToDbJob(job.data.user, outbox.orderedItems.filter((x: any) => x.type === 'Create' && x.object.type === 'Note'));
|
||||
} else {
|
||||
const outboxJson = fs.readFileSync(outputPath + '/outbox.json', 'utf-8');
|
||||
const outbox = JSON.parse(outboxJson);
|
||||
if (fs.existsSync(outputPath + '/media_attachments/files')) await this.uploadFiles(outputPath + '/media_attachments/files', user);
|
||||
this.queueService.createImportMastoToDbJob(job.data.user, outbox.orderedItems.filter((x: any) => x.type === 'Create' && x.object.type === 'Note'));
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
cleanup();
|
||||
}
|
||||
} else if (job.data.type === 'Misskey' || file.name.startsWith('notes-') && file.name.endsWith('.json')) {
|
||||
const [path, cleanup] = await createTemp();
|
||||
|
||||
this.logger.info(`Temp dir is ${path}`);
|
||||
|
||||
try {
|
||||
fs.writeFileSync(path, '', 'utf-8');
|
||||
await this.downloadService.downloadUrl(file.url, path);
|
||||
} catch (e) { // TODO: 何度か再試行
|
||||
if (e instanceof Error || typeof e === 'string') {
|
||||
this.logger.error(e);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
||||
const notesJson = fs.readFileSync(path, 'utf-8');
|
||||
const notes = JSON.parse(notesJson);
|
||||
const processedNotes = await this.recreateChain("id", "replyId", notes);
|
||||
this.queueService.createImportKeyNotesToDbJob(job.data.user, processedNotes, null);
|
||||
cleanup();
|
||||
}
|
||||
|
||||
this.logger.succ('Import jobs created');
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async processKeyNotesToDb(job: Bull.Job<DbKeyNoteImportToDbJobData>): Promise<void> {
|
||||
const note = job.data.target;
|
||||
const user = await this.usersRepository.findOneBy({ id: job.data.user.id });
|
||||
if (user == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (note.renoteId) return;
|
||||
|
||||
const parentNote = job.data.note ? await this.notesRepository.findOneBy({ id: job.data.note }) : null;
|
||||
|
||||
const files: MiDriveFile[] = [];
|
||||
const date = new Date(note.createdAt);
|
||||
|
||||
if (note.files && this.isIterable(note.files)) {
|
||||
for await (const file of note.files) {
|
||||
const [filePath, cleanup] = await createTemp();
|
||||
const slashdex = file.url.lastIndexOf('/');
|
||||
const name = file.url.substring(slashdex + 1);
|
||||
|
||||
const exists = await this.driveFilesRepository.findOneBy({ name: name, userId: user.id });
|
||||
|
||||
if (!exists) {
|
||||
try {
|
||||
await this.downloadService.downloadUrl(file.url, filePath);
|
||||
} catch (e) { // TODO: 何度か再試行
|
||||
this.logger.error(e instanceof Error ? e : new Error(e as string));
|
||||
}
|
||||
const driveFile = await this.driveService.addFile({
|
||||
user: user,
|
||||
path: filePath,
|
||||
name: name,
|
||||
});
|
||||
files.push(driveFile);
|
||||
} else {
|
||||
files.push(exists);
|
||||
}
|
||||
|
||||
cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
const createdNote = await this.noteCreateService.import(user, { createdAt: date, reply: parentNote, text: note.text, apMentions: new Array(0), visibility: note.visibility, localOnly: note.localOnly, files: files, cw: note.cw });
|
||||
if (note.childNotes) this.queueService.createImportKeyNotesToDbJob(user, note.childNotes, createdNote.id);
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async processMastoToDb(job: Bull.Job<DbNoteImportToDbJobData>): Promise<void> {
|
||||
const toot = job.data.target;
|
||||
const user = await this.usersRepository.findOneBy({ id: job.data.user.id });
|
||||
if (user == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
const date = new Date(toot.object.published);
|
||||
let text = undefined;
|
||||
const files: MiDriveFile[] = [];
|
||||
let reply: MiNote | null = null;
|
||||
|
||||
if (toot.object.inReplyTo != null) {
|
||||
try {
|
||||
reply = await this.apNoteService.resolveNote(toot.object.inReplyTo);
|
||||
} catch (error) {
|
||||
reply = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (toot.directMessage) return;
|
||||
|
||||
const hashtags = extractApHashtagObjects(toot.object.tag).map((x) => x.name).filter((x): x is string => x != null);
|
||||
|
||||
try {
|
||||
text = await this.mfmService.fromHtml(toot.object.content, hashtags);
|
||||
} catch (error) {
|
||||
text = undefined;
|
||||
}
|
||||
|
||||
if (toot.object.attachment && this.isIterable(toot.object.attachment)) {
|
||||
for await (const file of toot.object.attachment) {
|
||||
const slashdex = file.url.lastIndexOf('/');
|
||||
const name = file.url.substring(slashdex + 1);
|
||||
const exists = await this.driveFilesRepository.findOneBy({ name: name, userId: user.id });
|
||||
if (exists) {
|
||||
files.push(exists);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await this.noteCreateService.import(user, { createdAt: date, text: text, files: files, apMentions: new Array(0), cw: toot.object.sensitive ? toot.object.summary : null, reply: reply });
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async processPleroToDb(job: Bull.Job<DbNoteImportToDbJobData>): Promise<void> {
|
||||
const post = job.data.target;
|
||||
const user = await this.usersRepository.findOneBy({ id: job.data.user.id });
|
||||
if (user == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
const date = new Date(post.object.published);
|
||||
let text = undefined;
|
||||
const files: MiDriveFile[] = [];
|
||||
let reply: MiNote | null = null;
|
||||
|
||||
if (post.object.inReplyTo != null) {
|
||||
try {
|
||||
reply = await this.apNoteService.resolveNote(post.object.inReplyTo);
|
||||
} catch (error) {
|
||||
reply = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (post.directMessage) return;
|
||||
|
||||
const hashtags = extractApHashtagObjects(post.object.tag).map((x) => x.name).filter((x): x is string => x != null);
|
||||
|
||||
try {
|
||||
text = await this.mfmService.fromHtml(post.object.content, hashtags);
|
||||
} catch (error) {
|
||||
text = undefined;
|
||||
}
|
||||
|
||||
if (post.object.attachment && this.isIterable(post.object.attachment)) {
|
||||
for await (const file of post.object.attachment) {
|
||||
const slashdex = file.url.lastIndexOf('/');
|
||||
const name = file.url.substring(slashdex + 1);
|
||||
const [filePath, cleanup] = await createTemp();
|
||||
|
||||
const exists = await this.driveFilesRepository.findOneBy({ name: name, userId: user.id });
|
||||
|
||||
if (!exists) {
|
||||
try {
|
||||
await this.downloadService.downloadUrl(file.url, filePath);
|
||||
} catch (e) { // TODO: 何度か再試行
|
||||
this.logger.error(e instanceof Error ? e : new Error(e as string));
|
||||
}
|
||||
const driveFile = await this.driveService.addFile({
|
||||
user: user,
|
||||
path: filePath,
|
||||
name: name,
|
||||
});
|
||||
files.push(driveFile);
|
||||
} else {
|
||||
files.push(exists);
|
||||
}
|
||||
|
||||
cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
await this.noteCreateService.import(user, { createdAt: date, text: text, files: files, apMentions: new Array(0), cw: post.object.sensitive ? post.object.summary : null, reply: reply });
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async processIGDb(job: Bull.Job<DbNoteImportToDbJobData>): Promise<void> {
|
||||
const post = job.data.target;
|
||||
const user = await this.usersRepository.findOneBy({ id: job.data.user.id });
|
||||
if (user == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
let date;
|
||||
let title;
|
||||
const files: MiDriveFile[] = [];
|
||||
|
||||
function decodeIGString(str: string) {
|
||||
const arr = [];
|
||||
for (let i = 0; i < str.length; i++) {
|
||||
arr.push(str.charCodeAt(i));
|
||||
}
|
||||
return Buffer.from(arr).toString('utf8');
|
||||
}
|
||||
|
||||
if (post.media && this.isIterable(post.media) && post.media.length > 1) {
|
||||
date = new Date(post.creation_timestamp * 1000);
|
||||
title = decodeIGString(post.title);
|
||||
for await (const file of post.media) {
|
||||
const slashdex = file.uri.lastIndexOf('/');
|
||||
const name = file.uri.substring(slashdex + 1);
|
||||
const exists = await this.driveFilesRepository.findOneBy({ name: name, userId: user.id }) ?? await this.driveFilesRepository.findOneBy({ name: `${name}.jpg`, userId: user.id }) ?? await this.driveFilesRepository.findOneBy({ name: `${name}.mp4`, userId: user.id });
|
||||
if (exists) {
|
||||
files.push(exists);
|
||||
}
|
||||
}
|
||||
} else if (post.media && this.isIterable(post.media) && !(post.media.length > 1)) {
|
||||
date = new Date(post.media[0].creation_timestamp * 1000);
|
||||
title = decodeIGString(post.media[0].title);
|
||||
const slashdex = post.media[0].uri.lastIndexOf('/');
|
||||
const name = post.media[0].uri.substring(slashdex + 1);
|
||||
const exists = await this.driveFilesRepository.findOneBy({ name: name, userId: user.id }) ?? await this.driveFilesRepository.findOneBy({ name: `${name}.jpg`, userId: user.id }) ?? await this.driveFilesRepository.findOneBy({ name: `${name}.mp4`, userId: user.id });
|
||||
if (exists) {
|
||||
files.push(exists);
|
||||
}
|
||||
}
|
||||
|
||||
await this.noteCreateService.import(user, { createdAt: date, text: title, files: files });
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async processTwitterDb(job: Bull.Job<DbKeyNoteImportToDbJobData>): Promise<void> {
|
||||
const tweet = job.data.target;
|
||||
const user = await this.usersRepository.findOneBy({ id: job.data.user.id });
|
||||
if (user == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
const parentNote = job.data.note ? await this.notesRepository.findOneBy({ id: job.data.note }) : null;
|
||||
|
||||
async function replaceTwitterUrls(full_text: string, urls: any) {
|
||||
let full_textedit = full_text;
|
||||
urls.forEach((url: any) => {
|
||||
full_textedit = full_textedit.replaceAll(url.url, url.expanded_url);
|
||||
});
|
||||
return full_textedit;
|
||||
}
|
||||
|
||||
async function replaceTwitterMentions(full_text: string, mentions: any) {
|
||||
let full_textedit = full_text;
|
||||
mentions.forEach((mention: any) => {
|
||||
full_textedit = full_textedit.replaceAll(`@${mention.screen_name}`, `[@${mention.screen_name}](https://nitter.net/${mention.screen_name})`);
|
||||
});
|
||||
return full_textedit;
|
||||
}
|
||||
|
||||
try {
|
||||
const date = new Date(tweet.created_at);
|
||||
const textReplaceURLs = tweet.entities.urls && tweet.entities.urls.length > 0 ? await replaceTwitterUrls(tweet.full_text, tweet.entities.urls) : tweet.full_text;
|
||||
const text = tweet.entities.user_mentions && tweet.entities.user_mentions.length > 0 ? await replaceTwitterMentions(textReplaceURLs, tweet.entities.user_mentions) : textReplaceURLs;
|
||||
const files: MiDriveFile[] = [];
|
||||
|
||||
if (tweet.extended_entities && this.isIterable(tweet.extended_entities.media)) {
|
||||
for await (const file of tweet.extended_entities.media) {
|
||||
if (file.video_info) {
|
||||
const [filePath, cleanup] = await createTemp();
|
||||
const slashdex = file.video_info.variants[0].url.lastIndexOf('/');
|
||||
const name = file.video_info.variants[0].url.substring(slashdex + 1);
|
||||
|
||||
const exists = await this.driveFilesRepository.findOneBy({ name: name, userId: user.id });
|
||||
|
||||
const videos = file.video_info.variants.filter((x: any) => x.content_type === 'video/mp4');
|
||||
|
||||
if (!exists) {
|
||||
try {
|
||||
await this.downloadService.downloadUrl(videos[0].url, filePath);
|
||||
} catch (e) { // TODO: 何度か再試行
|
||||
this.logger.error(e instanceof Error ? e : new Error(e as string));
|
||||
}
|
||||
const driveFile = await this.driveService.addFile({
|
||||
user: user,
|
||||
path: filePath,
|
||||
name: name,
|
||||
});
|
||||
files.push(driveFile);
|
||||
} else {
|
||||
files.push(exists);
|
||||
}
|
||||
|
||||
cleanup();
|
||||
} else if (file.media_url_https) {
|
||||
const [filePath, cleanup] = await createTemp();
|
||||
const slashdex = file.media_url_https.lastIndexOf('/');
|
||||
const name = file.media_url_https.substring(slashdex + 1);
|
||||
|
||||
const exists = await this.driveFilesRepository.findOneBy({ name: name, userId: user.id });
|
||||
|
||||
if (!exists) {
|
||||
try {
|
||||
await this.downloadService.downloadUrl(file.media_url_https, filePath);
|
||||
} catch (e) { // TODO: 何度か再試行
|
||||
this.logger.error(e instanceof Error ? e : new Error(e as string));
|
||||
}
|
||||
|
||||
const driveFile = await this.driveService.addFile({
|
||||
user: user,
|
||||
path: filePath,
|
||||
name: name,
|
||||
});
|
||||
files.push(driveFile);
|
||||
} else {
|
||||
files.push(exists);
|
||||
}
|
||||
cleanup();
|
||||
}
|
||||
}
|
||||
}
|
||||
const createdNote = await this.noteCreateService.import(user, { createdAt: date, reply: parentNote, text: text, files: files });
|
||||
if (tweet.childNotes) this.queueService.createImportTweetsToDbJob(user, tweet.childNotes, createdNote.id);
|
||||
} catch (e) {
|
||||
this.logger.warn(`Error: ${e}`);
|
||||
}
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async processFBDb(job: Bull.Job<DbNoteImportToDbJobData>): Promise<void> {
|
||||
const post = job.data.target;
|
||||
const user = await this.usersRepository.findOneBy({ id: job.data.user.id });
|
||||
if (user == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.isIterable(post.data) || this.isIterable(post.data) && post.data[0].post === undefined) return;
|
||||
|
||||
const date = new Date(post.timestamp * 1000);
|
||||
const title = decodeFBString(post.data[0].post);
|
||||
const files: MiDriveFile[] = [];
|
||||
|
||||
function decodeFBString(str: string) {
|
||||
const arr = [];
|
||||
for (let i = 0; i < str.length; i++) {
|
||||
arr.push(str.charCodeAt(i));
|
||||
}
|
||||
return Buffer.from(arr).toString('utf8');
|
||||
}
|
||||
|
||||
if (post.attachments && this.isIterable(post.attachments)) {
|
||||
const media = [];
|
||||
for await (const data of post.attachments[0].data) {
|
||||
if (data.media) {
|
||||
media.push(data.media);
|
||||
}
|
||||
}
|
||||
|
||||
for await (const file of media) {
|
||||
const slashdex = file.uri.lastIndexOf('/');
|
||||
const name = file.uri.substring(slashdex + 1);
|
||||
const exists = await this.driveFilesRepository.findOneBy({ name: name, userId: user.id });
|
||||
if (exists) {
|
||||
files.push(exists);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await this.noteCreateService.import(user, { createdAt: date, text: title, files: files });
|
||||
}
|
||||
}
|
|
@ -49,6 +49,13 @@ export type DbJobMap = {
|
|||
exportBlocking: DbJobDataWithUser;
|
||||
exportUserLists: DbJobDataWithUser;
|
||||
importAntennas: DBAntennaImportJobData;
|
||||
importNotes: DbNoteImportJobData;
|
||||
importTweetsToDb: DbKeyNoteImportToDbJobData;
|
||||
importIGToDb: DbNoteImportToDbJobData;
|
||||
importFBToDb: DbNoteImportToDbJobData;
|
||||
importMastoToDb: DbNoteImportToDbJobData;
|
||||
importPleroToDb: DbNoteImportToDbJobData;
|
||||
importKeyNotesToDb: DbKeyNoteImportToDbJobData;
|
||||
importFollowing: DbUserImportJobData;
|
||||
importFollowingToDb: DbUserImportToDbJobData;
|
||||
importMuting: DbUserImportJobData;
|
||||
|
@ -84,6 +91,12 @@ export type DbUserImportJobData = {
|
|||
withReplies?: boolean;
|
||||
};
|
||||
|
||||
export type DbNoteImportJobData = {
|
||||
user: ThinUser;
|
||||
fileId: MiDriveFile['id'];
|
||||
type?: string;
|
||||
};
|
||||
|
||||
export type DBAntennaImportJobData = {
|
||||
user: ThinUser,
|
||||
antenna: Antenna
|
||||
|
@ -95,6 +108,17 @@ export type DbUserImportToDbJobData = {
|
|||
withReplies?: boolean;
|
||||
};
|
||||
|
||||
export type DbNoteImportToDbJobData = {
|
||||
user: ThinUser;
|
||||
target: any;
|
||||
};
|
||||
|
||||
export type DbKeyNoteImportToDbJobData = {
|
||||
user: ThinUser;
|
||||
target: any;
|
||||
note: MiNote['id'] | null;
|
||||
};
|
||||
|
||||
export type ObjectStorageJobData = ObjectStorageFileJobData | Record<string, unknown>;
|
||||
|
||||
export type ObjectStorageFileJobData = {
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import * as crypto from 'node:crypto';
|
||||
import { IncomingMessage } from 'node:http';
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import fastifyAccepts from '@fastify/accepts';
|
||||
|
@ -10,6 +11,7 @@ import httpSignature from '@peertube/http-signature';
|
|||
import { Brackets, In, IsNull, LessThan, Not } from 'typeorm';
|
||||
import accepts from 'accepts';
|
||||
import vary from 'vary';
|
||||
import secureJson from 'secure-json-parse';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import type { FollowingsRepository, NotesRepository, EmojisRepository, NoteReactionsRepository, UserProfilesRepository, UserNotePiningsRepository, UsersRepository, FollowRequestsRepository } from '@/models/_.js';
|
||||
import * as url from '@/misc/prelude/url.js';
|
||||
|
@ -27,7 +29,7 @@ import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
|||
import { bindThis } from '@/decorators.js';
|
||||
import { IActivity } from '@/core/activitypub/type.js';
|
||||
import { isPureRenote } from '@/misc/is-pure-renote.js';
|
||||
import type { FastifyInstance, FastifyRequest, FastifyReply, FastifyPluginOptions } from 'fastify';
|
||||
import type { FastifyInstance, FastifyRequest, FastifyReply, FastifyPluginOptions, FastifyBodyParser } from 'fastify';
|
||||
import type { FindOptionsWhere } from 'typeorm';
|
||||
|
||||
const ACTIVITY_JSON = 'application/activity+json; charset=utf-8';
|
||||
|
@ -108,7 +110,58 @@ export class ActivityPubServerService {
|
|||
return;
|
||||
}
|
||||
|
||||
// TODO: request.bodyのバリデーション?
|
||||
if (signature.params.headers.indexOf('host') === -1
|
||||
|| request.headers.host !== this.config.host) {
|
||||
// Host not specified or not match.
|
||||
reply.code(401);
|
||||
return;
|
||||
}
|
||||
|
||||
if (signature.params.headers.indexOf('digest') === -1) {
|
||||
// Digest not found.
|
||||
reply.code(401);
|
||||
} else {
|
||||
const digest = request.headers.digest;
|
||||
|
||||
if (typeof digest !== 'string') {
|
||||
// Huh?
|
||||
reply.code(401);
|
||||
return;
|
||||
}
|
||||
|
||||
const re = /^([a-zA-Z0-9\-]+)=(.+)$/;
|
||||
const match = digest.match(re);
|
||||
|
||||
if (match == null) {
|
||||
// Invalid digest
|
||||
reply.code(401);
|
||||
return;
|
||||
}
|
||||
|
||||
const algo = match[1];
|
||||
const digestValue = match[2];
|
||||
|
||||
if (algo !== 'SHA-256') {
|
||||
// Unsupported digest algorithm
|
||||
reply.code(401);
|
||||
return;
|
||||
}
|
||||
|
||||
if (request.rawBody == null) {
|
||||
// Bad request
|
||||
reply.code(400);
|
||||
return;
|
||||
}
|
||||
|
||||
const hash = crypto.createHash('sha256').update(request.rawBody).digest('base64');
|
||||
|
||||
if (hash !== digestValue) {
|
||||
// Invalid digest
|
||||
reply.code(401);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.queueService.inbox(request.body as IActivity, signature);
|
||||
|
||||
reply.code(202);
|
||||
|
@ -460,9 +513,28 @@ export class ActivityPubServerService {
|
|||
},
|
||||
});
|
||||
|
||||
const almostDefaultJsonParser: FastifyBodyParser<Buffer> = function (request, rawBody, done) {
|
||||
if (rawBody.length === 0) {
|
||||
const err = new Error('Body cannot be empty!') as any;
|
||||
err.statusCode = 400;
|
||||
return done(err);
|
||||
}
|
||||
|
||||
try {
|
||||
const json = secureJson.parse(rawBody.toString('utf8'), null, {
|
||||
protoAction: 'ignore',
|
||||
constructorAction: 'ignore',
|
||||
});
|
||||
done(null, json);
|
||||
} catch (err: any) {
|
||||
err.statusCode = 400;
|
||||
return done(err);
|
||||
}
|
||||
};
|
||||
|
||||
fastify.register(fastifyAccepts);
|
||||
fastify.addContentTypeParser('application/activity+json', { parseAs: 'string' }, fastify.getDefaultJsonParser('ignore', 'ignore'));
|
||||
fastify.addContentTypeParser('application/ld+json', { parseAs: 'string' }, fastify.getDefaultJsonParser('ignore', 'ignore'));
|
||||
fastify.addContentTypeParser('application/activity+json', { parseAs: 'buffer' }, almostDefaultJsonParser);
|
||||
fastify.addContentTypeParser('application/ld+json', { parseAs: 'buffer' }, almostDefaultJsonParser);
|
||||
|
||||
fastify.addHook('onRequest', (request, reply, done) => {
|
||||
reply.header('Access-Control-Allow-Headers', 'Accept');
|
||||
|
@ -474,8 +546,8 @@ export class ActivityPubServerService {
|
|||
|
||||
//#region Routing
|
||||
// inbox (limit: 64kb)
|
||||
fastify.post('/inbox', { bodyLimit: 1024 * 64 }, async (request, reply) => await this.inbox(request, reply));
|
||||
fastify.post('/users/:user/inbox', { bodyLimit: 1024 * 64 }, async (request, reply) => await this.inbox(request, reply));
|
||||
fastify.post('/inbox', { config: { rawBody: true }, bodyLimit: 1024 * 64 }, async (request, reply) => await this.inbox(request, reply));
|
||||
fastify.post('/users/:user/inbox', { config: { rawBody: true }, bodyLimit: 1024 * 64 }, async (request, reply) => await this.inbox(request, reply));
|
||||
|
||||
// note
|
||||
fastify.get<{ Params: { note: string; } }>('/notes/:note', { constraints: { apOrHtml: 'ap' } }, async (request, reply) => {
|
||||
|
|
|
@ -9,6 +9,7 @@ import { fileURLToPath } from 'node:url';
|
|||
import { Inject, Injectable, OnApplicationShutdown } from '@nestjs/common';
|
||||
import Fastify, { FastifyInstance } from 'fastify';
|
||||
import fastifyStatic from '@fastify/static';
|
||||
import fastifyRawBody from 'fastify-raw-body';
|
||||
import { IsNull } from 'typeorm';
|
||||
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||
import type { Config } from '@/config.js';
|
||||
|
@ -88,6 +89,13 @@ export class ServerService implements OnApplicationShutdown {
|
|||
});
|
||||
}
|
||||
|
||||
// Register raw-body parser for ActivityPub HTTP signature validation.
|
||||
await fastify.register(fastifyRawBody, {
|
||||
global: false,
|
||||
encoding: null,
|
||||
runFirst: true,
|
||||
});
|
||||
|
||||
// Register non-serving static server so that the child services can use reply.sendFile.
|
||||
// `root` here is just a placeholder and each call must use its own `rootPath`.
|
||||
fastify.register(fastifyStatic, {
|
||||
|
|
|
@ -10,6 +10,7 @@ import * as ep___admin_meta from './endpoints/admin/meta.js';
|
|||
import * as ep___admin_abuseUserReports from './endpoints/admin/abuse-user-reports.js';
|
||||
import * as ep___admin_accounts_create from './endpoints/admin/accounts/create.js';
|
||||
import * as ep___admin_accounts_delete from './endpoints/admin/accounts/delete.js';
|
||||
import * as ep___admin_accounts_findByEmail from './endpoints/admin/accounts/find-by-email.js';
|
||||
import * as ep___admin_ad_create from './endpoints/admin/ad/create.js';
|
||||
import * as ep___admin_ad_delete from './endpoints/admin/ad/delete.js';
|
||||
import * as ep___admin_ad_list from './endpoints/admin/ad/list.js';
|
||||
|
@ -219,6 +220,7 @@ import * as ep___i_gallery_likes from './endpoints/i/gallery/likes.js';
|
|||
import * as ep___i_gallery_posts from './endpoints/i/gallery/posts.js';
|
||||
import * as ep___i_importBlocking from './endpoints/i/import-blocking.js';
|
||||
import * as ep___i_importFollowing from './endpoints/i/import-following.js';
|
||||
import * as ep___i_importNotes from './endpoints/i/import-notes.js';
|
||||
import * as ep___i_importMuting from './endpoints/i/import-muting.js';
|
||||
import * as ep___i_importUserLists from './endpoints/i/import-user-lists.js';
|
||||
import * as ep___i_importAntennas from './endpoints/i/import-antennas.js';
|
||||
|
@ -283,6 +285,7 @@ import * as ep___notes_polls_vote from './endpoints/notes/polls/vote.js';
|
|||
import * as ep___notes_reactions from './endpoints/notes/reactions.js';
|
||||
import * as ep___notes_reactions_create from './endpoints/notes/reactions/create.js';
|
||||
import * as ep___notes_reactions_delete from './endpoints/notes/reactions/delete.js';
|
||||
import * as ep___notes_like from './endpoints/notes/like.js';
|
||||
import * as ep___notes_renotes from './endpoints/notes/renotes.js';
|
||||
import * as ep___notes_replies from './endpoints/notes/replies.js';
|
||||
import * as ep___notes_edit from './endpoints/notes/edit.js';
|
||||
|
@ -378,6 +381,7 @@ const $admin_meta: Provider = { provide: 'ep:admin/meta', useClass: ep___admin_m
|
|||
const $admin_abuseUserReports: Provider = { provide: 'ep:admin/abuse-user-reports', useClass: ep___admin_abuseUserReports.default };
|
||||
const $admin_accounts_create: Provider = { provide: 'ep:admin/accounts/create', useClass: ep___admin_accounts_create.default };
|
||||
const $admin_accounts_delete: Provider = { provide: 'ep:admin/accounts/delete', useClass: ep___admin_accounts_delete.default };
|
||||
const $admin_accounts_findByEmail: Provider = { provide: 'ep:admin/accounts/find-by-email', useClass: ep___admin_accounts_findByEmail.default };
|
||||
const $admin_ad_create: Provider = { provide: 'ep:admin/ad/create', useClass: ep___admin_ad_create.default };
|
||||
const $admin_ad_delete: Provider = { provide: 'ep:admin/ad/delete', useClass: ep___admin_ad_delete.default };
|
||||
const $admin_ad_list: Provider = { provide: 'ep:admin/ad/list', useClass: ep___admin_ad_list.default };
|
||||
|
@ -587,6 +591,7 @@ const $i_gallery_likes: Provider = { provide: 'ep:i/gallery/likes', useClass: ep
|
|||
const $i_gallery_posts: Provider = { provide: 'ep:i/gallery/posts', useClass: ep___i_gallery_posts.default };
|
||||
const $i_importBlocking: Provider = { provide: 'ep:i/import-blocking', useClass: ep___i_importBlocking.default };
|
||||
const $i_importFollowing: Provider = { provide: 'ep:i/import-following', useClass: ep___i_importFollowing.default };
|
||||
const $i_importNotes: Provider = { provide: 'ep:i/import-notes', useClass: ep___i_importNotes.default };
|
||||
const $i_importMuting: Provider = { provide: 'ep:i/import-muting', useClass: ep___i_importMuting.default };
|
||||
const $i_importUserLists: Provider = { provide: 'ep:i/import-user-lists', useClass: ep___i_importUserLists.default };
|
||||
const $i_importAntennas: Provider = { provide: 'ep:i/import-antennas', useClass: ep___i_importAntennas.default };
|
||||
|
@ -651,6 +656,7 @@ const $notes_polls_vote: Provider = { provide: 'ep:notes/polls/vote', useClass:
|
|||
const $notes_reactions: Provider = { provide: 'ep:notes/reactions', useClass: ep___notes_reactions.default };
|
||||
const $notes_reactions_create: Provider = { provide: 'ep:notes/reactions/create', useClass: ep___notes_reactions_create.default };
|
||||
const $notes_reactions_delete: Provider = { provide: 'ep:notes/reactions/delete', useClass: ep___notes_reactions_delete.default };
|
||||
const $notes_like: Provider = { provide: 'ep:notes/like', useClass: ep___notes_like.default };
|
||||
const $notes_renotes: Provider = { provide: 'ep:notes/renotes', useClass: ep___notes_renotes.default };
|
||||
const $notes_replies: Provider = { provide: 'ep:notes/replies', useClass: ep___notes_replies.default };
|
||||
const $notes_searchByTag: Provider = { provide: 'ep:notes/search-by-tag', useClass: ep___notes_searchByTag.default };
|
||||
|
@ -750,6 +756,7 @@ const $sponsors: Provider = { provide: 'ep:sponsors', useClass: ep___sponsors.de
|
|||
$admin_abuseUserReports,
|
||||
$admin_accounts_create,
|
||||
$admin_accounts_delete,
|
||||
$admin_accounts_findByEmail,
|
||||
$admin_ad_create,
|
||||
$admin_ad_delete,
|
||||
$admin_ad_list,
|
||||
|
@ -959,6 +966,7 @@ const $sponsors: Provider = { provide: 'ep:sponsors', useClass: ep___sponsors.de
|
|||
$i_gallery_posts,
|
||||
$i_importBlocking,
|
||||
$i_importFollowing,
|
||||
$i_importNotes,
|
||||
$i_importMuting,
|
||||
$i_importUserLists,
|
||||
$i_importAntennas,
|
||||
|
@ -1023,6 +1031,7 @@ const $sponsors: Provider = { provide: 'ep:sponsors', useClass: ep___sponsors.de
|
|||
$notes_reactions,
|
||||
$notes_reactions_create,
|
||||
$notes_reactions_delete,
|
||||
$notes_like,
|
||||
$notes_renotes,
|
||||
$notes_replies,
|
||||
$notes_searchByTag,
|
||||
|
@ -1116,6 +1125,7 @@ const $sponsors: Provider = { provide: 'ep:sponsors', useClass: ep___sponsors.de
|
|||
$admin_abuseUserReports,
|
||||
$admin_accounts_create,
|
||||
$admin_accounts_delete,
|
||||
$admin_accounts_findByEmail,
|
||||
$admin_ad_create,
|
||||
$admin_ad_delete,
|
||||
$admin_ad_list,
|
||||
|
@ -1325,6 +1335,7 @@ const $sponsors: Provider = { provide: 'ep:sponsors', useClass: ep___sponsors.de
|
|||
$i_gallery_posts,
|
||||
$i_importBlocking,
|
||||
$i_importFollowing,
|
||||
$i_importNotes,
|
||||
$i_importMuting,
|
||||
$i_importUserLists,
|
||||
$i_importAntennas,
|
||||
|
@ -1389,6 +1400,7 @@ const $sponsors: Provider = { provide: 'ep:sponsors', useClass: ep___sponsors.de
|
|||
$notes_reactions,
|
||||
$notes_reactions_create,
|
||||
$notes_reactions_delete,
|
||||
$notes_like,
|
||||
$notes_renotes,
|
||||
$notes_replies,
|
||||
$notes_searchByTag,
|
||||
|
|
|
@ -10,6 +10,7 @@ import * as ep___admin_meta from './endpoints/admin/meta.js';
|
|||
import * as ep___admin_abuseUserReports from './endpoints/admin/abuse-user-reports.js';
|
||||
import * as ep___admin_accounts_create from './endpoints/admin/accounts/create.js';
|
||||
import * as ep___admin_accounts_delete from './endpoints/admin/accounts/delete.js';
|
||||
import * as ep___admin_accounts_findByEmail from './endpoints/admin/accounts/find-by-email.js';
|
||||
import * as ep___admin_ad_create from './endpoints/admin/ad/create.js';
|
||||
import * as ep___admin_ad_delete from './endpoints/admin/ad/delete.js';
|
||||
import * as ep___admin_ad_list from './endpoints/admin/ad/list.js';
|
||||
|
@ -219,6 +220,7 @@ import * as ep___i_gallery_likes from './endpoints/i/gallery/likes.js';
|
|||
import * as ep___i_gallery_posts from './endpoints/i/gallery/posts.js';
|
||||
import * as ep___i_importBlocking from './endpoints/i/import-blocking.js';
|
||||
import * as ep___i_importFollowing from './endpoints/i/import-following.js';
|
||||
import * as ep___i_importNotes from './endpoints/i/import-notes.js';
|
||||
import * as ep___i_importMuting from './endpoints/i/import-muting.js';
|
||||
import * as ep___i_importUserLists from './endpoints/i/import-user-lists.js';
|
||||
import * as ep___i_importAntennas from './endpoints/i/import-antennas.js';
|
||||
|
@ -283,6 +285,7 @@ import * as ep___notes_polls_vote from './endpoints/notes/polls/vote.js';
|
|||
import * as ep___notes_reactions from './endpoints/notes/reactions.js';
|
||||
import * as ep___notes_reactions_create from './endpoints/notes/reactions/create.js';
|
||||
import * as ep___notes_reactions_delete from './endpoints/notes/reactions/delete.js';
|
||||
import * as ep___notes_like from './endpoints/notes/like.js';
|
||||
import * as ep___notes_renotes from './endpoints/notes/renotes.js';
|
||||
import * as ep___notes_replies from './endpoints/notes/replies.js';
|
||||
import * as ep___notes_searchByTag from './endpoints/notes/search-by-tag.js';
|
||||
|
@ -376,6 +379,7 @@ const eps = [
|
|||
['admin/abuse-user-reports', ep___admin_abuseUserReports],
|
||||
['admin/accounts/create', ep___admin_accounts_create],
|
||||
['admin/accounts/delete', ep___admin_accounts_delete],
|
||||
['admin/accounts/find-by-email', ep___admin_accounts_findByEmail],
|
||||
['admin/ad/create', ep___admin_ad_create],
|
||||
['admin/ad/delete', ep___admin_ad_delete],
|
||||
['admin/ad/list', ep___admin_ad_list],
|
||||
|
@ -585,6 +589,7 @@ const eps = [
|
|||
['i/gallery/posts', ep___i_gallery_posts],
|
||||
['i/import-blocking', ep___i_importBlocking],
|
||||
['i/import-following', ep___i_importFollowing],
|
||||
['i/import-notes', ep___i_importNotes],
|
||||
['i/import-muting', ep___i_importMuting],
|
||||
['i/import-user-lists', ep___i_importUserLists],
|
||||
['i/import-antennas', ep___i_importAntennas],
|
||||
|
@ -649,6 +654,7 @@ const eps = [
|
|||
['notes/reactions', ep___notes_reactions],
|
||||
['notes/reactions/create', ep___notes_reactions_create],
|
||||
['notes/reactions/delete', ep___notes_reactions_delete],
|
||||
['notes/like', ep___notes_like],
|
||||
['notes/renotes', ep___notes_renotes],
|
||||
['notes/replies', ep___notes_replies],
|
||||
['notes/search-by-tag', ep___notes_searchByTag],
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { UserProfilesRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
||||
import { ApiError } from '@/server/api/error.js';
|
||||
|
||||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
|
||||
errors: {
|
||||
userNotFound: {
|
||||
message: 'No such user who has the email address.',
|
||||
code: 'USER_NOT_FOUND',
|
||||
id: 'cb865949-8af5-4062-a88c-ef55e8786d1d',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
email: { type: 'string' },
|
||||
},
|
||||
required: ['email'],
|
||||
} as const;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
constructor(
|
||||
@Inject(DI.userProfilesRepository)
|
||||
private userProfilesRepository: UserProfilesRepository,
|
||||
|
||||
private userEntityService: UserEntityService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const profile = await this.userProfilesRepository.findOne({
|
||||
where: { email: ps.email },
|
||||
relations: ['user'],
|
||||
});
|
||||
|
||||
if (profile == null) {
|
||||
throw new ApiError(meta.errors.userNotFound);
|
||||
}
|
||||
|
||||
const res = await this.userEntityService.pack(profile.user!, null, {
|
||||
detail: true,
|
||||
});
|
||||
|
||||
return res;
|
||||
});
|
||||
}
|
||||
}
|
|
@ -72,6 +72,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
const isDuplicate = await this.customEmojiService.checkDuplicate(ps.name);
|
||||
if (isDuplicate) throw new ApiError(meta.errors.duplicateName);
|
||||
|
||||
if (driveFile.user !== null) await this.driveFilesRepository.update(driveFile.id, { user: null });
|
||||
|
||||
const emoji = await this.customEmojiService.add({
|
||||
driveFile,
|
||||
name: ps.name,
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { IsNull } from 'typeorm';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import type { EmojisRepository } from '@/models/_.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
|
@ -26,6 +27,11 @@ export const meta = {
|
|||
code: 'NO_SUCH_EMOJI',
|
||||
id: 'e2785b66-dca3-4087-9cac-b93c541cc425',
|
||||
},
|
||||
duplicateName: {
|
||||
message: 'Duplicate name.',
|
||||
code: 'DUPLICATE_NAME',
|
||||
id: 'f7a3462c-4e6e-4069-8421-b9bd4f4c3975',
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
|
@ -69,6 +75,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
throw new ApiError(meta.errors.noSuchEmoji);
|
||||
}
|
||||
|
||||
const isDuplicate = await this.emojisRepository.findOneBy({ name: emoji.name, host: IsNull() } );
|
||||
if (isDuplicate) throw new ApiError(meta.errors.duplicateName);
|
||||
|
||||
let driveFile: MiDriveFile;
|
||||
|
||||
try {
|
||||
|
|
|
@ -307,6 +307,10 @@ export const meta = {
|
|||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
enableFanoutTimelineDbFallback: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
perLocalUserUserTimelineCacheMax: {
|
||||
type: 'number',
|
||||
optional: false, nullable: false,
|
||||
|
@ -386,6 +390,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
logoImageUrl: instance.logoImageUrl,
|
||||
defaultLightTheme: instance.defaultLightTheme,
|
||||
defaultDarkTheme: instance.defaultDarkTheme,
|
||||
defaultLike: instance.defaultLike,
|
||||
enableEmail: instance.enableEmail,
|
||||
enableServiceWorker: instance.enableServiceWorker,
|
||||
translatorAvailable: instance.deeplAuthKey != null,
|
||||
|
@ -439,6 +444,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
policies: { ...DEFAULT_POLICIES, ...instance.policies },
|
||||
manifestJsonOverride: instance.manifestJsonOverride,
|
||||
enableFanoutTimeline: instance.enableFanoutTimeline,
|
||||
enableFanoutTimelineDbFallback: instance.enableFanoutTimelineDbFallback,
|
||||
perLocalUserUserTimelineCacheMax: instance.perLocalUserUserTimelineCacheMax,
|
||||
perRemoteUserUserTimelineCacheMax: instance.perRemoteUserUserTimelineCacheMax,
|
||||
perUserHomeTimelineCacheMax: instance.perUserHomeTimelineCacheMax,
|
||||
|
|
|
@ -56,6 +56,7 @@ export const paramDef = {
|
|||
description: { type: 'string', nullable: true },
|
||||
defaultLightTheme: { type: 'string', nullable: true },
|
||||
defaultDarkTheme: { type: 'string', nullable: true },
|
||||
defaultLike: { type: 'string', nullable: true },
|
||||
cacheRemoteFiles: { type: 'boolean' },
|
||||
cacheRemoteSensitiveFiles: { type: 'boolean' },
|
||||
emailRequiredForSignup: { type: 'boolean' },
|
||||
|
@ -124,6 +125,7 @@ export const paramDef = {
|
|||
preservedUsernames: { type: 'array', items: { type: 'string' } },
|
||||
manifestJsonOverride: { type: 'string' },
|
||||
enableFanoutTimeline: { type: 'boolean' },
|
||||
enableFanoutTimelineDbFallback: { type: 'boolean' },
|
||||
perLocalUserUserTimelineCacheMax: { type: 'integer' },
|
||||
perRemoteUserUserTimelineCacheMax: { type: 'integer' },
|
||||
perUserHomeTimelineCacheMax: { type: 'integer' },
|
||||
|
@ -240,6 +242,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
set.defaultDarkTheme = ps.defaultDarkTheme;
|
||||
}
|
||||
|
||||
if (ps.defaultLike !== undefined) {
|
||||
set.defaultLike = ps.defaultLike;
|
||||
}
|
||||
|
||||
if (ps.cacheRemoteFiles !== undefined) {
|
||||
set.cacheRemoteFiles = ps.cacheRemoteFiles;
|
||||
}
|
||||
|
@ -484,6 +490,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
set.enableFanoutTimeline = ps.enableFanoutTimeline;
|
||||
}
|
||||
|
||||
if (ps.enableFanoutTimelineDbFallback !== undefined) {
|
||||
set.enableFanoutTimelineDbFallback = ps.enableFanoutTimelineDbFallback;
|
||||
}
|
||||
|
||||
if (ps.perLocalUserUserTimelineCacheMax !== undefined) {
|
||||
set.perLocalUserUserTimelineCacheMax = ps.perLocalUserUserTimelineCacheMax;
|
||||
}
|
||||
|
|
72
packages/backend/src/server/api/endpoints/i/import-notes.ts
Normal file
72
packages/backend/src/server/api/endpoints/i/import-notes.ts
Normal file
|
@ -0,0 +1,72 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import ms from 'ms';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import { QueueService } from '@/core/QueueService.js';
|
||||
import type { DriveFilesRepository } from '@/models/_.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { RoleService } from '@/core/RoleService.js';
|
||||
import { ApiError } from '../../error.js';
|
||||
|
||||
export const meta = {
|
||||
secure: true,
|
||||
requireCredential: true,
|
||||
prohibitMoved: true,
|
||||
limit: {
|
||||
duration: ms('1hour'),
|
||||
max: 5,
|
||||
},
|
||||
|
||||
errors: {
|
||||
noSuchFile: {
|
||||
message: 'No such file.',
|
||||
code: 'NO_SUCH_FILE',
|
||||
id: 'b98644cf-a5ac-4277-a502-0b8054a709a3',
|
||||
},
|
||||
|
||||
emptyFile: {
|
||||
message: 'That file is empty.',
|
||||
code: 'EMPTY_FILE',
|
||||
id: '31a1b42c-06f7-42ae-8a38-a661c5c9f691',
|
||||
},
|
||||
|
||||
notPermitted: {
|
||||
message: 'You are not allowed to import notes.',
|
||||
code: 'NO_PERMISSION',
|
||||
id: '31a1b42c-06f7-42ae-8a38-a661c5c9f692',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
fileId: { type: 'string', format: 'misskey:id' },
|
||||
type: { type: 'string', nullable: true },
|
||||
},
|
||||
required: ['fileId'],
|
||||
} as const;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
constructor(
|
||||
@Inject(DI.driveFilesRepository)
|
||||
private driveFilesRepository: DriveFilesRepository,
|
||||
|
||||
private queueService: QueueService,
|
||||
private roleService: RoleService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const file = await this.driveFilesRepository.findOneBy({ id: ps.fileId });
|
||||
|
||||
if (file == null) throw new ApiError(meta.errors.noSuchFile);
|
||||
|
||||
if (file.size === 0) throw new ApiError(meta.errors.emptyFile);
|
||||
|
||||
if ((await this.roleService.getUserPolicies(me.id)).canImportNotes === false) {
|
||||
throw new ApiError(meta.errors.notPermitted);
|
||||
}
|
||||
|
||||
this.queueService.createImportNotesJob(me, file.id, ps.type);
|
||||
});
|
||||
}
|
||||
}
|
|
@ -177,7 +177,7 @@ export const paramDef = {
|
|||
autoAcceptFollowed: { type: 'boolean' },
|
||||
noCrawle: { type: 'boolean' },
|
||||
preventAiLearning: { type: 'boolean' },
|
||||
isIndexable: { type: 'boolean' },
|
||||
noindex: { type: 'boolean' },
|
||||
isBot: { type: 'boolean' },
|
||||
isCat: { type: 'boolean' },
|
||||
speakAsCat: { type: 'boolean' },
|
||||
|
@ -279,7 +279,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
if (typeof ps.isExplorable === 'boolean') updates.isExplorable = ps.isExplorable;
|
||||
if (typeof ps.hideOnlineStatus === 'boolean') updates.hideOnlineStatus = ps.hideOnlineStatus;
|
||||
if (typeof ps.publicReactions === 'boolean') profileUpdates.publicReactions = ps.publicReactions;
|
||||
if (typeof ps.isIndexable === 'boolean') updates.isIndexable = ps.isIndexable;
|
||||
if (typeof ps.noindex === 'boolean') updates.noindex = ps.noindex;
|
||||
if (typeof ps.isBot === 'boolean') updates.isBot = ps.isBot;
|
||||
if (typeof ps.carefulBot === 'boolean') profileUpdates.carefulBot = ps.carefulBot;
|
||||
if (typeof ps.autoAcceptFollowed === 'boolean') profileUpdates.autoAcceptFollowed = ps.autoAcceptFollowed;
|
||||
|
@ -411,16 +411,26 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
|
||||
const newName = updates.name === undefined ? user.name : updates.name;
|
||||
const newDescription = profileUpdates.description === undefined ? profile.description : profileUpdates.description;
|
||||
const newFields = profileUpdates.fields === undefined ? profile.fields : profileUpdates.fields;
|
||||
|
||||
if (newName != null) {
|
||||
const tokens = mfm.parseSimple(newName);
|
||||
emojis = emojis.concat(extractCustomEmojisFromMfm(tokens!));
|
||||
emojis = emojis.concat(extractCustomEmojisFromMfm(tokens));
|
||||
}
|
||||
|
||||
if (newDescription != null) {
|
||||
const tokens = mfm.parse(newDescription);
|
||||
emojis = emojis.concat(extractCustomEmojisFromMfm(tokens!));
|
||||
tags = extractHashtags(tokens!).map(tag => normalizeForSearch(tag)).splice(0, 32);
|
||||
emojis = emojis.concat(extractCustomEmojisFromMfm(tokens));
|
||||
tags = extractHashtags(tokens).map(tag => normalizeForSearch(tag)).splice(0, 32);
|
||||
}
|
||||
|
||||
for (const field of newFields) {
|
||||
const nameTokens = mfm.parseSimple(field.name);
|
||||
const valueTokens = mfm.parseSimple(field.value);
|
||||
emojis = emojis.concat([
|
||||
...extractCustomEmojisFromMfm(nameTokens),
|
||||
...extractCustomEmojisFromMfm(valueTokens),
|
||||
]);
|
||||
}
|
||||
|
||||
updates.emojis = emojis;
|
||||
|
|
|
@ -84,6 +84,10 @@ export const meta = {
|
|||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
defaultLike: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
disableRegistration: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
|
@ -334,6 +338,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
// クライアントの手間を減らすためあらかじめJSONに変換しておく
|
||||
defaultLightTheme: instance.defaultLightTheme ? JSON.stringify(JSON5.parse(instance.defaultLightTheme)) : null,
|
||||
defaultDarkTheme: instance.defaultDarkTheme ? JSON.stringify(JSON5.parse(instance.defaultDarkTheme)) : null,
|
||||
defaultLike: instance.defaultLike,
|
||||
ads: ads.map(ad => ({
|
||||
id: ad.id,
|
||||
url: ad.url,
|
||||
|
|
|
@ -70,6 +70,12 @@ export const meta = {
|
|||
id: '749ee0f6-d3da-459a-bf02-282e2da4292c',
|
||||
},
|
||||
|
||||
cannotReplyToInvisibleNote: {
|
||||
message: 'You cannot reply to an invisible Note.',
|
||||
code: 'CANNOT_REPLY_TO_AN_INVISIBLE_NOTE',
|
||||
id: 'b98980fa-3780-406c-a935-b6d0eeee10d1',
|
||||
},
|
||||
|
||||
cannotReplyToPureRenote: {
|
||||
message: 'You can not reply to a pure Renote.',
|
||||
code: 'CANNOT_REPLY_TO_A_PURE_RENOTE',
|
||||
|
@ -276,6 +282,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
throw new ApiError(meta.errors.noSuchReplyTarget);
|
||||
} else if (isPureRenote(reply)) {
|
||||
throw new ApiError(meta.errors.cannotReplyToPureRenote);
|
||||
} else if (!await this.noteEntityService.isVisibleForMe(reply, me.id)) {
|
||||
throw new ApiError(meta.errors.noSuchReplyTarget);
|
||||
}
|
||||
|
||||
// Check blocking
|
||||
|
|
|
@ -94,7 +94,20 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
|
||||
const serverSettings = await this.metaService.fetch();
|
||||
|
||||
if (serverSettings.enableFanoutTimeline) {
|
||||
if (!serverSettings.enableFanoutTimeline) {
|
||||
return await this.getFromDb({
|
||||
untilId,
|
||||
sinceId,
|
||||
limit: ps.limit,
|
||||
includeMyRenotes: ps.includeMyRenotes,
|
||||
includeRenotedMyNotes: ps.includeRenotedMyNotes,
|
||||
includeLocalRenotes: ps.includeLocalRenotes,
|
||||
withFiles: ps.withFiles,
|
||||
withReplies: ps.withReplies,
|
||||
withBots: ps.withBots,
|
||||
}, me);
|
||||
}
|
||||
|
||||
const [
|
||||
userIdsWhoMeMuting,
|
||||
userIdsWhoMeMutingRenotes,
|
||||
|
@ -161,6 +174,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
if (ps.withRenotes === false) return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ps.withBots && note.user?.isBot) return false;
|
||||
|
||||
return true;
|
||||
|
@ -175,20 +189,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
});
|
||||
|
||||
return await this.noteEntityService.packMany(redisTimeline, me);
|
||||
} else { // fallback to db
|
||||
return await this.getFromDb({
|
||||
untilId,
|
||||
sinceId,
|
||||
limit: ps.limit,
|
||||
includeMyRenotes: ps.includeMyRenotes,
|
||||
includeRenotedMyNotes: ps.includeRenotedMyNotes,
|
||||
includeLocalRenotes: ps.includeLocalRenotes,
|
||||
withFiles: ps.withFiles,
|
||||
withReplies: ps.withReplies,
|
||||
withBots: ps.withBots,
|
||||
}, me);
|
||||
}
|
||||
} else {
|
||||
if (serverSettings.enableFanoutTimelineDbFallback) { // fallback to db
|
||||
return await this.getFromDb({
|
||||
untilId,
|
||||
sinceId,
|
||||
|
@ -200,6 +202,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
withReplies: ps.withReplies,
|
||||
withBots: ps.withBots,
|
||||
}, me);
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
66
packages/backend/src/server/api/endpoints/notes/like.ts
Normal file
66
packages/backend/src/server/api/endpoints/notes/like.ts
Normal file
|
@ -0,0 +1,66 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import { GetterService } from '@/server/api/GetterService.js';
|
||||
import { ReactionService } from '@/core/ReactionService.js';
|
||||
import { MetaService } from '@/core/MetaService.js';
|
||||
import { ApiError } from '../../error.js';
|
||||
|
||||
export const meta = {
|
||||
tags: ['notes'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
prohibitMoved: true,
|
||||
|
||||
kind: 'write:reactions',
|
||||
|
||||
errors: {
|
||||
noSuchNote: {
|
||||
message: 'No such note.',
|
||||
code: 'NO_SUCH_NOTE',
|
||||
id: '033d0620-5bfe-4027-965d-980b0c85a3ea',
|
||||
},
|
||||
|
||||
youHaveBeenBlocked: {
|
||||
message: 'You cannot like this note because you have been blocked by this user.',
|
||||
code: 'YOU_HAVE_BEEN_BLOCKED',
|
||||
id: '20ef5475-9f38-4e4c-bd33-de6d979498ec',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
noteId: { type: 'string', format: 'misskey:id' },
|
||||
override: { type: 'string', nullable: true },
|
||||
},
|
||||
required: ['noteId'],
|
||||
} as const;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
constructor(
|
||||
private getterService: GetterService,
|
||||
private reactionService: ReactionService,
|
||||
private metaService: MetaService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const instance = await this.metaService.fetch();
|
||||
const like = ps.override ?? instance.defaultLike;
|
||||
const note = await this.getterService.getNote(ps.noteId).catch(err => {
|
||||
if (err.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
|
||||
throw err;
|
||||
});
|
||||
await this.reactionService.create(me, note, like).catch(async err => {
|
||||
if (err.id === '51c42bb4-931a-456b-bff7-e5a8a70dd298') {
|
||||
await this.reactionService.delete(me, note);
|
||||
return;
|
||||
}
|
||||
if (err.id === 'e70412a4-7197-4726-8e74-f3e0deb92aa7') throw new ApiError(meta.errors.youHaveBeenBlocked);
|
||||
throw err;
|
||||
});
|
||||
return;
|
||||
});
|
||||
}
|
||||
}
|
|
@ -85,7 +85,17 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
|
||||
const serverSettings = await this.metaService.fetch();
|
||||
|
||||
if (serverSettings.enableFanoutTimeline) {
|
||||
if (!serverSettings.enableFanoutTimeline) {
|
||||
return await this.getFromDb({
|
||||
untilId,
|
||||
sinceId,
|
||||
limit: ps.limit,
|
||||
withFiles: ps.withFiles,
|
||||
withReplies: ps.withReplies,
|
||||
withBots: ps.withBots,
|
||||
}, me);
|
||||
}
|
||||
|
||||
const [
|
||||
userIdsWhoMeMuting,
|
||||
userIdsWhoMeMutingRenotes,
|
||||
|
@ -154,17 +164,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
});
|
||||
|
||||
return await this.noteEntityService.packMany(redisTimeline, me);
|
||||
} else { // fallback to db
|
||||
return await this.getFromDb({
|
||||
untilId,
|
||||
sinceId,
|
||||
limit: ps.limit,
|
||||
withFiles: ps.withFiles,
|
||||
withReplies: ps.withReplies,
|
||||
withBots: ps.withBots,
|
||||
}, me);
|
||||
}
|
||||
} else {
|
||||
if (serverSettings.enableFanoutTimelineDbFallback) { // fallback to db
|
||||
return await this.getFromDb({
|
||||
untilId,
|
||||
sinceId,
|
||||
|
@ -173,6 +174,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
withReplies: ps.withReplies,
|
||||
withBots: ps.withBots,
|
||||
}, me);
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -187,7 +191,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
}, me: MiLocalUser | null) {
|
||||
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'),
|
||||
ps.sinceId, ps.untilId)
|
||||
.andWhere('(note.visibility = \'public\') AND (note.userHost IS NULL)')
|
||||
.andWhere('(note.visibility = \'public\') AND (note.userHost IS NULL) AND (note.channelId IS NULL)')
|
||||
.innerJoinAndSelect('note.user', 'user')
|
||||
.leftJoinAndSelect('note.reply', 'reply')
|
||||
.leftJoinAndSelect('note.renote', 'renote')
|
||||
|
|
|
@ -75,7 +75,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
host: ps.host,
|
||||
filetype: ps.filetype,
|
||||
order: ps.order,
|
||||
disableMeili: ps.filetype ? true : false,
|
||||
}, {
|
||||
untilId: ps.untilId,
|
||||
sinceId: ps.sinceId,
|
||||
|
|
|
@ -77,7 +77,20 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
|
||||
const serverSettings = await this.metaService.fetch();
|
||||
|
||||
if (serverSettings.enableFanoutTimeline) {
|
||||
if (!serverSettings.enableFanoutTimeline) {
|
||||
return await this.getFromDb({
|
||||
untilId,
|
||||
sinceId,
|
||||
limit: ps.limit,
|
||||
includeMyRenotes: ps.includeMyRenotes,
|
||||
includeRenotedMyNotes: ps.includeRenotedMyNotes,
|
||||
includeLocalRenotes: ps.includeLocalRenotes,
|
||||
withFiles: ps.withFiles,
|
||||
withRenotes: ps.withRenotes,
|
||||
withBots: ps.withBots,
|
||||
}, me);
|
||||
}
|
||||
|
||||
const [
|
||||
followings,
|
||||
userIdsWhoMeMuting,
|
||||
|
@ -136,20 +149,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
});
|
||||
|
||||
return await this.noteEntityService.packMany(redisTimeline, me);
|
||||
} else { // fallback to db
|
||||
return await this.getFromDb({
|
||||
untilId,
|
||||
sinceId,
|
||||
limit: ps.limit,
|
||||
includeMyRenotes: ps.includeMyRenotes,
|
||||
includeRenotedMyNotes: ps.includeRenotedMyNotes,
|
||||
includeLocalRenotes: ps.includeLocalRenotes,
|
||||
withFiles: ps.withFiles,
|
||||
withRenotes: ps.withRenotes,
|
||||
withBots: ps.withBots,
|
||||
}, me);
|
||||
}
|
||||
} else {
|
||||
if (serverSettings.enableFanoutTimelineDbFallback) { // fallback to db
|
||||
return await this.getFromDb({
|
||||
untilId,
|
||||
sinceId,
|
||||
|
@ -161,6 +162,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
withRenotes: ps.withRenotes,
|
||||
withBots: ps.withBots,
|
||||
}, me);
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
*/
|
||||
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import type { MiNote, NotesRepository, UserListMembershipsRepository, UserListsRepository } from '@/models/_.js';
|
||||
import { Brackets } from 'typeorm';
|
||||
import type { MiNote, MiUserList, NotesRepository, UserListMembershipsRepository, UserListsRepository } from '@/models/_.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
|
||||
import ActiveUsersChart from '@/core/chart/charts/active-users.js';
|
||||
|
@ -14,8 +15,9 @@ import { IdService } from '@/core/IdService.js';
|
|||
import { isUserRelated } from '@/misc/is-user-related.js';
|
||||
import { FunoutTimelineService } from '@/core/FunoutTimelineService.js';
|
||||
import { QueryService } from '@/core/QueryService.js';
|
||||
import { MiLocalUser } from '@/models/User.js';
|
||||
import { MetaService } from '@/core/MetaService.js';
|
||||
import { ApiError } from '../../error.js';
|
||||
import { Brackets } from 'typeorm';
|
||||
|
||||
export const meta = {
|
||||
tags: ['notes', 'lists'],
|
||||
|
@ -81,7 +83,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
private idService: IdService,
|
||||
private funoutTimelineService: FunoutTimelineService,
|
||||
private queryService: QueryService,
|
||||
|
||||
private metaService: MetaService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null);
|
||||
|
@ -96,6 +98,21 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
throw new ApiError(meta.errors.noSuchList);
|
||||
}
|
||||
|
||||
const serverSettings = await this.metaService.fetch();
|
||||
|
||||
if (!serverSettings.enableFanoutTimeline) {
|
||||
return await this.getFromDb(list, {
|
||||
untilId,
|
||||
sinceId,
|
||||
limit: ps.limit,
|
||||
includeMyRenotes: ps.includeMyRenotes,
|
||||
includeRenotedMyNotes: ps.includeRenotedMyNotes,
|
||||
includeLocalRenotes: ps.includeLocalRenotes,
|
||||
withFiles: ps.withFiles,
|
||||
withRenotes: ps.withRenotes,
|
||||
}, me);
|
||||
}
|
||||
|
||||
const [
|
||||
userIdsWhoMeMuting,
|
||||
userIdsWhoMeMutingRenotes,
|
||||
|
@ -145,7 +162,35 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
if (redisTimeline.length > 0) {
|
||||
this.activeUsersChart.read(me);
|
||||
return await this.noteEntityService.packMany(redisTimeline, me);
|
||||
} else { // fallback to db
|
||||
} else {
|
||||
if (serverSettings.enableFanoutTimelineDbFallback) { // fallback to db
|
||||
return await this.getFromDb(list, {
|
||||
untilId,
|
||||
sinceId,
|
||||
limit: ps.limit,
|
||||
includeMyRenotes: ps.includeMyRenotes,
|
||||
includeRenotedMyNotes: ps.includeRenotedMyNotes,
|
||||
includeLocalRenotes: ps.includeLocalRenotes,
|
||||
withFiles: ps.withFiles,
|
||||
withRenotes: ps.withRenotes,
|
||||
}, me);
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private async getFromDb(list: MiUserList, ps: {
|
||||
untilId: string | null,
|
||||
sinceId: string | null,
|
||||
limit: number,
|
||||
includeMyRenotes: boolean,
|
||||
includeRenotedMyNotes: boolean,
|
||||
includeLocalRenotes: boolean,
|
||||
withFiles: boolean,
|
||||
withRenotes: boolean,
|
||||
}, me: MiLocalUser) {
|
||||
//#region Construct query
|
||||
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId)
|
||||
.innerJoin(this.userListMembershipsRepository.metadata.targetName, 'userListMemberships', 'userListMemberships.userId = note.userId')
|
||||
|
@ -232,6 +277,4 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
|
||||
return await this.noteEntityService.packMany(timeline, me);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,6 @@ export const paramDef = {
|
|||
untilId: { type: 'string', format: 'misskey:id' },
|
||||
sinceDate: { type: 'integer' },
|
||||
untilDate: { type: 'integer' },
|
||||
includeMyRenotes: { type: 'boolean', default: true },
|
||||
withFiles: { type: 'boolean', default: false },
|
||||
excludeNsfw: { type: 'boolean', default: false },
|
||||
},
|
||||
|
@ -172,7 +171,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
query.andWhere('note.fileIds != \'{}\'');
|
||||
}
|
||||
|
||||
if (ps.includeMyRenotes === false) {
|
||||
if (ps.withRenotes === false) {
|
||||
query.andWhere(new Brackets(qb => {
|
||||
qb.orWhere('note.userId != :userId', { userId: ps.userId });
|
||||
qb.orWhere('note.renoteId IS NULL');
|
||||
|
|
|
@ -226,7 +226,7 @@ export class MastodonApiServerService {
|
|||
reply.send([]);
|
||||
});
|
||||
|
||||
fastify.post('/v1/apps', async (_request, reply) => {
|
||||
fastify.post('/v1/apps', { preHandler: upload.single('none') }, async (_request, reply) => {
|
||||
const BASE_URL = `${_request.protocol}://${_request.hostname}`;
|
||||
const client = getClient(BASE_URL, ''); // we are using this here, because in private mode some info isnt
|
||||
// displayed without being logged in
|
||||
|
@ -460,7 +460,7 @@ export class MastodonApiServerService {
|
|||
}
|
||||
});
|
||||
|
||||
fastify.post<{ Params: { id: string } }>('/v1/accounts/:id/follow', async (_request, reply) => {
|
||||
fastify.post<{ Params: { id: string } }>('/v1/accounts/:id/follow', { preHandler: upload.single('none') }, async (_request, reply) => {
|
||||
const BASE_URL = `${_request.protocol}://${_request.hostname}`;
|
||||
const accessTokens = _request.headers.authorization;
|
||||
const client = getClient(BASE_URL, accessTokens);
|
||||
|
@ -474,7 +474,7 @@ export class MastodonApiServerService {
|
|||
}
|
||||
});
|
||||
|
||||
fastify.post<{ Params: { id: string } }>('/v1/accounts/:id/unfollow', async (_request, reply) => {
|
||||
fastify.post<{ Params: { id: string } }>('/v1/accounts/:id/unfollow', { preHandler: upload.single('none') }, async (_request, reply) => {
|
||||
const BASE_URL = `${_request.protocol}://${_request.hostname}`;
|
||||
const accessTokens = _request.headers.authorization;
|
||||
const client = getClient(BASE_URL, accessTokens);
|
||||
|
@ -488,7 +488,7 @@ export class MastodonApiServerService {
|
|||
}
|
||||
});
|
||||
|
||||
fastify.post<{ Params: { id: string } }>('/v1/accounts/:id/block', async (_request, reply) => {
|
||||
fastify.post<{ Params: { id: string } }>('/v1/accounts/:id/block', { preHandler: upload.single('none') }, async (_request, reply) => {
|
||||
const BASE_URL = `${_request.protocol}://${_request.hostname}`;
|
||||
const accessTokens = _request.headers.authorization;
|
||||
const client = getClient(BASE_URL, accessTokens);
|
||||
|
@ -502,7 +502,7 @@ export class MastodonApiServerService {
|
|||
}
|
||||
});
|
||||
|
||||
fastify.post<{ Params: { id: string } }>('/v1/accounts/:id/unblock', async (_request, reply) => {
|
||||
fastify.post<{ Params: { id: string } }>('/v1/accounts/:id/unblock', { preHandler: upload.single('none') }, async (_request, reply) => {
|
||||
const BASE_URL = `${_request.protocol}://${_request.hostname}`;
|
||||
const accessTokens = _request.headers.authorization;
|
||||
const client = getClient(BASE_URL, accessTokens);
|
||||
|
@ -516,7 +516,7 @@ export class MastodonApiServerService {
|
|||
}
|
||||
});
|
||||
|
||||
fastify.post<{ Params: { id: string } }>('/v1/accounts/:id/mute', async (_request, reply) => {
|
||||
fastify.post<{ Params: { id: string } }>('/v1/accounts/:id/mute', { preHandler: upload.single('none') }, async (_request, reply) => {
|
||||
const BASE_URL = `${_request.protocol}://${_request.hostname}`;
|
||||
const accessTokens = _request.headers.authorization;
|
||||
const client = getClient(BASE_URL, accessTokens);
|
||||
|
@ -530,7 +530,7 @@ export class MastodonApiServerService {
|
|||
}
|
||||
});
|
||||
|
||||
fastify.post<{ Params: { id: string } }>('/v1/accounts/:id/unmute', async (_request, reply) => {
|
||||
fastify.post<{ Params: { id: string } }>('/v1/accounts/:id/unmute', { preHandler: upload.single('none') }, async (_request, reply) => {
|
||||
const BASE_URL = `${_request.protocol}://${_request.hostname}`;
|
||||
const accessTokens = _request.headers.authorization;
|
||||
const client = getClient(BASE_URL, accessTokens);
|
||||
|
@ -628,7 +628,7 @@ export class MastodonApiServerService {
|
|||
}
|
||||
});
|
||||
|
||||
fastify.post<{ Params: { id: string } }>('/v1/follow_requests/:id/authorize', async (_request, reply) => {
|
||||
fastify.post<{ Params: { id: string } }>('/v1/follow_requests/:id/authorize', { preHandler: upload.single('none') }, async (_request, reply) => {
|
||||
const BASE_URL = `${_request.protocol}://${_request.hostname}`;
|
||||
const accessTokens = _request.headers.authorization;
|
||||
const client = getClient(BASE_URL, accessTokens);
|
||||
|
@ -642,7 +642,7 @@ export class MastodonApiServerService {
|
|||
}
|
||||
});
|
||||
|
||||
fastify.post<{ Params: { id: string } }>('/v1/follow_requests/:id/reject', async (_request, reply) => {
|
||||
fastify.post<{ Params: { id: string } }>('/v1/follow_requests/:id/reject', { preHandler: upload.single('none') }, async (_request, reply) => {
|
||||
const BASE_URL = `${_request.protocol}://${_request.hostname}`;
|
||||
const accessTokens = _request.headers.authorization;
|
||||
const client = getClient(BASE_URL, accessTokens);
|
||||
|
@ -744,7 +744,7 @@ export class MastodonApiServerService {
|
|||
}
|
||||
});
|
||||
|
||||
fastify.post<{ Params: { id: string } }>('/v1/notification/:id/dismiss', async (_request, reply) => {
|
||||
fastify.post<{ Params: { id: string } }>('/v1/notification/:id/dismiss', { preHandler: upload.single('none') }, async (_request, reply) => {
|
||||
const BASE_URL = `${_request.protocol}://${_request.hostname}`;
|
||||
const accessTokens = _request.headers.authorization;
|
||||
const client = getClient(BASE_URL, accessTokens);
|
||||
|
@ -758,7 +758,7 @@ export class MastodonApiServerService {
|
|||
}
|
||||
});
|
||||
|
||||
fastify.post('/v1/notifications/clear', async (_request, reply) => {
|
||||
fastify.post('/v1/notifications/clear', { preHandler: upload.single('none') }, async (_request, reply) => {
|
||||
const BASE_URL = `${_request.protocol}://${_request.hostname}`;
|
||||
const accessTokens = _request.headers.authorization;
|
||||
const client = getClient(BASE_URL, accessTokens);
|
||||
|
@ -788,7 +788,7 @@ export class MastodonApiServerService {
|
|||
}
|
||||
});
|
||||
|
||||
fastify.post('/v1/filters', async (_request, reply) => {
|
||||
fastify.post('/v1/filters', { preHandler: upload.single('none') }, async (_request, reply) => {
|
||||
const BASE_URL = `${_request.protocol}://${_request.hostname}`;
|
||||
const accessTokens = _request.headers.authorization;
|
||||
const client = getClient(BASE_URL, accessTokens);
|
||||
|
@ -802,7 +802,7 @@ export class MastodonApiServerService {
|
|||
}
|
||||
});
|
||||
|
||||
fastify.post<{ Params: { id: string } }>('/v1/filters/:id', async (_request, reply) => {
|
||||
fastify.post<{ Params: { id: string } }>('/v1/filters/:id', { preHandler: upload.single('none') }, async (_request, reply) => {
|
||||
const BASE_URL = `${_request.protocol}://${_request.hostname}`;
|
||||
const accessTokens = _request.headers.authorization;
|
||||
const client = getClient(BASE_URL, accessTokens);
|
||||
|
|
|
@ -133,6 +133,7 @@ export class MastoConverters {
|
|||
const fqn = `${user.username}@${user.host ?? this.config.hostname}`;
|
||||
let acct = user.username;
|
||||
let acctUrl = `https://${user.host || this.config.host}/@${user.username}`;
|
||||
const acctUri = `https://${this.config.host}/users/${user.id}`;
|
||||
if (user.host) {
|
||||
acct = `${user.username}@${user.host}`;
|
||||
acctUrl = `https://${user.host}/@${user.username}`;
|
||||
|
@ -150,6 +151,7 @@ export class MastoConverters {
|
|||
statuses_count: user.notesCount,
|
||||
note: profile?.description ?? '',
|
||||
url: user.uri ?? acctUrl,
|
||||
uri: user.uri ?? acctUri,
|
||||
avatar: user.avatarUrl ? user.avatarUrl : 'https://dev.joinsharkey.org/static-assets/avatar.png',
|
||||
avatar_static: user.avatarUrl ? user.avatarUrl : 'https://dev.joinsharkey.org/static-assets/avatar.png',
|
||||
header: user.bannerUrl ? user.bannerUrl : 'https://dev.joinsharkey.org/static-assets/transparent.png',
|
||||
|
@ -272,7 +274,7 @@ export class MastoConverters {
|
|||
poll: status.poll ?? null,
|
||||
application: null, //FIXME
|
||||
language: null, //FIXME
|
||||
pinned: null,
|
||||
pinned: false,
|
||||
reactions: status.emoji_reactions,
|
||||
emoji_reactions: status.emoji_reactions,
|
||||
bookmarked: false,
|
||||
|
|
|
@ -55,7 +55,7 @@ class LocalTimelineChannel extends Channel {
|
|||
|
||||
if (note.user.host !== null) return;
|
||||
if (note.visibility !== 'public') return;
|
||||
if (note.channelId != null && !this.followingChannels.has(note.channelId)) return;
|
||||
if (note.channelId != null) return;
|
||||
|
||||
// 関係ない返信は除外
|
||||
if (note.reply && this.user && !this.following[note.userId]?.withReplies && !this.withReplies) {
|
||||
|
|
|
@ -3,14 +3,17 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import querystring from 'querystring';
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import megalodon, { MegalodonInterface } from 'megalodon';
|
||||
import querystring from 'querystring';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
/* import { kinds } from '@/misc/api-permissions.js';
|
||||
import type { Config } from '@/config.js';
|
||||
import { DI } from '@/di-symbols.js'; */
|
||||
import multer from 'fastify-multer';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
import type { Config } from '@/config.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import type { FastifyInstance } from 'fastify';
|
||||
|
||||
function getClient(BASE_URL: string, authorization: string | undefined): MegalodonInterface {
|
||||
|
@ -24,8 +27,8 @@ function getClient(BASE_URL: string, authorization: string | undefined): Megalod
|
|||
@Injectable()
|
||||
export class OAuth2ProviderService {
|
||||
constructor(
|
||||
/* @Inject(DI.config)
|
||||
private config: Config, */
|
||||
@Inject(DI.config)
|
||||
private config: Config,
|
||||
) { }
|
||||
|
||||
@bindThis
|
||||
|
@ -46,6 +49,14 @@ export class OAuth2ProviderService {
|
|||
});
|
||||
}); */
|
||||
|
||||
const upload = multer({
|
||||
storage: multer.diskStorage({}),
|
||||
limits: {
|
||||
fileSize: this.config.maxFileSize || 262144000,
|
||||
files: 1,
|
||||
},
|
||||
});
|
||||
|
||||
fastify.addHook('onRequest', (request, reply, done) => {
|
||||
reply.header('Access-Control-Allow-Origin', '*');
|
||||
done();
|
||||
|
@ -67,6 +78,8 @@ export class OAuth2ProviderService {
|
|||
payload.on('error', done);
|
||||
});
|
||||
|
||||
fastify.register(multer.contentParser);
|
||||
|
||||
fastify.get('/oauth/authorize', async (request, reply) => {
|
||||
const query: any = request.query;
|
||||
let param = "mastodon=true";
|
||||
|
@ -74,11 +87,22 @@ export class OAuth2ProviderService {
|
|||
if (query.redirect_uri) param += `&redirect_uri=${query.redirect_uri}`;
|
||||
const client = query.client_id ? query.client_id : "";
|
||||
reply.redirect(
|
||||
`${atob(client)}?${param}`,
|
||||
`${Buffer.from(client.toString(), 'base64').toString()}?${param}`,
|
||||
);
|
||||
});
|
||||
|
||||
fastify.post('/oauth/token', async (request, reply) => {
|
||||
fastify.get('/oauth/authorize/', async (request, reply) => {
|
||||
const query: any = request.query;
|
||||
let param = "mastodon=true";
|
||||
if (query.state) param += `&state=${query.state}`;
|
||||
if (query.redirect_uri) param += `&redirect_uri=${query.redirect_uri}`;
|
||||
const client = query.client_id ? query.client_id : "";
|
||||
reply.redirect(
|
||||
`${Buffer.from(client.toString(), 'base64').toString()}?${param}`,
|
||||
);
|
||||
});
|
||||
|
||||
fastify.post('/oauth/token', { preHandler: upload.none() }, async (request, reply) => {
|
||||
const body: any = request.body || request.query;
|
||||
if (body.grant_type === "client_credentials") {
|
||||
const ret = {
|
||||
|
|
|
@ -172,9 +172,10 @@ export class ClientServerService {
|
|||
icon: meta.iconUrl,
|
||||
appleTouchIcon: meta.app512IconUrl,
|
||||
themeColor: meta.themeColor,
|
||||
serverErrorImageUrl: meta.serverErrorImageUrl ?? 'https://xn--931a.moe/assets/error.jpg',
|
||||
infoImageUrl: meta.infoImageUrl ?? 'https://xn--931a.moe/assets/info.jpg',
|
||||
notFoundImageUrl: meta.notFoundImageUrl ?? 'https://xn--931a.moe/assets/not-found.jpg',
|
||||
serverErrorImageUrl: meta.serverErrorImageUrl ?? 'https://launcher.moe/error.png',
|
||||
infoImageUrl: meta.infoImageUrl ?? 'https://launcher.moe/nothinghere.png',
|
||||
notFoundImageUrl: meta.notFoundImageUrl ?? 'https://launcher.moe/missingpage.webp',
|
||||
instanceUrl: this.config.url,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -217,7 +217,7 @@
|
|||
font-family: BIZ UDGothic, Roboto, HelveticaNeue, Arial, sans-serif;
|
||||
}
|
||||
|
||||
#misskey_app,
|
||||
#sharkey_app,
|
||||
#splash {
|
||||
display: none !important;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
font-family: BIZ UDGothic, Roboto, HelveticaNeue, Arial, sans-serif;
|
||||
}
|
||||
|
||||
#misskey_app,
|
||||
#sharkey_app,
|
||||
#splash {
|
||||
display: none !important;
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ html
|
|||
meta(name='theme-color' content= themeColor || '#86b300')
|
||||
meta(name='theme-color-orig' content= themeColor || '#86b300')
|
||||
meta(property='og:site_name' content= instanceName || 'Sharkey')
|
||||
meta(property='instance_url' content= instanceUrl)
|
||||
meta(name='viewport' content='width=device-width, initial-scale=1')
|
||||
link(rel='icon' href= icon || '/favicon.ico')
|
||||
link(rel='apple-touch-icon' href= appleTouchIcon || '/apple-touch-icon.png')
|
||||
|
|
|
@ -152,6 +152,7 @@ describe('Timelines', () => {
|
|||
|
||||
await api('/following/create', { userId: bob.id }, alice);
|
||||
await api('/following/create', { userId: carol.id }, alice);
|
||||
await api('/following/create', { userId: carol.id }, bob);
|
||||
await api('/following/update', { userId: bob.id, withReplies: true }, alice);
|
||||
await sleep(1000);
|
||||
const carolNote = await post(carol, { text: 'hi', visibility: 'followers' });
|
||||
|
|
|
@ -94,6 +94,7 @@ describe('ActivityPub', () => {
|
|||
cacheRemoteFiles: true,
|
||||
cacheRemoteSensitiveFiles: true,
|
||||
enableFanoutTimeline: true,
|
||||
enableFanoutTimelineDbFallback: true,
|
||||
perUserHomeTimelineCacheMax: 800,
|
||||
perLocalUserUserTimelineCacheMax: 800,
|
||||
perRemoteUserUserTimelineCacheMax: 800,
|
||||
|
|
|
@ -24,12 +24,12 @@
|
|||
"@rollup/pluginutils": "5.0.5",
|
||||
"@syuilo/aiscript": "0.16.0",
|
||||
"@phosphor-icons/web": "^2.0.3",
|
||||
"@vitejs/plugin-vue": "4.4.0",
|
||||
"@vue-macros/reactivity-transform": "0.3.23",
|
||||
"@vue/compiler-sfc": "3.3.7",
|
||||
"@vitejs/plugin-vue": "4.5.0",
|
||||
"@vue-macros/reactivity-transform": "0.4.0",
|
||||
"@vue/compiler-sfc": "3.3.8",
|
||||
"astring": "1.8.6",
|
||||
"autosize": "6.0.1",
|
||||
"aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.0.5",
|
||||
"aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.0.6",
|
||||
"broadcast-channel": "6.0.0",
|
||||
"browser-image-resizer": "github:misskey-dev/browser-image-resizer#v2.2.1-misskey.3",
|
||||
"buraha": "0.0.1",
|
||||
|
@ -39,7 +39,7 @@
|
|||
"chartjs-chart-matrix": "2.0.1",
|
||||
"chartjs-plugin-gradient": "0.6.1",
|
||||
"chartjs-plugin-zoom": "2.0.1",
|
||||
"chromatic": "7.6.0",
|
||||
"chromatic": "9.0.0",
|
||||
"compare-versions": "6.1.0",
|
||||
"cropperjs": "2.0.0-beta.4",
|
||||
"date-fns": "2.30.0",
|
||||
|
@ -57,7 +57,7 @@
|
|||
"photoswipe": "5.4.2",
|
||||
"punycode": "2.3.1",
|
||||
"querystring": "0.2.1",
|
||||
"rollup": "4.2.0",
|
||||
"rollup": "4.4.1",
|
||||
"sanitize-html": "2.11.0",
|
||||
"shiki": "^0.14.5",
|
||||
"sass": "1.69.5",
|
||||
|
@ -74,62 +74,62 @@
|
|||
"v-code-diff": "1.7.2",
|
||||
"vanilla-tilt": "1.8.1",
|
||||
"vite": "4.5.0",
|
||||
"vue": "3.3.7",
|
||||
"vue": "3.3.8",
|
||||
"vuedraggable": "next"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-actions": "7.5.2",
|
||||
"@storybook/addon-essentials": "7.5.2",
|
||||
"@storybook/addon-interactions": "7.5.2",
|
||||
"@storybook/addon-links": "7.5.2",
|
||||
"@storybook/addon-storysource": "7.5.2",
|
||||
"@storybook/addons": "7.5.2",
|
||||
"@storybook/blocks": "7.5.2",
|
||||
"@storybook/core-events": "7.5.2",
|
||||
"@storybook/addon-actions": "7.5.3",
|
||||
"@storybook/addon-essentials": "7.5.3",
|
||||
"@storybook/addon-interactions": "7.5.3",
|
||||
"@storybook/addon-links": "7.5.3",
|
||||
"@storybook/addon-storysource": "7.5.3",
|
||||
"@storybook/addons": "7.5.3",
|
||||
"@storybook/blocks": "7.5.3",
|
||||
"@storybook/core-events": "7.5.3",
|
||||
"@storybook/jest": "0.2.3",
|
||||
"@storybook/manager-api": "7.5.2",
|
||||
"@storybook/preview-api": "7.5.2",
|
||||
"@storybook/react": "7.5.2",
|
||||
"@storybook/react-vite": "7.5.2",
|
||||
"@storybook/manager-api": "7.5.3",
|
||||
"@storybook/preview-api": "7.5.3",
|
||||
"@storybook/react": "7.5.3",
|
||||
"@storybook/react-vite": "7.5.3",
|
||||
"@storybook/testing-library": "0.2.2",
|
||||
"@storybook/theming": "7.5.2",
|
||||
"@storybook/types": "7.5.2",
|
||||
"@storybook/vue3": "7.5.2",
|
||||
"@storybook/vue3-vite": "7.5.2",
|
||||
"@storybook/theming": "7.5.3",
|
||||
"@storybook/types": "7.5.3",
|
||||
"@storybook/vue3": "7.5.3",
|
||||
"@storybook/vue3-vite": "7.5.3",
|
||||
"@testing-library/vue": "8.0.0",
|
||||
"@types/escape-regexp": "0.0.2",
|
||||
"@types/estree": "1.0.4",
|
||||
"@types/matter-js": "0.19.2",
|
||||
"@types/micromatch": "4.0.4",
|
||||
"@types/node": "20.8.10",
|
||||
"@types/punycode": "2.1.1",
|
||||
"@types/sanitize-html": "2.9.3",
|
||||
"@types/throttle-debounce": "5.0.1",
|
||||
"@types/tinycolor2": "1.4.5",
|
||||
"@types/uuid": "9.0.6",
|
||||
"@types/websocket": "1.0.8",
|
||||
"@types/ws": "8.5.8",
|
||||
"@typescript-eslint/eslint-plugin": "6.9.1",
|
||||
"@typescript-eslint/parser": "6.9.1",
|
||||
"@types/escape-regexp": "0.0.3",
|
||||
"@types/estree": "1.0.5",
|
||||
"@types/matter-js": "0.19.4",
|
||||
"@types/micromatch": "4.0.5",
|
||||
"@types/node": "20.9.1",
|
||||
"@types/punycode": "2.1.2",
|
||||
"@types/sanitize-html": "2.9.4",
|
||||
"@types/throttle-debounce": "5.0.2",
|
||||
"@types/tinycolor2": "1.4.6",
|
||||
"@types/uuid": "9.0.7",
|
||||
"@types/websocket": "1.0.9",
|
||||
"@types/ws": "8.5.9",
|
||||
"@typescript-eslint/eslint-plugin": "6.11.0",
|
||||
"@typescript-eslint/parser": "6.11.0",
|
||||
"@vitest/coverage-v8": "0.34.6",
|
||||
"@vue/runtime-core": "3.3.7",
|
||||
"@vue/runtime-core": "3.3.8",
|
||||
"acorn": "8.11.2",
|
||||
"cross-env": "7.0.3",
|
||||
"cypress": "13.4.0",
|
||||
"eslint": "8.52.0",
|
||||
"cypress": "13.5.1",
|
||||
"eslint": "8.53.0",
|
||||
"eslint-plugin-import": "2.29.0",
|
||||
"eslint-plugin-vue": "9.18.1",
|
||||
"fast-glob": "3.3.1",
|
||||
"fast-glob": "3.3.2",
|
||||
"happy-dom": "10.0.3",
|
||||
"micromatch": "4.0.5",
|
||||
"msw": "1.3.2",
|
||||
"msw-storybook-addon": "1.10.0",
|
||||
"nodemon": "3.0.1",
|
||||
"prettier": "3.0.3",
|
||||
"prettier": "3.1.0",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"start-server-and-test": "2.0.1",
|
||||
"storybook": "7.5.2",
|
||||
"start-server-and-test": "2.0.3",
|
||||
"storybook": "7.5.3",
|
||||
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
|
||||
"summaly": "github:misskey-dev/summaly",
|
||||
"vite-plugin-turbosnap": "1.0.3",
|
||||
|
|
|
@ -249,7 +249,7 @@ export async function common(createVue: () => App<Element>) {
|
|||
// https://github.com/misskey-dev/misskey/pull/8575#issuecomment-1114239210
|
||||
// なぜか2回実行されることがあるため、mountするdivを1つに制限する
|
||||
const rootEl = ((): HTMLElement => {
|
||||
const MISSKEY_MOUNT_DIV_ID = 'misskey_app';
|
||||
const MISSKEY_MOUNT_DIV_ID = 'sharkey_app';
|
||||
|
||||
const currentRoot = document.getElementById(MISSKEY_MOUNT_DIV_ID);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import { common } from './common.js';
|
|||
import { version, ui, lang, updateLocale } from '@/config.js';
|
||||
import { i18n, updateI18n } from '@/i18n.js';
|
||||
import { confirm, alert, post, popup, toast } from '@/os.js';
|
||||
import { useStream, isReloading } from '@/stream.js';
|
||||
import { useStream } from '@/stream.js';
|
||||
import * as sound from '@/scripts/sound.js';
|
||||
import { $i, refreshAccount, login, updateAccount, signout } from '@/account.js';
|
||||
import { defaultStore, ColdDeviceStorage } from '@/store.js';
|
||||
|
@ -39,7 +39,6 @@ export async function mainBoot() {
|
|||
|
||||
let reloadDialogShowing = false;
|
||||
stream.on('_disconnected_', async () => {
|
||||
if (isReloading) return;
|
||||
if (defaultStore.state.serverDisconnectedBehavior === 'reload') {
|
||||
location.reload();
|
||||
} else if (defaultStore.state.serverDisconnectedBehavior === 'dialog') {
|
||||
|
@ -58,7 +57,7 @@ export async function mainBoot() {
|
|||
});
|
||||
|
||||
for (const plugin of ColdDeviceStorage.get('plugins').filter(p => p.active)) {
|
||||
import('../plugin').then(async ({ install }) => {
|
||||
import('@/plugin.js').then(async ({ install }) => {
|
||||
// Workaround for https://bugs.webkit.org/show_bug.cgi?id=242740
|
||||
await new Promise(r => setTimeout(r, 0));
|
||||
install(plugin);
|
||||
|
|
|
@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<template>
|
||||
<div v-if="user" :class="$style.root">
|
||||
<i class="ph-plane-takeoff ph-bold ph-lg" style="margin-right: 8px;"></i>
|
||||
<i class="ph-airplane-takeoff ph-bold ph-lg" style="margin-right: 8px;"></i>
|
||||
{{ i18n.ts.accountMoved }}
|
||||
<MkMention :class="$style.link" :username="user.username" :host="user.host ?? localHost"/>
|
||||
</div>
|
||||
|
|
|
@ -45,12 +45,12 @@ import contains from '@/scripts/contains.js';
|
|||
import { char2twemojiFilePath, char2fluentEmojiFilePath } from '@/scripts/emoji-base.js';
|
||||
import { acct } from '@/filters/user.js';
|
||||
import * as os from '@/os.js';
|
||||
import { MFM_TAGS } from '@/scripts/mfm-tags.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import { emojilist, getEmojiName } from '@/scripts/emojilist.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { miLocalStorage } from '@/local-storage.js';
|
||||
import { customEmojis } from '@/custom-emojis.js';
|
||||
import { MFM_TAGS } from '@/const.js';
|
||||
|
||||
type EmojiDef = {
|
||||
emoji: string;
|
||||
|
|
|
@ -44,7 +44,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div>
|
||||
<div v-if="renoteCollapsed" :class="$style.collapsedRenoteTarget">
|
||||
<MkAvatar :class="$style.collapsedRenoteTargetAvatar" :user="appearNote.user" link preview/>
|
||||
<Mfm :text="getNoteSummary(appearNote)" :plain="true" :nowrap="true" :author="appearNote.user" :nyaize="'account'" :class="$style.collapsedRenoteTargetText" @click="renoteCollapsed = false"/>
|
||||
<Mfm :text="getNoteSummary(appearNote)" :plain="true" :nowrap="true" :author="appearNote.user" :nyaize="'respect'" :class="$style.collapsedRenoteTargetText" @click="renoteCollapsed = false"/>
|
||||
</div>
|
||||
<article v-else :class="$style.article" @contextmenu.stop="onContextmenu">
|
||||
<div v-if="appearNote.channel" :class="$style.colorBar" :style="{ background: appearNote.channel.color }"></div>
|
||||
|
@ -54,7 +54,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkInstanceTicker v-if="showTicker" :instance="appearNote.user.instance"/>
|
||||
<div style="container-type: inline-size;">
|
||||
<p v-if="appearNote.cw != null" :class="$style.cw">
|
||||
<Mfm v-if="appearNote.cw != ''" style="margin-right: 8px;" :text="appearNote.cw" :author="appearNote.user" :nyaize="'account'"/>
|
||||
<Mfm v-if="appearNote.cw != ''" style="margin-right: 8px;" :text="appearNote.cw" :author="appearNote.user" :nyaize="'respect'"/>
|
||||
<MkCwButton v-model="showContent" :note="appearNote" style="margin: 4px 0;" v-on:click.stop/>
|
||||
</p>
|
||||
<div v-show="appearNote.cw == null || showContent" :class="[{ [$style.contentCollapsed]: collapsed }]" >
|
||||
|
@ -66,7 +66,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
:parsedNodes="parsed"
|
||||
:text="appearNote.text"
|
||||
:author="appearNote.user"
|
||||
:nyaize="'account'"
|
||||
:nyaize="'respect'"
|
||||
:emojiUrls="appearNote.emojis"
|
||||
:enableEmojiMenu="true"
|
||||
:enableEmojiMenuReaction="true"
|
||||
|
@ -76,7 +76,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkLoading v-if="translating" mini/>
|
||||
<div v-else>
|
||||
<b>{{ i18n.t('translatedFrom', { x: translation.sourceLang }) }}: </b>
|
||||
<Mfm :text="translation.text" :author="appearNote.user" :nyaize="'account'" :emojiUrls="appearNote.emojis"/>
|
||||
<Mfm :text="translation.text" :author="appearNote.user" :nyaize="'respect'" :emojiUrls="appearNote.emojis"/>
|
||||
</div>
|
||||
</div>
|
||||
<MkButton v-if="!allowAnim && animated" :class="$style.playMFMButton" :small="true" @click="animatedMFM()" v-on:click.stop><i class="ph-play ph-bold ph-lg "></i> {{ i18n.ts._animatedMFM.play }}</MkButton>
|
||||
|
@ -234,9 +234,15 @@ if (noteViewInterruptors.length > 0) {
|
|||
onMounted(async () => {
|
||||
let result: Misskey.entities.Note | null = deepClone(note);
|
||||
for (const interruptor of noteViewInterruptors) {
|
||||
try {
|
||||
result = await interruptor.handler(result);
|
||||
|
||||
if (result === null) return isDeleted.value = true;
|
||||
if (result === null) {
|
||||
isDeleted.value = true;
|
||||
return;
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
note = result;
|
||||
});
|
||||
|
@ -265,7 +271,7 @@ const renoteUri = appearNote.renote ? appearNote.renote.uri : null;
|
|||
const isMyRenote = $i && ($i.id === note.userId);
|
||||
const showContent = ref(false);
|
||||
const parsed = $computed(() => appearNote.text ? mfm.parse(appearNote.text) : null);
|
||||
const urls = parsed ? extractUrlFromMfm(parsed) : null;
|
||||
const urls = $computed(() => parsed ? extractUrlFromMfm(parsed).filter(u => u !== renoteUrl && u !== renoteUri) : null);
|
||||
const animated = $computed(() => parsed ? checkAnimationFromMfm(parsed) : null);
|
||||
const allowAnim = ref(defaultStore.state.advancedMfm && defaultStore.state.animatedMfm ? true : false);
|
||||
const isLong = shouldCollapsed(appearNote, urls ?? []);
|
||||
|
@ -279,6 +285,7 @@ const translating = ref(false);
|
|||
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.user.instance);
|
||||
const canRenote = computed(() => ['public', 'home'].includes(appearNote.visibility) || (appearNote.visibility === 'followers' && appearNote.userId === $i.id));
|
||||
let renoteCollapsed = $ref(defaultStore.state.collapseRenotes && isRenote && (($i && ($i.id === note.userId || $i.id === appearNote.userId)) || (appearNote.myReaction != null)));
|
||||
const defaultLike = computed(() => defaultStore.state.like !== '❤️' ? defaultStore.state.like : null);
|
||||
|
||||
const keymap = {
|
||||
'r': () => reply(true),
|
||||
|
@ -510,9 +517,9 @@ function like(): void {
|
|||
if (props.mock) {
|
||||
return;
|
||||
}
|
||||
os.api('notes/reactions/create', {
|
||||
os.api('notes/like', {
|
||||
noteId: appearNote.id,
|
||||
reaction: '❤️',
|
||||
override: defaultLike.value,
|
||||
});
|
||||
const el = likeButton.value as HTMLElement | null | undefined;
|
||||
if (el) {
|
||||
|
@ -531,9 +538,9 @@ function react(viaKeyboard = false): void {
|
|||
return;
|
||||
}
|
||||
|
||||
os.api('notes/reactions/create', {
|
||||
os.api('notes/like', {
|
||||
noteId: appearNote.id,
|
||||
reaction: '❤️',
|
||||
override: defaultLike.value,
|
||||
});
|
||||
const el = reactButton.value as HTMLElement | null | undefined;
|
||||
if (el) {
|
||||
|
@ -973,7 +980,7 @@ function emitUpdReaction(emoji: string, delta: number) {
|
|||
width: 100%;
|
||||
margin-top: 14px;
|
||||
position: sticky;
|
||||
bottom: calc(var(--stickyBottom, 0px) + 14px);
|
||||
bottom: calc(var(--stickyBottom, 0px) - 100px);
|
||||
}
|
||||
|
||||
.showLessLabel {
|
||||
|
|
|
@ -68,7 +68,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</header>
|
||||
<div :class="$style.noteContent">
|
||||
<p v-if="appearNote.cw != null" :class="$style.cw">
|
||||
<Mfm v-if="appearNote.cw != ''" style="margin-right: 8px;" :text="appearNote.cw" :author="appearNote.user" :nyaize="'account'"/>
|
||||
<Mfm v-if="appearNote.cw != ''" style="margin-right: 8px;" :text="appearNote.cw" :author="appearNote.user" :nyaize="'respect'"/>
|
||||
<MkCwButton v-model="showContent" :note="appearNote"/>
|
||||
</p>
|
||||
<div v-show="appearNote.cw == null || showContent">
|
||||
|
@ -79,7 +79,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
:parsedNodes="parsed"
|
||||
:text="appearNote.text"
|
||||
:author="appearNote.user"
|
||||
:nyaize="'account'"
|
||||
:nyaize="'respect'"
|
||||
:emojiUrls="appearNote.emojis"
|
||||
:enableEmojiMenu="true"
|
||||
:enableEmojiMenuReaction="true"
|
||||
|
@ -90,7 +90,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkLoading v-if="translating" mini/>
|
||||
<div v-else>
|
||||
<b>{{ i18n.t('translatedFrom', { x: translation.sourceLang }) }}: </b>
|
||||
<Mfm :text="translation.text" :author="appearNote.user" :nyaize="'account'" :emojiUrls="appearNote.emojis"/>
|
||||
<Mfm :text="translation.text" :author="appearNote.user" :nyaize="'respect'" :emojiUrls="appearNote.emojis"/>
|
||||
</div>
|
||||
</div>
|
||||
<MkButton v-if="!allowAnim && animated" :class="$style.playMFMButton" :small="true" @click="animatedMFM()" v-on:click.stop><i class="ph-play ph-bold ph-lg "></i> {{ i18n.ts._animatedMFM.play }}</MkButton>
|
||||
|
@ -272,9 +272,15 @@ if (noteViewInterruptors.length > 0) {
|
|||
onMounted(async () => {
|
||||
let result: Misskey.entities.Note | null = deepClone(note);
|
||||
for (const interruptor of noteViewInterruptors) {
|
||||
try {
|
||||
result = await interruptor.handler(result);
|
||||
|
||||
if (result === null) return isDeleted.value = true;
|
||||
if (result === null) {
|
||||
isDeleted.value = true;
|
||||
return;
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
note = result;
|
||||
});
|
||||
|
@ -309,7 +315,7 @@ const muted = ref($i ? checkWordMute(appearNote, $i, $i.mutedWords) : false);
|
|||
const translation = ref(null);
|
||||
const translating = ref(false);
|
||||
const parsed = $computed(() => appearNote.text ? mfm.parse(appearNote.text) : null);
|
||||
const urls = parsed ? extractUrlFromMfm(parsed) : null;
|
||||
const urls = parsed ? extractUrlFromMfm(parsed).filter(u => u !== renoteUrl && u !== renoteUri) : null;
|
||||
const animated = $computed(() => parsed ? checkAnimationFromMfm(parsed) : null);
|
||||
const allowAnim = ref(defaultStore.state.advancedMfm && defaultStore.state.animatedMfm ? true : false);
|
||||
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.user.instance);
|
||||
|
@ -317,6 +323,7 @@ const conversation = ref<Misskey.entities.Note[]>([]);
|
|||
const replies = ref<Misskey.entities.Note[]>([]);
|
||||
const quotes = ref<Misskey.entities.Note[]>([]);
|
||||
const canRenote = computed(() => ['public', 'home'].includes(appearNote.visibility) || appearNote.userId === $i.id);
|
||||
const defaultLike = computed(() => defaultStore.state.like !== '❤️' ? defaultStore.state.like : null);
|
||||
|
||||
watch(() => props.expandAllCws, (expandAllCws) => {
|
||||
if (expandAllCws !== showContent.value) showContent.value = expandAllCws;
|
||||
|
@ -550,9 +557,9 @@ function react(viaKeyboard = false): void {
|
|||
pleaseLogin();
|
||||
showMovedDialog();
|
||||
if (appearNote.reactionAcceptance === 'likeOnly') {
|
||||
os.api('notes/reactions/create', {
|
||||
os.api('notes/like', {
|
||||
noteId: appearNote.id,
|
||||
reaction: '❤️',
|
||||
override: defaultLike.value,
|
||||
});
|
||||
const el = reactButton.value as HTMLElement | null | undefined;
|
||||
if (el) {
|
||||
|
@ -580,9 +587,9 @@ function react(viaKeyboard = false): void {
|
|||
function like(): void {
|
||||
pleaseLogin();
|
||||
showMovedDialog();
|
||||
os.api('notes/reactions/create', {
|
||||
os.api('notes/like', {
|
||||
noteId: appearNote.id,
|
||||
reaction: '❤️',
|
||||
override: defaultLike.value,
|
||||
});
|
||||
const el = likeButton.value as HTMLElement | null | undefined;
|
||||
if (el) {
|
||||
|
|
|
@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<Mfm :text="text.trim()" :author="user" :nyaize="'account'" :i="user"/>
|
||||
<Mfm :text="text.trim()" :author="user" :nyaize="'respect'" :i="user"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkNoteHeader :class="$style.header" :note="note" :mini="true"/>
|
||||
<div>
|
||||
<p v-if="note.cw != null" :class="$style.cw">
|
||||
<Mfm v-if="note.cw != ''" style="margin-right: 8px;" :text="note.cw" :author="note.user" :nyaize="'account'" :emojiUrls="note.emojis"/>
|
||||
<Mfm v-if="note.cw != ''" style="margin-right: 8px;" :text="note.cw" :author="note.user" :nyaize="'respect'" :emojiUrls="note.emojis"/>
|
||||
<MkCwButton v-model="showContent" :note="note"/>
|
||||
</p>
|
||||
<div v-show="note.cw == null || showContent">
|
||||
|
|
|
@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkNoteHeader :class="$style.header" :note="note" :mini="true"/>
|
||||
<div :class="$style.content">
|
||||
<p v-if="note.cw != null" :class="$style.cw">
|
||||
<Mfm v-if="note.cw != ''" style="margin-right: 8px;" :text="note.cw" :author="note.user" :nyaize="'account'"/>
|
||||
<Mfm v-if="note.cw != ''" style="margin-right: 8px;" :text="note.cw" :author="note.user" :nyaize="'respect'"/>
|
||||
<MkCwButton v-model="showContent" :note="note"/>
|
||||
</p>
|
||||
<div v-show="note.cw == null || showContent">
|
||||
|
@ -133,6 +133,7 @@ const menuButton = shallowRef<HTMLElement>();
|
|||
const likeButton = shallowRef<HTMLElement>();
|
||||
|
||||
let appearNote = $computed(() => isRenote ? props.note.renote as Misskey.entities.Note : props.note);
|
||||
const defaultLike = computed(() => defaultStore.state.like !== '❤️' ? defaultStore.state.like : null);
|
||||
|
||||
const isRenote = (
|
||||
props.note.renote != null &&
|
||||
|
@ -186,9 +187,9 @@ function react(viaKeyboard = false): void {
|
|||
pleaseLogin();
|
||||
showMovedDialog();
|
||||
if (props.note.reactionAcceptance === 'likeOnly') {
|
||||
os.api('notes/reactions/create', {
|
||||
os.api('notes/like', {
|
||||
noteId: props.note.id,
|
||||
reaction: '❤️',
|
||||
override: defaultLike.value,
|
||||
});
|
||||
const el = reactButton.value as HTMLElement | null | undefined;
|
||||
if (el) {
|
||||
|
@ -216,9 +217,9 @@ function react(viaKeyboard = false): void {
|
|||
function like(): void {
|
||||
pleaseLogin();
|
||||
showMovedDialog();
|
||||
os.api('notes/reactions/create', {
|
||||
os.api('notes/like', {
|
||||
noteId: props.note.id,
|
||||
reaction: '❤️',
|
||||
override: defaultLike.value,
|
||||
});
|
||||
const el = reactButton.value as HTMLElement | null | undefined;
|
||||
if (el) {
|
||||
|
|
|
@ -96,6 +96,10 @@ onUnmounted(() => {
|
|||
onDeactivated(() => {
|
||||
if (connection) connection.dispose();
|
||||
});
|
||||
|
||||
defineExpose({
|
||||
reload,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
|
|
@ -43,12 +43,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { computed, ComputedRef, isRef, nextTick, onActivated, onBeforeUnmount, onDeactivated, onMounted, ref, watch } from 'vue';
|
||||
import { computed, ComputedRef, isRef, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onDeactivated, ref, watch } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import * as os from '@/os.js';
|
||||
import { onScrollTop, isTopVisible, getBodyScrollHeight, getScrollContainer, onScrollBottom, scrollToBottom, scroll, isBottomVisible } from '@/scripts/scroll.js';
|
||||
import { useDocumentVisibility } from '@/scripts/use-document-visibility.js';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import { MisskeyEntity } from '@/types/date-separated-list';
|
||||
import { i18n } from '@/i18n.js';
|
||||
|
@ -91,6 +90,7 @@ function concatMapWithArray(map: MisskeyEntityMap, entities: MisskeyEntity[]): M
|
|||
</script>
|
||||
<script lang="ts" setup>
|
||||
import { infoImageUrl } from '@/instance.js';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
pagination: Paging;
|
||||
|
@ -185,9 +185,8 @@ watch([$$(backed), $$(contentEl)], () => {
|
|||
}
|
||||
});
|
||||
|
||||
if (props.pagination.params && isRef(props.pagination.params)) {
|
||||
watch(props.pagination.params, init, { deep: true });
|
||||
}
|
||||
// パラメータに何らかの変更があった際、再読込したい(チャンネル等のIDが変わったなど)
|
||||
watch(() => props.pagination.params, init, { deep: true });
|
||||
|
||||
watch(queue, (a, b) => {
|
||||
if (a.size === 0 && b.size === 0) return;
|
||||
|
@ -440,8 +439,6 @@ const updateItem = (id: MisskeyEntity['id'], replacer: (old: MisskeyEntity) => M
|
|||
if (queueItem) queue.value.set(id, replacer(queueItem));
|
||||
};
|
||||
|
||||
const inited = init();
|
||||
|
||||
onActivated(() => {
|
||||
isBackTop.value = false;
|
||||
});
|
||||
|
@ -454,8 +451,8 @@ function toBottom() {
|
|||
scrollToBottom(contentEl!);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
inited.then(() => {
|
||||
onBeforeMount(() => {
|
||||
init().then(() => {
|
||||
if (props.pagination.reversed) {
|
||||
nextTick(() => {
|
||||
setTimeout(toBottom, 800);
|
||||
|
@ -487,7 +484,6 @@ defineExpose({
|
|||
queue,
|
||||
backed,
|
||||
more,
|
||||
inited,
|
||||
reload,
|
||||
prepend,
|
||||
append: appendItem,
|
||||
|
|
|
@ -757,7 +757,11 @@ async function post(ev?: MouseEvent) {
|
|||
// plugin
|
||||
if (notePostInterruptors.length > 0) {
|
||||
for (const interruptor of notePostInterruptors) {
|
||||
try {
|
||||
postData = await interruptor.handler(deepClone(postData));
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1075,6 +1079,7 @@ defineExpose({
|
|||
|
||||
.preview {
|
||||
padding: 16px 20px 0 20px;
|
||||
min-height: 75px;
|
||||
max-height: 150px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
|
|
@ -73,7 +73,6 @@ function getReactionName(reaction: string): string {
|
|||
}
|
||||
|
||||
.users {
|
||||
contain: content;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin: -4px 14px 0 10px;
|
||||
|
@ -85,7 +84,7 @@ function getReactionName(reaction: string): string {
|
|||
line-height: 24px;
|
||||
padding-top: 4px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
overflow: visible;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<span v-if="note.isHidden" style="opacity: 0.5">({{ i18n.ts.private }})</span>
|
||||
<span v-if="note.deletedAt" style="opacity: 0.5">({{ i18n.ts.deleted }})</span>
|
||||
<MkA v-if="note.replyId" :class="$style.reply" :to="`/notes/${note.replyId}`" v-on:click.stop><i class="ph-arrow-bend-left-up ph-bold ph-lg"></i></MkA>
|
||||
<Mfm v-if="note.text" :text="note.text" :author="note.user" :nyaize="'account'" :isAnim="allowAnim" :emojiUrls="note.emojis"/>
|
||||
<Mfm v-if="note.text" :text="note.text" :author="note.user" :nyaize="'respect'" :isAnim="allowAnim" :emojiUrls="note.emojis"/>
|
||||
<MkButton v-if="!allowAnim && animated && !hideFiles" :class="$style.playMFMButton" :small="true" @click="animatedMFM()" v-on:click.stop><i class="ph-play ph-bold ph-lg "></i> {{ i18n.ts._animatedMFM.play }}</MkButton>
|
||||
<MkButton v-else-if="!defaultStore.state.animatedMfm && allowAnim && animated && !hideFiles" :class="$style.playMFMButton" :small="true" @click="animatedMFM()" v-on:click.stop><i class="ph-stop ph-bold ph-lg "></i> {{ i18n.ts._animatedMFM.stop }}</MkButton>
|
||||
<div v-if="note.text && translating || note.text && translation" :class="$style.translation">
|
||||
|
@ -145,7 +145,7 @@ const collapsed = $ref(isLong);
|
|||
width: 100%;
|
||||
margin-top: 14px;
|
||||
position: sticky;
|
||||
bottom: calc(var(--stickyBottom, 0px) + 14px);
|
||||
bottom: calc(var(--stickyBottom, 0px) - 100px);
|
||||
}
|
||||
|
||||
.playMFMButton {
|
||||
|
|
|
@ -5,19 +5,28 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<template>
|
||||
<MkPullToRefresh ref="prComponent" :refresher="() => reloadTimeline()">
|
||||
<MkNotes ref="tlComponent" :noGap="!defaultStore.state.showGapBetweenNotesInTimeline" :pagination="pagination" @queue="emit('queue', $event)" @status="prComponent.setDisabled($event)"/>
|
||||
<MkNotes
|
||||
v-if="paginationQuery"
|
||||
ref="tlComponent"
|
||||
:pagination="paginationQuery"
|
||||
:noGap="!defaultStore.state.showGapBetweenNotesInTimeline"
|
||||
@queue="emit('queue', $event)"
|
||||
@status="prComponent.setDisabled($event)"
|
||||
/>
|
||||
</MkPullToRefresh>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, provide, onUnmounted } from 'vue';
|
||||
import { computed, watch, onUnmounted, provide } from 'vue';
|
||||
import { Connection } from 'misskey-js/built/streaming.js';
|
||||
import MkNotes from '@/components/MkNotes.vue';
|
||||
import MkPullToRefresh from '@/components/MkPullToRefresh.vue';
|
||||
import { useStream, reloadStream } from '@/stream.js';
|
||||
import { useStream } from '@/stream.js';
|
||||
import * as sound from '@/scripts/sound.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { instance } from '@/instance.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import { Paging } from '@/components/MkPagination.vue';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
src: string;
|
||||
|
@ -44,6 +53,18 @@ const emit = defineEmits<{
|
|||
|
||||
provide('inChannel', computed(() => props.src === 'channel'));
|
||||
|
||||
type TimelineQueryType = {
|
||||
antennaId?: string,
|
||||
withRenotes?: boolean,
|
||||
withReplies?: boolean,
|
||||
withFiles?: boolean,
|
||||
withBots?: boolean,
|
||||
visibility?: string,
|
||||
listId?: string,
|
||||
channelId?: string,
|
||||
roleId?: string
|
||||
}
|
||||
|
||||
const prComponent: InstanceType<typeof MkPullToRefresh> = $ref();
|
||||
const tlComponent: InstanceType<typeof MkNotes> = $ref();
|
||||
|
||||
|
@ -65,13 +86,13 @@ const prepend = note => {
|
|||
}
|
||||
};
|
||||
|
||||
let endpoint;
|
||||
let query;
|
||||
let connection;
|
||||
let connection2;
|
||||
let connection: Connection;
|
||||
let connection2: Connection;
|
||||
let paginationQuery: Paging | null = null;
|
||||
|
||||
const stream = useStream();
|
||||
const connectChannel = () => {
|
||||
|
||||
function connectChannel() {
|
||||
if (props.src === 'antenna') {
|
||||
connection = stream.useChannel('antenna', {
|
||||
antennaId: props.antenna,
|
||||
|
@ -128,7 +149,16 @@ const connectChannel = () => {
|
|||
});
|
||||
}
|
||||
if (props.src !== 'directs' || props.src !== 'mentions') connection.on('note', prepend);
|
||||
};
|
||||
}
|
||||
|
||||
function disconnectChannel() {
|
||||
if (connection) connection.dispose();
|
||||
if (connection2) connection2.dispose();
|
||||
}
|
||||
|
||||
function updatePaginationQuery() {
|
||||
let endpoint: string | null;
|
||||
let query: TimelineQueryType | null;
|
||||
|
||||
if (props.src === 'antenna') {
|
||||
endpoint = 'antennas/notes';
|
||||
|
@ -147,26 +177,27 @@ if (props.src === 'antenna') {
|
|||
query = {
|
||||
withRenotes: props.withRenotes,
|
||||
withReplies: props.withReplies,
|
||||
withBots: props.withBots,
|
||||
withFiles: props.onlyFiles ? true : undefined,
|
||||
withBots: props.withBots,
|
||||
};
|
||||
} else if (props.src === 'social') {
|
||||
endpoint = 'notes/hybrid-timeline';
|
||||
query = {
|
||||
withRenotes: props.withRenotes,
|
||||
withReplies: props.withReplies,
|
||||
withBots: props.withBots,
|
||||
withFiles: props.onlyFiles ? true : undefined,
|
||||
withBots: props.withBots,
|
||||
};
|
||||
} else if (props.src === 'global') {
|
||||
endpoint = 'notes/global-timeline';
|
||||
query = {
|
||||
withRenotes: props.withRenotes,
|
||||
withBots: props.withBots,
|
||||
withFiles: props.onlyFiles ? true : undefined,
|
||||
withBots: props.withBots,
|
||||
};
|
||||
} else if (props.src === 'mentions') {
|
||||
endpoint = 'notes/mentions';
|
||||
query = null;
|
||||
} else if (props.src === 'directs') {
|
||||
endpoint = 'notes/mentions';
|
||||
query = {
|
||||
|
@ -188,29 +219,46 @@ if (props.src === 'antenna') {
|
|||
query = {
|
||||
roleId: props.role,
|
||||
};
|
||||
} else {
|
||||
endpoint = null;
|
||||
query = null;
|
||||
}
|
||||
|
||||
if (!defaultStore.state.disableStreamingTimeline) {
|
||||
connectChannel();
|
||||
|
||||
onUnmounted(() => {
|
||||
connection.dispose();
|
||||
if (connection2) connection2.dispose();
|
||||
});
|
||||
}
|
||||
|
||||
const pagination = {
|
||||
if (endpoint && query) {
|
||||
paginationQuery = {
|
||||
endpoint: endpoint,
|
||||
limit: 10,
|
||||
params: query,
|
||||
};
|
||||
} else {
|
||||
paginationQuery = null;
|
||||
}
|
||||
}
|
||||
|
||||
function refreshEndpointAndChannel() {
|
||||
if (!defaultStore.state.disableStreamingTimeline) {
|
||||
disconnectChannel();
|
||||
connectChannel();
|
||||
}
|
||||
|
||||
updatePaginationQuery();
|
||||
}
|
||||
|
||||
// IDが切り替わったら切り替え先のTLを表示させたい
|
||||
watch(() => [props.list, props.antenna, props.channel, props.role], refreshEndpointAndChannel);
|
||||
|
||||
// 初回表示用
|
||||
refreshEndpointAndChannel();
|
||||
|
||||
onUnmounted(() => {
|
||||
disconnectChannel();
|
||||
});
|
||||
|
||||
function reloadTimeline() {
|
||||
return new Promise<void>((res) => {
|
||||
tlNotesCount = 0;
|
||||
|
||||
tlComponent.pagingComponent?.reload().then(() => {
|
||||
reloadStream();
|
||||
res();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -7,6 +7,7 @@ import { VNode, h } from 'vue';
|
|||
import * as mfm from 'mfm-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkUrl from '@/components/global/MkUrl.vue';
|
||||
import MkTime from '@/components/global/MkTime.vue';
|
||||
import MkLink from '@/components/MkLink.vue';
|
||||
import MkMention from '@/components/MkMention.vue';
|
||||
import MkEmoji from '@/components/global/MkEmoji.vue';
|
||||
|
@ -36,7 +37,7 @@ type MfmProps = {
|
|||
isNote?: boolean;
|
||||
emojiUrls?: string[];
|
||||
rootScale?: number;
|
||||
nyaize: boolean | 'account';
|
||||
nyaize: boolean | 'respect';
|
||||
parsedNodes?: mfm.MfmNode[] | null;
|
||||
enableEmojiMenu?: boolean;
|
||||
enableEmojiMenuReaction?: boolean;
|
||||
|
@ -46,7 +47,7 @@ type MfmProps = {
|
|||
// eslint-disable-next-line import/no-default-export
|
||||
export default function(props: MfmProps) {
|
||||
const isNote = props.isNote ?? true;
|
||||
const shouldNyaize = props.nyaize ? props.nyaize === 'account' ? props.author?.isCat ? props.author?.speakAsCat : false : false : false;
|
||||
const shouldNyaize = props.nyaize ? props.nyaize === 'respect' ? props.author?.isCat ? props.author?.speakAsCat : false : false : false;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||
if (props.text == null || props.text === '') return;
|
||||
|
@ -239,6 +240,34 @@ export default function(props: MfmProps) {
|
|||
style = `background-color: #${color};`;
|
||||
break;
|
||||
}
|
||||
case 'ruby': {
|
||||
if (token.children.length === 1) {
|
||||
const child = token.children[0];
|
||||
const text = child.type === 'text' ? child.props.text : '';
|
||||
return h('ruby', {}, [text.split(' ')[0], h('rt', text.split(' ')[1])]);
|
||||
} else {
|
||||
const rt = token.children.at(-1)!;
|
||||
const text = rt.type === 'text' ? rt.props.text : '';
|
||||
return h('ruby', {}, [...genEl(token.children.slice(0, token.children.length - 1), scale), h('rt', text.trim())]);
|
||||
}
|
||||
}
|
||||
case 'unixtime': {
|
||||
const child = token.children[0];
|
||||
const unixtime = parseInt(child.type === 'text' ? child.props.text : '');
|
||||
return h('span', {
|
||||
style: 'display: inline-block; font-size: 90%; border: solid 1px var(--divider); border-radius: 999px; padding: 4px 10px 4px 6px;',
|
||||
}, [
|
||||
h('i', {
|
||||
class: 'ph-clock ph-bold ph-lg',
|
||||
style: 'margin-right: 0.25em;',
|
||||
}),
|
||||
h(MkTime, {
|
||||
key: Math.random(),
|
||||
time: unixtime * 1000,
|
||||
mode: 'detail',
|
||||
}),
|
||||
]);
|
||||
}
|
||||
}
|
||||
if (style == null) {
|
||||
return h('span', {}, ['$[', token.props.name, ' ', ...genEl(token.children, scale), ']']);
|
||||
|
|
|
@ -49,8 +49,15 @@ const relative = $computed<string>(() => {
|
|||
ago >= 3600 ? i18n.t('_ago.hoursAgo', { n: Math.round(ago / 3600).toString() }) :
|
||||
ago >= 60 ? i18n.t('_ago.minutesAgo', { n: (~~(ago / 60)).toString() }) :
|
||||
ago >= 10 ? i18n.t('_ago.secondsAgo', { n: (~~(ago % 60)).toString() }) :
|
||||
ago >= -1 ? i18n.ts._ago.justNow :
|
||||
i18n.ts._ago.future);
|
||||
ago >= -3 ? i18n.ts._ago.justNow :
|
||||
ago < -31536000 ? i18n.t('_timeIn.years', { n: Math.round(-ago / 31536000).toString() }) :
|
||||
ago < -2592000 ? i18n.t('_timeIn.months', { n: Math.round(-ago / 2592000).toString() }) :
|
||||
ago < -604800 ? i18n.t('_timeIn.weeks', { n: Math.round(-ago / 604800).toString() }) :
|
||||
ago < -86400 ? i18n.t('_timeIn.days', { n: Math.round(-ago / 86400).toString() }) :
|
||||
ago < -3600 ? i18n.t('_timeIn.hours', { n: Math.round(-ago / 3600).toString() }) :
|
||||
ago < -60 ? i18n.t('_timeIn.minutes', { n: (~~(-ago / 60)).toString() }) :
|
||||
i18n.t('_timeIn.seconds', { n: (~~(-ago % 60)).toString() })
|
||||
);
|
||||
});
|
||||
|
||||
let tickId: number;
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
|
||||
import { miLocalStorage } from '@/local-storage.js';
|
||||
|
||||
const address = new URL(location.href);
|
||||
const address = new URL(document.querySelector<HTMLMetaElement>('meta[property="instance_url"]')?.content || location.href);
|
||||
const siteName = document.querySelector<HTMLMetaElement>('meta[property="og:site_name"]')?.content;
|
||||
|
||||
export const host = address.host;
|
||||
export const hostname = address.hostname;
|
||||
export const url = address.origin;
|
||||
export const apiUrl = url + '/api';
|
||||
export const wsUrl = url.replace('http://', 'ws://').replace('https://', 'wss://') + '/streaming';
|
||||
export const apiUrl = location.origin + '/api';
|
||||
export const wsOrigin = location.origin;
|
||||
export const lang = miLocalStorage.getItem('lang') ?? 'en-US';
|
||||
export const langs = _LANGS_;
|
||||
const preParseLocale = miLocalStorage.getItem('locale');
|
||||
|
|
|
@ -112,6 +112,7 @@ export const ROLE_POLICIES = [
|
|||
'gtlAvailable',
|
||||
'ltlAvailable',
|
||||
'canPublicNote',
|
||||
'canImportNotes',
|
||||
'canInvite',
|
||||
'inviteLimit',
|
||||
'inviteLimitCycle',
|
||||
|
@ -140,6 +141,8 @@ export const ROLE_POLICIES = [
|
|||
export const CURRENT_STICKY_TOP = 'CURRENT_STICKY_TOP';
|
||||
export const CURRENT_STICKY_BOTTOM = 'CURRENT_STICKY_BOTTOM';
|
||||
|
||||
export const DEFAULT_SERVER_ERROR_IMAGE_URL = 'https://xn--931a.moe/assets/error.jpg';
|
||||
export const DEFAULT_NOT_FOUND_IMAGE_URL = 'https://xn--931a.moe/assets/not-found.jpg';
|
||||
export const DEFAULT_INFO_IMAGE_URL = 'https://xn--931a.moe/assets/info.jpg';
|
||||
export const DEFAULT_SERVER_ERROR_IMAGE_URL = 'https://launcher.moe/error.png';
|
||||
export const DEFAULT_NOT_FOUND_IMAGE_URL = 'https://launcher.moe/missingpage.webp';
|
||||
export const DEFAULT_INFO_IMAGE_URL = 'https://launcher.moe/nothinghere.png';
|
||||
|
||||
export const MFM_TAGS = ['tada', 'jelly', 'twitch', 'shake', 'spin', 'jump', 'bounce', 'flip', 'x2', 'x3', 'x4', 'scale', 'position', 'fg', 'bg', 'font', 'blur', 'rainbow', 'sparkle', 'rotate', 'ruby', 'unixtime'];
|
||||
|
|
|
@ -47,6 +47,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<template #label>{{ i18n.ts.backgroundImageUrl }}</template>
|
||||
</MkInput>
|
||||
|
||||
<FromSlot>
|
||||
<template #label>Default like emoji</template>
|
||||
<MkCustomEmoji v-if="defaultLike.startsWith(':')" style="max-height: 3em; font-size: 1.1em;" :useOriginalSize="false" :class="$style.reaction" :name="defaultLike" :normal="true" :noStyle="true"/>
|
||||
<MkEmoji v-else :emoji="defaultLike" style="max-height: 3em; font-size: 1.1em;" :normal="true" :noStyle="true"/>
|
||||
<MkButton rounded :small="true" @click="chooseNewLike"><i class="ph-smiley ph-bold ph-lg"></i> Change</MkButton>
|
||||
</FromSlot>
|
||||
|
||||
<MkInput v-model="notFoundImageUrl" type="url">
|
||||
<template #prefix><i class="ph-link ph-bold ph-lg"></i></template>
|
||||
<template #label>{{ i18n.ts.notFoundDescription }}</template>
|
||||
|
@ -102,6 +109,7 @@ import MkInput from '@/components/MkInput.vue';
|
|||
import MkTextarea from '@/components/MkTextarea.vue';
|
||||
import FormSection from '@/components/form/section.vue';
|
||||
import FormSplit from '@/components/form/split.vue';
|
||||
import FromSlot from '@/components/form/slot.vue';
|
||||
import FormSuspense from '@/components/form/suspense.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { instance, fetchInstance } from '@/instance.js';
|
||||
|
@ -119,6 +127,7 @@ let backgroundImageUrl: string | null = $ref(null);
|
|||
let themeColor: any = $ref(null);
|
||||
let defaultLightTheme: any = $ref(null);
|
||||
let defaultDarkTheme: any = $ref(null);
|
||||
let defaultLike: any = $ref(null);
|
||||
let serverErrorImageUrl: string | null = $ref(null);
|
||||
let infoImageUrl: string | null = $ref(null);
|
||||
let notFoundImageUrl: string | null = $ref(null);
|
||||
|
@ -134,6 +143,7 @@ async function init() {
|
|||
themeColor = meta.themeColor;
|
||||
defaultLightTheme = meta.defaultLightTheme;
|
||||
defaultDarkTheme = meta.defaultDarkTheme;
|
||||
defaultLike = meta.defaultLike;
|
||||
serverErrorImageUrl = meta.serverErrorImageUrl;
|
||||
infoImageUrl = meta.infoImageUrl;
|
||||
notFoundImageUrl = meta.notFoundImageUrl;
|
||||
|
@ -159,6 +169,19 @@ function save() {
|
|||
});
|
||||
}
|
||||
|
||||
function chooseNewLike(ev: MouseEvent) {
|
||||
os.pickEmoji(ev.currentTarget ?? ev.target, {
|
||||
showPinned: false,
|
||||
}).then(emoji => {
|
||||
os.apiWithDialog('admin/update-meta', {
|
||||
defaultLike: emoji,
|
||||
}).then(() => {
|
||||
fetchInstance();
|
||||
defaultLike = emoji;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
const headerTabs = $computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
|
|
|
@ -23,6 +23,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<option value="publishing">{{ i18n.ts.publishing }}</option>
|
||||
<option value="suspended">{{ i18n.ts.suspended }}</option>
|
||||
<option value="blocked">{{ i18n.ts.blocked }}</option>
|
||||
<option value="silenced">{{ i18n.ts.silence }}</option>
|
||||
<option value="notResponding">{{ i18n.ts.notResponding }}</option>
|
||||
</MkSelect>
|
||||
<MkSelect v-model="sort">
|
||||
|
@ -83,6 +84,7 @@ const pagination = {
|
|||
state === 'publishing' ? { publishing: true } :
|
||||
state === 'suspended' ? { suspended: true } :
|
||||
state === 'blocked' ? { blocked: true } :
|
||||
state === 'silenced' ? { silenced: true } :
|
||||
state === 'notResponding' ? { notResponding: true } :
|
||||
{}),
|
||||
})),
|
||||
|
@ -91,6 +93,7 @@ const pagination = {
|
|||
function getStatus(instance) {
|
||||
if (instance.isSuspended) return 'Suspended';
|
||||
if (instance.isBlocked) return 'Blocked';
|
||||
if (instance.isSilenced) return 'Silenced';
|
||||
if (instance.isNotResponding) return 'Error';
|
||||
return 'Alive';
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ import MkSuperMenu from '@/components/MkSuperMenu.vue';
|
|||
import MkInfo from '@/components/MkInfo.vue';
|
||||
import { instance } from '@/instance.js';
|
||||
import * as os from '@/os.js';
|
||||
import { lookupUser } from '@/scripts/lookup-user.js';
|
||||
import { lookupUser, lookupUserByEmail } from '@/scripts/lookup-user.js';
|
||||
import { useRouter } from '@/router.js';
|
||||
import { definePageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.js';
|
||||
|
||||
|
@ -279,7 +279,7 @@ provideMetadataReceiver((info) => {
|
|||
}
|
||||
});
|
||||
|
||||
const invite = () => {
|
||||
function invite() {
|
||||
os.api('admin/invite/create').then(x => {
|
||||
os.alert({
|
||||
type: 'info',
|
||||
|
@ -291,15 +291,21 @@ const invite = () => {
|
|||
text: err,
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
const lookup = (ev) => {
|
||||
function lookup(ev: MouseEvent) {
|
||||
os.popupMenu([{
|
||||
text: i18n.ts.user,
|
||||
icon: 'ph-user ph-bold ph-lg',
|
||||
action: () => {
|
||||
lookupUser();
|
||||
},
|
||||
}, {
|
||||
text: `${i18n.ts.user} (${i18n.ts.email})`,
|
||||
icon: 'ph-user ph-bold ph-lg',
|
||||
action: () => {
|
||||
lookupUserByEmail();
|
||||
},
|
||||
}, {
|
||||
text: i18n.ts.note,
|
||||
icon: 'ph-pencil ph-bold ph-lg',
|
||||
|
@ -319,7 +325,7 @@ const lookup = (ev) => {
|
|||
alert('TODO');
|
||||
},
|
||||
}], ev.currentTarget ?? ev.target);
|
||||
};
|
||||
}
|
||||
|
||||
const headerActions = $computed(() => []);
|
||||
|
||||
|
|
|
@ -160,6 +160,26 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div>
|
||||
</MkFolder>
|
||||
|
||||
<MkFolder v-if="matchQuery([i18n.ts._role._options.canImportNotes, 'canImportNotes'])">
|
||||
<template #label>{{ i18n.ts._role._options.canImportNotes }}</template>
|
||||
<template #suffix>
|
||||
<span v-if="role.policies.canImportNotes.useDefault" :class="$style.useDefaultLabel">{{ i18n.ts._role.useBaseValue }}</span>
|
||||
<span v-else>{{ role.policies.canImportNotes.value ? i18n.ts.yes : i18n.ts.no }}</span>
|
||||
<span :class="$style.priorityIndicator"><i :class="getPriorityIcon(role.policies.canImportNotes)"></i></span>
|
||||
</template>
|
||||
<div class="_gaps">
|
||||
<MkSwitch v-model="role.policies.canImportNotes.useDefault" :readonly="readonly">
|
||||
<template #label>{{ i18n.ts._role.useBaseValue }}</template>
|
||||
</MkSwitch>
|
||||
<MkSwitch v-model="role.policies.canImportNotes.value" :disabled="role.policies.canImportNotes.useDefault" :readonly="readonly">
|
||||
<template #label>{{ i18n.ts.enable }}</template>
|
||||
</MkSwitch>
|
||||
<MkRange v-model="role.policies.canImportNotes.priority" :min="0" :max="2" :step="1" easing :textConverter="(v) => v === 0 ? i18n.ts._role._priority.low : v === 1 ? i18n.ts._role._priority.middle : v === 2 ? i18n.ts._role._priority.high : ''">
|
||||
<template #label>{{ i18n.ts._role.priority }}</template>
|
||||
</MkRange>
|
||||
</div>
|
||||
</MkFolder>
|
||||
|
||||
<MkFolder v-if="matchQuery([i18n.ts._role._options.canInvite, 'canInvite'])">
|
||||
<template #label>{{ i18n.ts._role._options.canInvite }}</template>
|
||||
<template #suffix>
|
||||
|
|
|
@ -48,6 +48,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</MkSwitch>
|
||||
</MkFolder>
|
||||
|
||||
<MkFolder v-if="matchQuery([i18n.ts._role._options.canImportNotes, 'canImportNotes'])">
|
||||
<template #label>{{ i18n.ts._role._options.canImportNotes }}</template>
|
||||
<template #suffix>{{ policies.canImportNotes ? i18n.ts.yes : i18n.ts.no }}</template>
|
||||
<MkSwitch v-model="policies.canImportNotes">
|
||||
<template #label>{{ i18n.ts.enable }}</template>
|
||||
</MkSwitch>
|
||||
</MkFolder>
|
||||
|
||||
<MkFolder v-if="matchQuery([i18n.ts._role._options.canInvite, 'canInvite'])">
|
||||
<template #label>{{ i18n.ts._role._options.canInvite }}</template>
|
||||
<template #suffix>{{ policies.canInvite ? i18n.ts.yes : i18n.ts.no }}</template>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue