Merge branch 'main' into mk.absturztau.be

This commit is contained in:
Puniko 2023-03-05 08:47:50 +01:00
commit 6a8128f255
370 changed files with 1965 additions and 1805 deletions

File diff suppressed because one or more lines are too long

873
.yarn/releases/yarn-3.4.1.cjs vendored Executable file

File diff suppressed because one or more lines are too long

View file

@ -8,4 +8,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
yarnPath: .yarn/releases/yarn-3.3.0.cjs
yarnPath: .yarn/releases/yarn-3.4.1.cjs

View file

@ -86,8 +86,6 @@ This release contains 6 breaking changes, including changes to the configuration
### Removed:
- **BREAKING** server: remove Twitter, Github and Discord integrations
ff31b8b06 server: remove bios and cli
a673647fb server: remove avatarColor and bannerColor properties
- **BREAKING** server: remove `api/admin/delete-account`,
You should use the API endpoint `admin/accounts/delete` instead.
It has the same parameter and the same behaviour.
@ -108,6 +106,8 @@ a673647fb server: remove avatarColor and bannerColor properties
- `/api/i/gallery/likes`
- `/api/i/gallery/posts`
- `/api/users/gallery/posts`
- server: remove bios and cli
- server: remove avatarColor and bannerColor properties
- server: remove application level websocket ping
This pinging mechanism was unused in `foundkey-js`, and we expect other usage to be low.
You can use the pinging mechanism built into the websocket protocol if you wish.

View file

@ -34,6 +34,7 @@ For a production environment you might not want to follow the `main` branch dire
This project follows [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html).
Significant changes should be listed in the changelog (i.e. the file called `CHANGELOG.md`, see also section "Changelog Trailer" below).
Although Semantic Versioning talks about "the API", changes to the user interface should also be tracked.
However, changes to translation files are not considered notable enough to be listed in the changelog.
Consider if any of the existing documentation has to be updated because of your contribution.

View file

@ -6,7 +6,9 @@ FoundKey is a free and open source microblogging server compatible with Activity
See the [changelog](./CHANGELOG.md) and [roadmap](./ROADMAP.md) for more on what's changed and future plans.
## Documentation
FoundKey's documentation is a work in progress. In the meantime, much of the documentation on the [Misskey Hub](https://misskey-hub.net/) will also apply to FoundKey.
FoundKey's documentation is a work in progress, which can be found in the `docs/` folder.
In the meantime, much of the documentation on the [Misskey Hub](https://misskey-hub.net/) will also apply to FoundKey.
## Contributing
If you're interested in helping out with the project, please read the [contributing guide](./CONTRIBUTING.md).

View file

@ -1,2 +0,0 @@
# Changing the default Reaction
You can change the default reaction that is used when an ActivityPub "Like" is received from '👍' to '⭐' by changing the boolean value `meta.useStarForReactionFallback` in the databse respectively.

View file

@ -64,6 +64,13 @@ adduser --disabled-password --disabled-login foundkey
- Make sure you set the PostgreSQL and Redis settings correctly.
- Use a strong password for the PostgreSQL user and take note of it since it'll be needed later.
### Reverse proxy
For production use and for HTTPS termination you will have to use a reverse proxy.
There are instructions for setting up [nginx](./nginx.md) for this purpose.
### Changing the default Reaction
You can change the default reaction that is used when an ActivityPub "Like" is received from '👍' to '⭐' by changing the boolean value `meta.useStarForReactionFallback` in the databse respectively.
## Build FoundKey
Build foundkey with the following:

View file

@ -10,7 +10,7 @@
4. Run `sudo nginx -t` to verify that the configuration file will be loaded successfully.
5. Run `sudo systemctl restart nginx` to restart nginx.
# Nginx cofig example
# Nginx config example
```nginx
# For WebSocket

View file

@ -3,7 +3,7 @@ headlineMisskey: "নোট ব্যাবহার করে সংযুক
introMisskey: "স্বাগতম! মিসকি একটি ওপেন সোর্স, ডিসেন্ট্রালাইজড মাইক্রোব্লগিং পরিষেবা।\
\ \n\"নোট\" তৈরির মাধ্যমে যা ঘটছে তা সবার সাথে শেয়ার করুন \U0001F4E1\n\"রিঅ্যাকশন\"\
\ গুলির মাধ্যমে যেকোনো নোট সম্পর্কে আপনার অনুভূতি ব্যাক্ত করতে পারেন \U0001F44D\n\
একটি নতুন দুনিয়া ঘুরে দেখুন \U0001F680\n"
একটি নতুন দুনিয়া ঘুরে দেখুন \U0001F680"
monthAndDay: "{day}/{month}"
search: "খুঁজুন"
notifications: "বিজ্ঞপ্তি"
@ -65,7 +65,7 @@ driveFileDeleteConfirm: "আপনি কি নিশ্চিত যে আপ
unfollowConfirm: "{name} কে আনফলোও করার ব্যাপারে নিশ্চিত?"
exportRequested: "আপনার তথ্যসমূহ রপ্তানির জন্য অনুরোধ করেছেন। এতে কিছু সময় লাগতে পারে।\
\ রপ্তানি সম্পন্ন হলে তা আপনার ড্রাইভে সংরক্ষিত হবে।"
importRequested: "আপনার তথ্যসমূহ আমদানির জন্য অনুরোধ করেছেন। এতে কিছু সময় লাগতে পারে। "
importRequested: "আপনার তথ্যসমূহ আমদানির জন্য অনুরোধ করেছেন। এতে কিছু সময় লাগতে পারে।."
lists: "লিস্ট"
note: "নোট"
notes: "নোটগুলি"
@ -79,10 +79,10 @@ somethingHappened: "একটি ত্রুটি হয়েছে"
retry: "আবার চেষ্টা করুন"
pageLoadError: "পেজ লোড করা যায়নি"
pageLoadErrorDescription: "এটি সাধারনত নেটওয়ার্কের সমস্যার বা ব্রাউজার ক্যাশের কারণে\
\ ঘটে থাকে। ব্রাউজার এর ক্যাশ পরিষ্কার করুন এবং একটু পর আবার চেষ্টা করুন। "
\ ঘটে থাকে। ব্রাউজার এর ক্যাশ পরিষ্কার করুন এবং একটু পর আবার চেষ্টা করুন।."
serverIsDead: "এই সার্ভার বর্তমানে সাড়া দিচ্ছে না। একটু পরে আবার চেষ্টা করুন।"
youShouldUpgradeClient: "এই পেজ দেখার জন্য আপনার ব্রাউজার রিফ্রেশ করে ক্লায়েন্ট আপডেট\
\ করুন। "
\ করুন।."
enterListName: "লিস্টের নাম লিখুন"
privacy: "গোপনীয়তা"
makeFollowManuallyApprove: "অনুসরণ করার অনুরোধগুলি গৃহীত হওয়ার জন্য আপনার অনুমতি লাগবে"
@ -447,7 +447,7 @@ objectStorageBaseUrl: "Base URL"
objectStorageBaseUrlDesc: "রেফারেন্স হিসাবে ব্যবহৃত URL। আপনি একটি CDN বা প্রক্সি\
\ ব্যবহার করলে URL, S3: 'https://<bucket>.s3.amazonaws.com', GCS: 'https://storage.googleapis.com/<bucket>'।"
objectStorageBucket: "Bucket"
objectStorageBucketDesc: "ব্যবহার করা পরিষেবার bucket এর নাম লিখুন। "
objectStorageBucketDesc: "ব্যবহার করা পরিষেবার bucket এর নাম লিখুন।."
objectStoragePrefix: "Prefix"
objectStoragePrefixDesc: "ফাইলসমূহ এই prefix যুক্ত ফোল্ডারের অধীনে সংরক্ষণ করা হবে।"
objectStorageEndpoint: "এন্ডপয়েন্ট"
@ -495,7 +495,7 @@ deleteAllFilesConfirm: "সকল ফাইল ডিলিট করতে চ
removeAllFollowing: "সকল অনুসরণ বাতিল করুন"
removeAllFollowingDescription: "{host} এর সকল ব্যাবহারকারীকে আর ফলোও করবেন না । যদি\
\ ইন্সত্যান্সটির কোন সমস্যা (যেমনঃ ইন্সত্যান্সটি আর নেই) হয়ে থাকে তবে এটি ব্যাবহার\
\ করুন । "
\ করুন ।."
userSuspended: "এই ব্যাবহারকারির অ্যাকাউন্ট স্থগিত করা হয়েছে"
userSilenced: "এই ব্যাবহারকারিকে মিউট করা হয়েছে"
yourAccountSuspendedTitle: "এই অ্যাকাউন্টটি স্থগিত করা হয়েছে"
@ -625,7 +625,7 @@ driveFilesCount: "ড্রাইভে ফাইল এর সংখ্যা"
driveUsage: "ড্রাইভ এর ব্যাবহার"
noCrawle: "ক্রলার ইন্ডেক্সিং বন্ধ করুন"
noCrawleDescription: "সার্চ ইঞ্জিনগুলিকে আপনার প্রোফাইল, নোট, পেজ ইত্যাদি ইনডেক্স\
\ করতে নিষেধ করুন। "
\ করতে নিষেধ করুন।."
lockedAccountInfo: "এমনকি আপনি আপনার অনুসরণকারীদের বেছে বেছে অনুমোদন করলেও, যে কেউ\
\ আপনার নোটগুলি দেখতে পাবে, যতক্ষণ না আপনি আপনার নোটগুলিকে \"অনুসারীদের জন্য\" হিসাবে\
\ সেট না করেন৷"
@ -786,7 +786,7 @@ _emailUnavailable:
used: "এই ইমেইল ঠিকানাটি ইতোমধ্যে ব্যবহৃত হয়েছে"
format: "এই ইমেল ঠিকানাটি সঠিকভাবে লিখা হয়নি"
disposable: "অস্থায়ী ইমেইল ঠিকানা ব্যাবহার করা যাবে না"
mx: "ইমেইল সার্ভারটি ঠিক না"
mx: "ইমেইল সার্ভারটি ঠিক না"
smtp: "ইমেইল সার্ভারটি সাড়া দিচ্ছে না"
_ffVisibility:
public: "প্রকাশ"
@ -858,8 +858,7 @@ _mfm:
center: "সেন্টার"
centerDescription: "লেখা মাঝ বরাবর দেখানো হবে"
inlineCode: "কোড (ইনলাইন)"
inlineCodeDescription: " প্রোগ্রামের কোডের জন্য ইনলাইন সিনট্যাক্স হাইলাইটিং করা\
\ হবে"
inlineCodeDescription: "প্রোগ্রামের কোডের জন্য ইনলাইন সিনট্যাক্স হাইলাইটিং করা হবে."
blockCode: "কোড (ব্লক)"
blockCodeDescription: "মাল্টি-লাইন প্রোগ্রামের কোডের জন্য সিনট্যাক্স হাইলাইট করে।"
inlineMath: "গাণিতিক সূত্র (ইনলাইন)"

View file

@ -14,7 +14,7 @@ fetchingAsApObject: "Cercant en el Fediverse..."
ok: "OK"
gotIt: "Ho he entès!"
cancel: "Cancel·lar"
renotedBy: "Resignat per {usuari}"
renotedBy: "Resignat per {user}"
noNotes: "Cap nota"
noNotifications: "Cap notificació"
instance: "Instàncies"

View file

@ -337,9 +337,9 @@ pinnedUsers: "Angeheftete Benutzer"
pinnedUsersDescription: "Gib durch Leerzeichen getrennte Benutzer an, die an die \"\
Erkunden\"-Seite angeheftet werden sollen."
hcaptchaSiteKey: "Site key"
hcaptchaSecretKey: "Secret key"
recaptchaSiteKey: "Site key"
recaptchaSecretKey: "Secret key"
hcaptchaSecretKey: "Geheimer Schlüssel"
recaptchaSiteKey: "Site-Schlüssel"
recaptchaSecretKey: "Geheimer Schlüssel"
antennas: "Antennen"
manageAntennas: "Antennen verwalten"
name: "Name"
@ -969,9 +969,9 @@ _wordMute:
\ trennen."
muteWordsDescription2: "Umgib Schlüsselworter mit Schrägstrichen, um Reguläre Ausdrücke\
\ zu verwenden."
softDescription: "Notizen, die die angegebenen Konditionen erfüllen, in der Chronik\
softDescription: "Notizen, welche die angegebenen Konditionen erfüllen, in der Chronik\
\ ausblenden."
hardDescription: "Verhindern, dass Notizen, die die angegebenen Konditionen erfüllen,\
hardDescription: "Verhindern, dass Notizen, welche die angegebenen Konditionen erfüllen,\
\ der Chronik hinzugefügt werden. Zudem werden diese Notizen auch nicht der Chronik\
\ hinzugefügt, falls die Konditionen geändert werden."
soft: "Leicht"
@ -1278,7 +1278,7 @@ _pages:
hideTitleWhenPinned: "Seitentitel wenn angeheftet ausblenden"
font: "Schriftart"
fontSerif: "Serif"
fontSansSerif: "Sans Serif"
fontSansSerif: "serifenlos"
eyeCatchingImageSet: "Vorschaubild festlegen"
eyeCatchingImageRemove: "Vorschaubild entfernen"
_relayStatus:
@ -1355,7 +1355,7 @@ confirmToUnclipAlreadyClippedNote: "Diese Notiz ist bereits im \"{name}\" Clip e
noEmailServerWarning: "Es ist kein Email-Server konfiguriert."
thereIsUnresolvedAbuseReportWarning: "Es liegen ungelöste Meldungen vor."
recommended: "Empfehlung"
check: "Check"
check: "Überprüfen"
maxCustomEmojiPicker: Maximale Anzahl vorgeschlagener benutzerdefinierter Emoji
maxUnicodeEmojiPicker: Maximale Anzahl vorgeschlagener Unicode-Emoji
documentation: Dokumentation

View file

@ -71,8 +71,8 @@ importRequested: "Vous avez initié un import. Cela pourrait prendre un peu de t
lists: "Listes"
note: "Notes"
notes: "Notes"
following: "Abonnements"
followers: "Abonné·e·s"
following: "Suivis"
followers: "Vous suivent"
followsYou: "Vous suit"
createList: "Créer une liste"
manageLists: "Gérer les listes"
@ -88,15 +88,15 @@ youShouldUpgradeClient: "Si la page ne s'affiche pas correctement, rechargez-la
\ mettre votre client à jour."
enterListName: "Nom de la liste"
privacy: "Confidentialité"
makeFollowManuallyApprove: "Accepter manuellement les demandes dabonnement"
makeFollowManuallyApprove: "Accepter manuellement les demandes de suivi"
defaultNoteVisibility: "Visibilité des notes par défaut"
follow: "Sabonner"
followRequest: "Demande dabonnement"
followRequests: "Demandes dabonnement"
unfollow: "Se désabonner"
followRequestPending: "Demande d'abonnement en attente de confirmation"
follow: "Suivre"
followRequest: "Demande de suivi"
followRequests: "Demandes de suivi"
unfollow: "Ne plus suivre"
followRequestPending: "Demande de suivi en attente de confirmation"
renote: "Renoter"
unrenote: "Annuler la Renote"
unrenote: "Retirer la renote"
quote: "Citer"
pinnedNote: "Note épinglée"
you: "Vous"
@ -1056,33 +1056,34 @@ _2fa:
step2Url: 'Vous pouvez aussi entrer cette URL si vous utilisez un client lourd sur
ordinateur :'
_permissions:
"read:account": "Afficher les informations du compte"
"read:account": "Lire les informations du compte"
"write:account": "Mettre à jour les informations du compte"
"read:blocks": "Voir les comptes bloqués"
"read:blocks": "Lire les utilisateurs bloqués"
"write:blocks": "Bloquer et Débloquer des comptes"
"read:drive": "Parcourir le Drive"
"write:drive": "Écrire sur le Drive"
"read:favorites": "Afficher les favoris"
"write:favorites": "Gérer les favoris"
"read:following": "Voir les informations de vos abonnements"
"read:drive": "Lister les fichiers et dossiers du drive"
"write:drive": "Créer, changer et supprimer des fichiers du drive"
"read:favorites": "Lister les notes favorites"
"write:favorites": "Gérer les notes favorites"
"read:following": "Lister les comptes suivis et les comptes qui vous suivent"
"write:following": "Abonner et désabonner autres comptes"
"read:messaging": "Voir vos discussions"
"write:messaging": "Gérer les discussions"
"read:mutes": "Voir les comptes masqués"
"write:mutes": "Gérer les comptes masqués"
"write:notes": "Créer / supprimer des notes"
"read:notifications": "Afficher les notifications"
"write:notifications": "Gérer vos notifications"
"write:reactions": "Gérer vos réactions"
"write:votes": "Voter"
"read:pages": "Voir vos pages"
"read:messaging": "Voir vos discussions et leur historique"
"write:messaging": "Créer et supprimer les messages des discussions"
"read:mutes": "Lister les comptes desquels vous masquez les notes ou les renotes"
"write:mutes": "Masquer et démasquer les notes ou les renotes des comptes"
"write:notes": "Gérer les notes"
"read:notifications": "Lire vos notifications"
"write:notifications": "Gérer vos notifications et en créer"
"write:reactions": "Gérer les réactions"
"write:votes": "Voter dans les sondages"
"read:pages": "Lister et lire les pages"
"write:pages": "Gérer les pages"
"read:page-likes": "Voir les mentions « J'aime » des pages"
"write:page-likes": "Gérer les mentions « J'aime » sur les pages"
"read:user-groups": "Voir les groupes d'utilisateur·rice·s"
"write:user-groups": "Éditer les groupes des utilisateur·rice·s"
"read:channels": "Lire les canaux"
"read:channels": "Lister et lire les canaux suivis et rejoints"
"write:channels": "Gérer les canaux"
"read:reactions": Lister les réactions
_auth:
shareAccess: "Autoriser \"{name}\" à accéder à votre compte ?"
shareAccessAsk: "Voulez-vous vraiment autoriser cette application à accéder à votre\
@ -1385,3 +1386,15 @@ useDrawerReactionPickerForMobile: Sur mobile afficher un tiroir pour le panneau
réaction
appAuthorization: Authorisation de l'application
noPermissionsRequested: (Aucune permission demandée.)
oauthErrorGoBack: Une erreur est survenue pendant l'authentification d'une application
tierce. Veuillez réessayer.
botFollowRequiresApproval: Accepter manuellement les demandes de suivi des comptes
marqués « robots »
unrenoteAllConfirm: Étes-vous certain·e de vouloir retirer toutes les renotes de cette
note ?
unrenoteAll: Retirer toutes les renotes
deleteAllFiles: Supprimer tous les fichiers
cannotAttachFileWhenAccountSwitched: Vous ne pouvez pas joindre un fichier à partir
d'un autre compte.
cannotSwitchAccountWhenFileAttached: Vous ne pouvez pas changer de compte tant qu'il
y a des pièces jointes.

View file

@ -1225,7 +1225,7 @@ _pages:
editPage: "Sunting halaman"
readPage: "Lihat sumber kode aktif"
created: "Halaman berhasil dibuat"
updated: "Halaman berhasil diperbaharui!"
updated: "Halaman berhasil diperbaharui"
deleted: "Halaman telah dihapus"
pageSetting: "Pengaturan Halaman"
nameAlreadyExists: "URL Halaman yang ditentukan sudah ada"

View file

@ -190,7 +190,7 @@ blockedUsers: "Account bloccati"
noUsers: "Nessun utente trovato"
editProfile: "Modifica profilo"
noteDeleteConfirm: "Eliminare questo Nota?"
pinLimitExceeded: "Non puoi fissare altre note "
pinLimitExceeded: "Non puoi fissare altre note."
intro: "L'installazione di FoundKey è finita! Si prega di creare un account amministratore."
done: "Fine"
processing: "In elaborazione"
@ -898,7 +898,7 @@ _ago:
secondsAgo: "{n}s fa"
minutesAgo: "{n}min fa"
hoursAgo: "{n}h fa"
daysAgo: "{1} giorni fa"
daysAgo: "{n} giorni fa"
weeksAgo: "{n} settimane fa"
monthsAgo: "{n} mesi fa"
yearsAgo: "{n} anni fa"
@ -1119,8 +1119,8 @@ _pages:
newPage: "Crea pagina"
editPage: "Modifica pagina"
readPage: "Visualizzando fonte"
created: "Pagina creata!"
updated: "Pagina aggiornata con successo!"
created: "Pagina creata"
updated: "Pagina aggiornata con successo"
deleted: "Pagina eliminata"
pageSetting: "Impostazioni pagina"
nameAlreadyExists: "Esiste già una pagina con lo stesso URL."

View file

@ -74,10 +74,6 @@ somethingHappened: "なんかアカンことが起こったで"
retry: "もっぺんやる?"
pageLoadError: "ページの読み込みに失敗してしもうたで…"
pageLoadErrorDescription: "これは普通、ネットワークかブラウザキャッシュが原因やからね。キャッシュをクリアするか、もうちっとだけ待ってくれへんか?"
serverIsDead: "The server is not responding. Please wait for a while before trying\
\ again."
youShouldUpgradeClient: "To display this page, please reload and use a new version\
\ client. "
enterListName: "リスト名を入れてや"
privacy: "プライバシー"
makeFollowManuallyApprove: "自分が認めた人だけがこのアカウントをフォローできるようにする"
@ -126,9 +122,6 @@ flagAsBot: "Botやで"
flagAsBotDescription: "もしこのアカウントがプログラムによって運用されるんやったら、このフラグをオンにしてたのむで。オンにすると、反応の連鎖を防ぐためのフラグとして他の開発者に役立ったり、FoundKeyのシステム上での扱いがBotに合ったもんになるんやで。"
flagAsCat: "Catやで"
flagAsCatDescription: "ワレ、猫ちゃんならこのフラグをつけてみ?"
flagShowTimelineReplies: "It will display the reply to the note in the timeline. "
flagShowTimelineRepliesDescription: "It will display the reply to notes other than\
\ the user notes in the timeline when you turn it on. "
autoAcceptFollowed: "フォローしとるユーザーからのフォローリクエストを勝手に許可しとく"
addAccount: "アカウントを追加"
loginFailed: "ログインに失敗してしもうた…"
@ -209,9 +202,6 @@ resetAreYouSure: "リセットしてええん?"
saved: "保存したで!"
messaging: "チャット"
upload: "アップロード"
keepOriginalUploading: "Retain the original image. "
keepOriginalUploadingDescription: "When uploading the clip, the original version will\
\ be retained. Turning it of then uploading will produce images for public use. "
fromDrive: "ドライブから"
fromUrl: "URLから"
uploadFromUrl: "URLアップロード"
@ -380,7 +370,7 @@ onlyOneFileCanBeAttached: "すまん、メッセージに添付できるファ
signinRequired: "ログインしてくれへん?"
invitationCode: "招待コード"
checking: "確認しとるで"
available: "利用できる\n"
available: "利用できる"
unavailable: "利用できん"
usernameInvalidFormat: "a~z、A~Z、0~9、_が使えるで"
tooShort: "短すぎやろ!"
@ -694,7 +684,7 @@ _widgets:
aiscript: "AiScriptコンソール"
_cw:
hide: "隠す"
show: "続き見して"
show: "続き見して"
chars: "{count}文字"
files: "{count}ファイル"
_poll:

View file

@ -10,7 +10,7 @@ notifications: "Meldingen"
username: "Gebruikersnaam"
password: "Wachtwoord"
forgotPassword: "Wachtwoord vergeten"
fetchingAsApObject: "Ophalen vanuit de Fediverse"
fetchingAsApObject: "Ophalen vanuit de Fediverse..."
ok: "Ok"
gotIt: "Begrepen"
cancel: "Annuleren"

View file

@ -1,10 +1,9 @@
_lang_: "język polski"
_lang_: "Polski"
headlineMisskey: "Sieć połączona wpisami"
introMisskey: "FoundKey jest serwisem mikroblogowym typu open source.\nFoundKey to\
\ opensource'owy serwis mikroblogowy, w którym możesz tworzyć \"notatki\", aby dzielić\
\ się tym, co się dzieje i opowiadać wszystkim o sobie.\nMożesz również użyć funkcji\
\ \"Reakcje\", aby szybko dodać własne reakcje do notatek innych użytkowników\U0001F44D\
.\nOdkrywaj nowy świat\U0001F680!"
introMisskey: "Witaj! FoundKey jest otwartoźródłowym serwisem mikroblogowym.\nTwórz\
\ \"wpisy\", aby dzielić się tym, co się dzieje i opowiadać wszystkim o sobie. \U0001F4E1\
\nMożesz również użyć \"reakcji\", aby szybko wyrazić swoje uczucia dotyczące wpisów\
\ innych użytkowników. \U0001F44D\nOdkrywaj nowy świat! \U0001F680"
monthAndDay: "{month}-{day}"
search: "Szukaj"
notifications: "Powiadomienia"
@ -15,7 +14,7 @@ fetchingAsApObject: "Pobieranie z Fediwersum…"
ok: "OK"
gotIt: "Rozumiem!"
cancel: "Anuluj"
renotedBy: "Udostępniono przez {user}"
renotedBy: "Podbito przez {user}"
noNotes: "Brak wpisów"
noNotifications: "Brak powiadomień"
instance: "Instancja"
@ -43,7 +42,7 @@ copyLink: "Skopiuj odnośnik"
delete: "Usuń"
deleteAndEdit: "Usuń i edytuj"
deleteAndEditConfirm: "Czy na pewno chcesz usunąć ten wpis i zedytować go? Utracisz\
\ wszystkie reakcje, udostępnienia i odpowiedzi do tego wpisu."
\ wszystkie reakcje, podbicia i odpowiedzi do tego wpisu."
addToList: "Dodaj do listy"
sendMessage: "Wyślij wiadomość"
copyUsername: "Kopiuj nazwę użytkownika"
@ -92,8 +91,8 @@ followRequest: "Poproś o możliwość obserwacji"
followRequests: "Prośby o możliwość obserwacji"
unfollow: "Przestań obserwować"
followRequestPending: "Oczekująca prośba o możliwość obserwacji"
renote: "Udostępnij"
unrenote: "Cofnij udostępnienie"
renote: "Podbij"
unrenote: "Cofnij podbicie"
quote: "Cytuj"
pinnedNote: "Przypięty wpis"
you: "Ty"
@ -128,7 +127,7 @@ emojis: "Emoji"
addEmoji: "Dodaj emoji"
cacheRemoteFiles: "Przechowuj zdalne pliki w pamięci podręcznej"
cacheRemoteFilesDescription: "Gdy ta opcja jest wyłączona, zdalne pliki są ładowane\
\ bezpośrednio ze zdalnych instancji. Wyłączenie the opcji zmniejszy użycie powierzchni\
\ bezpośrednio ze zdalnych instancji. Wyłączenie tej opcji zmniejszy użycie powierzchni\
\ dyskowej, ale zwiększy transfer, ponieważ miniaturki nie będą generowane."
flagAsBot: "To konto jest botem"
flagAsBotDescription: "Jeżeli ten kanał jest kontrolowany przez jakiś program, ustaw\
@ -579,9 +578,9 @@ manageAccessTokens: "Zarządzaj tokenami dostępu"
accountInfo: "Informacje o koncie"
notesCount: "Liczba wpisów"
repliesCount: "Liczba wysłanych odpowiedzi"
renotesCount: "Liczba wysłanych udostępnień"
renotesCount: "Liczba wysłanych podbić"
repliedCount: "Liczba otrzymanych odpowiedzi"
renotedCount: "Liczba otrzymanych udostępnień"
renotedCount: "Liczba otrzymanych podbić"
followingCount: "Liczba obserwowanych kont"
followersCount: "Liczba obserwujących"
sentReactionsCount: "Liczba wysłanych reakcji"
@ -966,8 +965,8 @@ _pages:
newPage: "Utwórz stronę"
editPage: "Edytuj tę stronę"
readPage: "Aktywowano widok źródła"
created: "Pomyślnie utworzono stronę!"
updated: "Pomyślnie zaktualizowano stronę!"
created: "Pomyślnie utworzono stronę"
updated: "Pomyślnie zaktualizowano stronę"
deleted: "Strona została usunięta"
pageSetting: "Ustawienia strony"
nameAlreadyExists: "Określony adres URL strony już istnieje"
@ -1046,3 +1045,12 @@ _deck:
mentions: "Wspomnienia"
direct: "Bezpośredni"
_services: {}
exportAll: Eksportuj wszystko
exportSelected: Eksportuj wybrane
showLess: Pokaż mniej
botFollowRequiresApproval: Prośby o możliwość obserwacji z kont oznaczonych jako boty
wymagają zatwierdzenia
unrenoteAllConfirm: Czy na pewno chcesz cofnąć wszystkie podbicia tego wpisu?
renoteMute: Ukryj podbicia
renoteUnmute: Pokaż podbicia
unrenoteAll: Cofnij wszystkie podbicia

View file

@ -995,7 +995,7 @@ _tutorial:
step5_3: "Чтобы подписаться на кого-нибудь, щёлкните по его аватару и в открывшемся\
\ профиле нажмите кнопку «Подписаться»."
step5_4: "Некоторые пользователи (около их имени «висит замок») вручную подтверждают\
\ чужие подписки. Так что иногда подписка начинает работать не сразу.\n"
\ чужие подписки. Так что иногда подписка начинает работать не сразу."
step6_1: "Если теперь в ленте видны и чужие заметки, значит у вас получилось."
step6_2: "Здесь можно непринуждённо выразить свои чувства к чьей-то заметке, отметив\
\ «реакцию» под ней."
@ -1148,7 +1148,7 @@ _profile:
changeAvatar: "Поменять аватар"
changeBanner: "Поменять изображение в шапке"
_exportOrImport:
allNotes: "Все записи\n"
allNotes: "Все записи"
followingList: "Подписки"
muteList: "Скрытые"
blockingList: "Заблокированные"

View file

@ -1243,7 +1243,7 @@ _notification:
groupInvited: "Pozvánky do skupín"
app: "Oznámenia z prepojených aplikácií"
_actions:
followBack: "Sledovať späť\n"
followBack: "Sledovať späť"
reply: "Odpovedať"
renote: "Preposlať"
_deck:

View file

@ -57,7 +57,7 @@ import: "匯入"
export: "匯出"
files: "檔案"
download: "下載"
driveFileDeleteConfirm: "確定要刪除檔案「{name}」嗎?使用此附件的貼文也會跟著消失。\n"
driveFileDeleteConfirm: "確定要刪除檔案「{name}」嗎?使用此附件的貼文也會跟著消失。"
unfollowConfirm: "確定要取消追隨{name}嗎?"
exportRequested: "已請求匯出。這可能會花一點時間。結束後檔案將會被放到雲端裡。"
importRequested: "已請求匯入。這可能會花一點時間"

View file

@ -54,5 +54,5 @@
"start-server-and-test": "1.14.0",
"typescript": "^4.9.4"
},
"packageManager": "yarn@3.3.0"
"packageManager": "yarn@3.4.1"
}

View file

@ -0,0 +1,53 @@
export class noteVisibilityFunction1662132062000 {
name = 'noteVisibilityFunction1662132062000';
async up(queryRunner) {
await queryRunner.query(`
CREATE OR REPLACE FUNCTION note_visible(note_id varchar, user_id varchar) RETURNS BOOLEAN
LANGUAGE SQL
STABLE
CALLED ON NULL INPUT
AS $$
SELECT CASE
WHEN note_id IS NULL THEN TRUE
WHEN NOT EXISTS (SELECT 1 FROM note WHERE id = note_id) THEN FALSE
WHEN user_id IS NULL THEN (
-- simplified check without logged in user
SELECT
visibility IN ('public', 'home')
-- check reply / renote recursively
AND note_visible("replyId", NULL)
AND note_visible("renoteId", NULL)
FROM note WHERE note.id = note_id
) ELSE (
SELECT
(
visibility IN ('public', 'home')
OR
user_id = "userId"
OR
user_id = ANY("visibleUserIds")
OR
user_id = ANY("mentions")
OR (
visibility = 'followers'
AND
EXISTS (
SELECT 1 FROM following WHERE "followeeId" = "userId" AND "followerId" = user_id
)
)
)
-- check reply / renote recursively
AND note_visible("replyId", user_id)
AND note_visible("renoteId", user_id)
FROM note WHERE note.id = note_id
)
END;
$$;
`);
}
async down(queryRunner) {
await queryRunner.query('DROP FUNCTION note_visible');
}
}

View file

@ -22,6 +22,7 @@ import { packedNoteReactionSchema } from '@/models/schema/note-reaction.js';
import { packedHashtagSchema } from '@/models/schema/hashtag.js';
import { packedPageSchema } from '@/models/schema/page.js';
import { packedUserGroupSchema } from '@/models/schema/user-group.js';
import { packedUserGroupInvitationSchema } from '@/models/schema/user-group-invitation.js';
import { packedNoteFavoriteSchema } from '@/models/schema/note-favorite.js';
import { packedChannelSchema } from '@/models/schema/channel.js';
import { packedAntennaSchema } from '@/models/schema/antenna.js';
@ -41,6 +42,7 @@ export const refs = {
UserList: packedUserListSchema,
UserGroup: packedUserGroupSchema,
UserGroupInvitation: packedUserGroupInvitationSchema,
App: packedAppSchema,
MessagingMessage: packedMessagingMessageSchema,
Note: packedNoteSchema,

View file

@ -78,7 +78,7 @@ export class DriveFile {
default: {},
comment: 'The any properties of the DriveFile. For example, it includes image width/height.',
})
public properties: { width?: number; height?: number; orientation?: number; avgColor?: string };
public properties: { width?: number; height?: number; orientation?: number; };
@Column('boolean')
public storedInternal: boolean;

View file

@ -11,6 +11,7 @@ import { NoteReaction } from '@/models/entities/note-reaction.js';
import { User } from '@/models/entities/user.js';
import { awaitAll } from '@/prelude/await-all.js';
import { Users, PollVotes, DriveFiles, NoteReactions, Followings, Polls, Channels } from '../index.js';
import { apiLogger } from '@/server/api/logger.js';
async function populatePoll(note: Note, meId: User['id'] | null) {
const poll = await Polls.findOneByOrFail({ noteId: note.id });
@ -77,7 +78,7 @@ async function populateMyReaction(note: Note, meId: User['id'], _hint_?: {
export const NoteRepository = db.getRepository(Note).extend({
async isVisibleForMe(note: Note, meId: User['id'] | null): Promise<boolean> {
// This code must always be synchronized with the checks in generateVisibilityQuery.
// This code must always be synchronized with the `note_visible` SQL function.
// visibility が specified かつ自分が指定されていなかったら非表示
if (note.visibility === 'specified') {
if (meId == null) {
@ -270,6 +271,13 @@ export const NoteRepository = db.getRepository(Note).extend({
})));
// filter out rejected promises, only keep fulfilled values
return promises.flatMap(result => result.status === 'fulfilled' ? [result.value] : []);
return promises.flatMap((result, i) => {
if (result.status === 'fulfilled') {
return [result.value];
} else {
apiLogger.error(`dropping note due to violating visibility restrictions, note ${notes[i].id} user ${meId}`);
return [];
}
});
},
});

View file

@ -60,11 +60,6 @@ export const packedDriveFileSchema = {
optional: true, nullable: false,
example: 8,
},
avgColor: {
type: 'string',
optional: true, nullable: false,
example: 'rgb(40,65,87)',
},
},
},
url: {

View file

@ -163,16 +163,20 @@ export const packedNoteSchema = {
optional: false, nullable: false,
},
uri: {
description: 'ActivityPub `id` of this Note',
type: 'string',
optional: true, nullable: false,
},
url: {
description: 'URL to a presentation form intended for humans, if available',
type: 'string',
optional: true, nullable: false,
},
myReaction: {
type: 'object',
description: 'Textual representation of the authenticated users reaction, if they reacted.',
example: ':blobfox@.:',
type: 'string',
optional: true, nullable: true,
},
},

View file

@ -48,6 +48,7 @@ export const packedNotificationSchema = {
},
invitation: {
type: 'object',
ref: 'UserGroupInvitation',
optional: true, nullable: true,
},
body: {

View file

@ -0,0 +1,16 @@
export const packedUserGroupInvitationSchema = {
type: 'object',
properties: {
id: {
type: 'string',
optional: false, nullable: false,
format: 'id',
example: 'xxxxxxxxxx',
},
group: {
type: 'object',
optional: false, nullable: false,
ref: 'UserGroup',
},
},
} as const;

View file

@ -87,11 +87,13 @@ export const packedUserDetailedNotMeOnlySchema = {
type: 'object',
properties: {
url: {
description: 'URL to a presentation form intended for humans, if available',
type: 'string',
format: 'url',
nullable: true, optional: false,
},
uri: {
description: 'ActivityPub `id` of this User',
type: 'string',
format: 'uri',
nullable: true, optional: false,
@ -403,6 +405,24 @@ export const packedMeDetailedOnlySchema = {
items: {
type: 'object',
nullable: false, optional: false,
properties: {
id: {
type: 'string',
optional: false,
nullable: false,
},
name: {
type: 'string',
optional: false,
nullable: false,
},
lastUsed: {
type: 'string',
optional: false,
nullable: false,
example: '1970-01-01T00:00:00Z',
},
},
},
},
//#endregion

View file

@ -185,21 +185,23 @@ export async function createNote(value: string | IObject, resolver: Resolver, si
};
const uris = unique([quoteUrl, note._misskey_quote, note.quoteUri].filter((x): x is string => typeof x === 'string'));
let temperror = false;
// check the urls sequentially and abort early to not do unnecessary HTTP requests
// picks the first one that works
for (const uri in uris) {
for (const uri of uris) {
const res = await tryResolveNote(uri);
if (res.status === 'ok') {
quote = res.res;
break;
} else if (res.status === 'temperror') {
temperror = true;
}
}
if (!quote) {
if (results.some(x => x.status === 'temperror')) {
if (!quote && temperror) {
// could not resolve quote, try again later
throw new Error('quote resolve failed');
}
}
}
const cw = note.summary === '' ? null : note.summary;

View file

@ -1,42 +1,17 @@
import { Brackets, SelectQueryBuilder } from 'typeorm';
import { SelectQueryBuilder } from 'typeorm';
import { User } from '@/models/entities/user.js';
import { Followings } from '@/models/index.js';
import { Note } from '@/models/entities/note.js';
import { Notes } from '@/models/index.js';
export function generateVisibilityQuery(q: SelectQueryBuilder<any>, me?: { id: User['id'] } | null) {
// This code must always be synchronized with the checks in Notes.isVisibleForMe.
if (me == null) {
q.andWhere(new Brackets(qb => { qb
.where("note.visibility = 'public'")
.orWhere("note.visibility = 'home'");
}));
export function visibilityQuery(q: SelectQueryBuilder<Note>, meId?: User['id'] | null = null): SelectQueryBuilder<Note> {
const superQuery = Notes.createQueryBuilder()
.from(() => q, 'note');
if (meId == null) {
superQuery.where('note_visible(note.id, null);');
} else {
const followingQuery = Followings.createQueryBuilder('following')
.select('following.followeeId')
.where('following.followerId = :meId');
q.andWhere(new Brackets(qb => { qb
// 公開投稿である
.where(new Brackets(qb => { qb
.where("note.visibility = 'public'")
.orWhere("note.visibility = 'home'");
}))
// または 自分自身
.orWhere('note.userId = :meId')
// または 自分宛て
.orWhere(':meId = ANY(note.visibleUserIds)')
.orWhere(':meId = ANY(note.mentions)')
.orWhere(new Brackets(qb => { qb
// または フォロワー宛ての投稿であり、
.where("note.visibility = 'followers'")
.andWhere(new Brackets(qb => { qb
// 自分がフォロワーである
.where(`note.userId IN (${ followingQuery.getQuery() })`)
// または 自分の投稿へのリプライ
.orWhere('note.replyUserId = :meId');
}));
}));
}));
q.setParameters({ meId: me.id });
superQuery.where('note_visible(note.id, :meId)', { meId });
}
return q;
}

View file

@ -2,7 +2,8 @@ import { IdentifiableError } from '@/misc/identifiable-error.js';
import { User } from '@/models/entities/user.js';
import { Note } from '@/models/entities/note.js';
import { Notes, Users } from '@/models/index.js';
import { generateVisibilityQuery } from './generate-visibility-query.js';
import { apiLogger } from '@/server/api/logger.js';
import { visibilityQuery } from './generate-visibility-query.js';
/**
* Get note for API processing, taking into account visibility.
@ -13,11 +14,10 @@ export async function getNote(noteId: Note['id'], me: { id: User['id'] } | null)
id: noteId,
});
generateVisibilityQuery(query, me);
const note = await query.getOne();
const note = await visibilityQuery(query, me).getOne();
if (note == null) {
apiLogger.error(`user ${me.id} tried to view note ${noteId} violating visibility restrictions`);
throw new IdentifiableError('9725d0ce-ba28-4dde-95a7-2cbb2c15de24', 'No such note.');
}

View file

@ -2,14 +2,10 @@ import { Schema } from '@/misc/schema.js';
import { errors } from './error.js';
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_announcements_create from './endpoints/admin/announcements/create.js';
import * as ep___admin_announcements_delete from './endpoints/admin/announcements/delete.js';
import * as ep___admin_announcements_list from './endpoints/admin/announcements/list.js';
import * as ep___admin_announcements_update from './endpoints/admin/announcements/update.js';
import * as ep___admin_deleteAllFilesOfAUser from './endpoints/admin/delete-all-files-of-a-user.js';
import * as ep___admin_drive_cleanRemoteFiles from './endpoints/admin/drive/clean-remote-files.js';
import * as ep___admin_drive_files from './endpoints/admin/drive/files.js';
import * as ep___admin_drive_showFile from './endpoints/admin/drive/show-file.js';
@ -41,17 +37,21 @@ import * as ep___admin_queue_stats from './endpoints/admin/queue/stats.js';
import * as ep___admin_relays_add from './endpoints/admin/relays/add.js';
import * as ep___admin_relays_list from './endpoints/admin/relays/list.js';
import * as ep___admin_relays_remove from './endpoints/admin/relays/remove.js';
import * as ep___admin_resetPassword from './endpoints/admin/reset-password.js';
import * as ep___admin_resolveAbuseUserReport from './endpoints/admin/resolve-abuse-user-report.js';
import * as ep___admin_reports_list from './endpoints/admin/reports/list.js';
import * as ep___admin_reports_resolve from './endpoints/admin/reports/resolve.js';
import * as ep___admin_sendEmail from './endpoints/admin/send-email.js';
import * as ep___admin_serverInfo from './endpoints/admin/server-info.js';
import * as ep___admin_showModerationLogs from './endpoints/admin/show-moderation-logs.js';
import * as ep___admin_showUser from './endpoints/admin/show-user.js';
import * as ep___admin_showUsers from './endpoints/admin/show-users.js';
import * as ep___admin_silenceUser from './endpoints/admin/silence-user.js';
import * as ep___admin_suspendUser from './endpoints/admin/suspend-user.js';
import * as ep___admin_unsilenceUser from './endpoints/admin/unsilence-user.js';
import * as ep___admin_unsuspendUser from './endpoints/admin/unsuspend-user.js';
import * as ep___admin_users from './endpoints/admin/users.js';
import * as ep___admin_users_create from './endpoints/admin/users/create.js';
import * as ep___admin_users_delete from './endpoints/admin/users/delete.js';
import * as ep___admin_users_deleteAllFiles from './endpoints/admin/users/delete-all-files.js';
import * as ep___admin_users_resetPassword from './endpoints/admin/users/reset-password.js';
import * as ep___admin_users_show from './endpoints/admin/users/show.js';
import * as ep___admin_users_silence from './endpoints/admin/users/silence.js';
import * as ep___admin_users_suspend from './endpoints/admin/users/suspend.js';
import * as ep___admin_users_unsilence from './endpoints/admin/users/unsilence.js';
import * as ep___admin_users_unsuspend from './endpoints/admin/users/unsuspend.js';
import * as ep___admin_updateMeta from './endpoints/admin/update-meta.js';
import * as ep___admin_vacuum from './endpoints/admin/vacuum.js';
import * as ep___announcements from './endpoints/announcements.js';
@ -298,14 +298,10 @@ import * as ep___fetchRss from './endpoints/fetch-rss.js';
const eps = [
['admin/meta', ep___admin_meta],
['admin/abuse-user-reports', ep___admin_abuseUserReports],
['admin/accounts/create', ep___admin_accounts_create],
['admin/accounts/delete', ep___admin_accounts_delete],
['admin/announcements/create', ep___admin_announcements_create],
['admin/announcements/delete', ep___admin_announcements_delete],
['admin/announcements/list', ep___admin_announcements_list],
['admin/announcements/update', ep___admin_announcements_update],
['admin/delete-all-files-of-a-user', ep___admin_deleteAllFilesOfAUser],
['admin/drive/clean-remote-files', ep___admin_drive_cleanRemoteFiles],
['admin/drive/files', ep___admin_drive_files],
['admin/drive/show-file', ep___admin_drive_showFile],
@ -337,17 +333,21 @@ const eps = [
['admin/relays/add', ep___admin_relays_add],
['admin/relays/list', ep___admin_relays_list],
['admin/relays/remove', ep___admin_relays_remove],
['admin/reset-password', ep___admin_resetPassword],
['admin/resolve-abuse-user-report', ep___admin_resolveAbuseUserReport],
['admin/reports/list', ep___admin_reports_list],
['admin/reports/resolve', ep___admin_reports_resolve],
['admin/send-email', ep___admin_sendEmail],
['admin/server-info', ep___admin_serverInfo],
['admin/show-moderation-logs', ep___admin_showModerationLogs],
['admin/show-user', ep___admin_showUser],
['admin/show-users', ep___admin_showUsers],
['admin/silence-user', ep___admin_silenceUser],
['admin/suspend-user', ep___admin_suspendUser],
['admin/unsilence-user', ep___admin_unsilenceUser],
['admin/unsuspend-user', ep___admin_unsuspendUser],
['admin/users', ep___admin_users],
['admin/users/create', ep___admin_users_create],
['admin/users/delete', ep___admin_users_delete],
['admin/users/delete-all-files', ep___admin_users_deleteAllFiles],
['admin/users/reset-password', ep___admin_users_resetPassword],
['admin/users/show', ep___admin_users_show],
['admin/users/silence', ep___admin_users_silence],
['admin/users/suspend', ep___admin_users_suspend],
['admin/users/unsilence', ep___admin_users_unsilence],
['admin/users/unsuspend', ep___admin_users_unsuspend],
['admin/update-meta', ep___admin_updateMeta],
['admin/vacuum', ep___admin_vacuum],
['announcements', ep___announcements],

View file

@ -1,6 +1,6 @@
import { Announcements } from '@/models/index.js';
import { genId } from '@/misc/gen-id.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,6 +1,6 @@
import { Announcements } from '@/models/index.js';
import define from '../../../define.js';
import { ApiError } from '../../../error.js';
import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
export const meta = {
tags: ['admin'],

View file

@ -1,7 +1,7 @@
import { Announcements, AnnouncementReads } from '@/models/index.js';
import { Announcement } from '@/models/entities/announcement.js';
import define from '../../../define.js';
import { makePaginationQuery } from '../../../common/make-pagination-query.js';
import define from '@/server/api/define.js';
import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js';
export const meta = {
tags: ['admin'],

View file

@ -1,6 +1,6 @@
import { Announcements } from '@/models/index.js';
import define from '../../../define.js';
import { ApiError } from '../../../error.js';
import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
export const meta = {
tags: ['admin'],

View file

@ -1,5 +1,5 @@
import { createCleanRemoteFilesJob } from '@/queue/index.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,6 +1,6 @@
import { DriveFiles } from '@/models/index.js';
import define from '../../../define.js';
import { makePaginationQuery } from '../../../common/make-pagination-query.js';
import define from '@/server/api/define.js';
import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js';
export const meta = {
tags: ['admin'],

View file

@ -1,6 +1,6 @@
import { DriveFiles } from '@/models/index.js';
import define from '../../../define.js';
import { ApiError } from '../../../error.js';
import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
export const meta = {
tags: ['admin'],
@ -79,11 +79,6 @@ export const meta = {
optional: false, nullable: false,
example: 720,
},
avgColor: {
type: 'string',
optional: true, nullable: false,
example: 'rgb(40,65,87)',
},
},
},
storedInternal: {

View file

@ -1,7 +1,7 @@
import { In } from 'typeorm';
import { Emojis } from '@/models/index.js';
import { db } from '@/db/postgre.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -3,8 +3,8 @@ import { db } from '@/db/postgre.js';
import { Emojis, DriveFiles } from '@/models/index.js';
import { genId } from '@/misc/gen-id.js';
import { insertModerationLog } from '@/services/insert-moderation-log.js';
import define from '../../../define.js';
import { ApiError } from '../../../error.js';
import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
export const meta = {
tags: ['admin'],

View file

@ -4,8 +4,8 @@ import { DriveFile } from '@/models/entities/drive-file.js';
import { uploadFromUrl } from '@/services/drive/upload-from-url.js';
import { publishBroadcastStream } from '@/services/stream.js';
import { db } from '@/db/postgre.js';
import define from '../../../define.js';
import { ApiError } from '../../../error.js';
import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
export const meta = {
tags: ['admin'],

View file

@ -2,7 +2,7 @@ import { In } from 'typeorm';
import { Emojis } from '@/models/index.js';
import { insertModerationLog } from '@/services/insert-moderation-log.js';
import { db } from '@/db/postgre.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,8 +1,8 @@
import { Emojis } from '@/models/index.js';
import { insertModerationLog } from '@/services/insert-moderation-log.js';
import { db } from '@/db/postgre.js';
import define from '../../../define.js';
import { ApiError } from '../../../error.js';
import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
export const meta = {
tags: ['admin'],

View file

@ -1,5 +1,5 @@
import { createImportCustomEmojisJob } from '@/queue/index.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
secure: true,

View file

@ -1,7 +1,7 @@
import { Emojis } from '@/models/index.js';
import { toPuny } from '@/misc/convert-host.js';
import define from '../../../define.js';
import { makePaginationQuery } from '../../../common/make-pagination-query.js';
import define from '@/server/api/define.js';
import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js';
export const meta = {
tags: ['admin'],

View file

@ -1,7 +1,7 @@
import { Emoji } from '@/models/entities/emoji.js';
import { Emojis } from '@/models/index.js';
import define from '../../../define.js';
import { makePaginationQuery } from '../../../common/make-pagination-query.js';
import define from '@/server/api/define.js';
import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js';
export const meta = {
tags: ['admin'],

View file

@ -1,7 +1,7 @@
import { In } from 'typeorm';
import { db } from '@/db/postgre.js';
import { Emojis } from '@/models/index.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,7 +1,7 @@
import { In } from 'typeorm';
import { Emojis } from '@/models/index.js';
import { db } from '@/db/postgre.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,7 +1,7 @@
import { In } from 'typeorm';
import { db } from '@/db/postgre.js';
import { Emojis } from '@/models/index.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,7 +1,7 @@
import { db } from '@/db/postgre.js';
import { Emojis } from '@/models/index.js';
import define from '../../../define.js';
import { ApiError } from '../../../error.js';
import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
export const meta = {
tags: ['admin'],

View file

@ -1,6 +1,6 @@
import { deleteFile } from '@/services/drive/delete-file.js';
import { DriveFiles } from '@/models/index.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -2,7 +2,7 @@ import { Instances } from '@/models/index.js';
import { toPuny } from '@/misc/convert-host.js';
import { ApiError } from '@/server/api/error.js';
import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,6 +1,6 @@
import deleteFollowing from '@/services/following/delete.js';
import { Followings, Users } from '@/models/index.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,7 +1,7 @@
import { Instances } from '@/models/index.js';
import { toPuny } from '@/misc/convert-host.js';
import { ApiError } from '@/server/api/error.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,5 +1,5 @@
import { db } from '@/db/postgre.js';
import define from '../../define.js';
import define from '@/server/api/define.js';
export const meta = {
requireCredential: true,

View file

@ -1,5 +1,5 @@
import { db } from '@/db/postgre.js';
import define from '../../define.js';
import define from '@/server/api/define.js';
export const meta = {
requireCredential: true,

View file

@ -1,7 +1,7 @@
import { RegistrationTickets } from '@/models/index.js';
import { genId } from '@/misc/gen-id.js';
import { secureRndstrCustom } from '@/misc/secure-rndstr.js';
import define from '../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,8 +1,8 @@
import config from '@/config/index.js';
import { fetchMeta } from '@/misc/fetch-meta.js';
import { TranslationService } from '@/models/entities/meta.js';
import { translatorAvailable } from '../../common/translator.js';
import define from '../../define.js';
import { translatorAvailable } from '@/server/api/common/translator.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['meta'],
@ -52,7 +52,7 @@ export const meta = {
},
bannerUrl: {
type: 'string',
optional: false, nullable: false,
optional: false, nullable: true,
},
iconUrl: {
type: 'string',

View file

@ -1,7 +1,7 @@
import { Users } from '@/models/index.js';
import { ApiError } from '@/server/api/error.js';
import { publishInternalEvent } from '@/services/stream.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,7 +1,7 @@
import { Users } from '@/models/index.js';
import { ApiError } from '@/server/api/error.js';
import { publishInternalEvent } from '@/services/stream.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,6 +1,6 @@
import { destroy } from '@/queue/index.js';
import { insertModerationLog } from '@/services/insert-moderation-log.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,6 +1,6 @@
import { URL } from 'node:url';
import { deliverQueue } from '@/queue/queues.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,6 +1,6 @@
import { URL } from 'node:url';
import { inboxQueue } from '@/queue/queues.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,5 +1,5 @@
import { deliverQueue, inboxQueue, dbQueue, objectStorageQueue } from '@/queue/queues.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,7 +1,7 @@
import { URL } from 'node:url';
import { addRelay } from '@/services/relay.js';
import define from '../../../define.js';
import { ApiError } from '../../../error.js';
import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
export const meta = {
tags: ['admin'],

View file

@ -1,5 +1,5 @@
import { listRelay } from '@/services/relay.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,5 +1,5 @@
import { removeRelay } from '@/services/relay.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,6 +1,6 @@
import { AbuseUserReports } from '@/models/index.js';
import { makePaginationQuery } from '../../common/make-pagination-query.js';
import define from '../../define.js';
import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -3,7 +3,7 @@ import { getInstanceActor } from '@/services/instance-actor.js';
import { deliver } from '@/queue/index.js';
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
import { renderFlag } from '@/remote/activitypub/renderer/flag.js';
import define from '../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,5 +1,5 @@
import { sendEmail } from '@/services/send-email.js';
import define from '../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -2,7 +2,7 @@ import * as os from 'node:os';
import si from 'systeminformation';
import { db } from '@/db/postgre.js';
import { redisClient } from '@/db/redis.js';
import define from '../../define.js';
import define from '@/server/api/define.js';
export const meta = {
requireCredential: true,

View file

@ -1,6 +1,6 @@
import { ModerationLogs } from '@/models/index.js';
import { makePaginationQuery } from '../../common/make-pagination-query.js';
import define from '../../define.js';
import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,7 +1,7 @@
import { insertModerationLog } from '@/services/insert-moderation-log.js';
import { fetchMeta, setMeta } from '@/misc/fetch-meta.js';
import { TranslationService } from '@/models/entities/meta.js';
import define from '../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,6 +1,6 @@
import { DAY } from '@/const.js';
import { Users } from '@/models/index.js';
import define from '../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,8 +1,8 @@
import { IsNull } from 'typeorm';
import { Users } from '@/models/index.js';
import { ApiError } from '@/server/api/error.js';
import define from '../../../define.js';
import { signup } from '../../../common/signup.js';
import define from '@/server/api/define.js';
import { signup } from '@/server/api/common/signup.js';
export const meta = {
tags: ['admin'],

View file

@ -1,6 +1,6 @@
import { deleteFile } from '@/services/drive/delete-file.js';
import { DriveFiles } from '@/models/index.js';
import define from '../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,7 +1,7 @@
import { Users } from '@/models/index.js';
import { ApiError } from '@/server/api/error.js';
import { deleteAccount } from '@/services/delete-account.js';
import define from '../../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -2,7 +2,7 @@ import { hashPassword } from '@/misc/password.js';
import { secureRndstr } from '@/misc/secure-rndstr.js';
import { Users, UserProfiles } from '@/models/index.js';
import { ApiError } from '@/server/api/error.js';
import define from '../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,6 +1,6 @@
import { Signins, UserProfiles, Users } from '@/models/index.js';
import { ApiError } from '@/server/api/error.js';
import define from '../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -2,7 +2,7 @@ import { Users } from '@/models/index.js';
import { ApiError } from '@/server/api/error.js';
import { insertModerationLog } from '@/services/insert-moderation-log.js';
import { publishInternalEvent } from '@/services/stream.js';
import define from '../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -5,7 +5,7 @@ import { ApiError } from '@/server/api/error.js';
import { insertModerationLog } from '@/services/insert-moderation-log.js';
import { doPostSuspend } from '@/services/suspend-user.js';
import { publishUserEvent } from '@/services/stream.js';
import define from '../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -2,7 +2,7 @@ import { Users } from '@/models/index.js';
import { ApiError } from '@/server/api/error.js';
import { insertModerationLog } from '@/services/insert-moderation-log.js';
import { publishInternalEvent } from '@/services/stream.js';
import define from '../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -2,7 +2,7 @@ import { Users } from '@/models/index.js';
import { ApiError } from '@/server/api/error.js';
import { insertModerationLog } from '@/services/insert-moderation-log.js';
import { doPostUnsuspend } from '@/services/unsuspend-user.js';
import define from '../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,6 +1,6 @@
import { insertModerationLog } from '@/services/insert-moderation-log.js';
import { db } from '@/db/postgre.js';
import define from '../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['admin'],

View file

@ -1,6 +1,6 @@
import { Announcements, AnnouncementReads } from '@/models/index.js';
import define from '../define.js';
import { makePaginationQuery } from '../common/make-pagination-query.js';
import define from '@/server/api/define.js';
import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js';
export const meta = {
tags: ['meta'],

View file

@ -1,8 +1,8 @@
import { genId } from '@/misc/gen-id.js';
import { Antennas, UserLists, UserGroupJoinings } from '@/models/index.js';
import { publishInternalEvent } from '@/services/stream.js';
import define from '../../define.js';
import { ApiError } from '../../error.js';
import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
export const meta = {
tags: ['antennas'],

View file

@ -1,7 +1,7 @@
import { Antennas } from '@/models/index.js';
import { publishInternalEvent } from '@/services/stream.js';
import define from '../../define.js';
import { ApiError } from '../../error.js';
import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
export const meta = {
tags: ['antennas'],

View file

@ -1,5 +1,5 @@
import { Antennas } from '@/models/index.js';
import define from '../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['antennas', 'account'],

View file

@ -1,11 +1,11 @@
import { readNote } from '@/services/note/read.js';
import { Antennas, Notes, AntennaNotes } from '@/models/index.js';
import { makePaginationQuery } from '../../common/make-pagination-query.js';
import { generateVisibilityQuery } from '../../common/generate-visibility-query.js';
import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js';
import { generateBlockedUserQuery } from '../../common/generate-block-query.js';
import define from '../../define.js';
import { ApiError } from '../../error.js';
import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js';
import { visibilityQuery } from '@/server/api/common/generate-visibility-query.js';
import { generateMutedUserQuery } from '@/server/api/common/generate-muted-user-query.js';
import { generateBlockedUserQuery } from '@/server/api/common/generate-block-query.js';
import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
export const meta = {
tags: ['antennas', 'account', 'notes'],
@ -65,11 +65,10 @@ export default define(meta, paramDef, async (ps, user) => {
.leftJoinAndSelect('renoteUser.banner', 'renoteUserBanner')
.andWhere('antennaNote.antennaId = :antennaId', { antennaId: antenna.id });
generateVisibilityQuery(query, user);
generateMutedUserQuery(query, user);
generateBlockedUserQuery(query, user);
const notes = await query
const notes = await visibilityQuery(query, user)
.take(ps.limit)
.getMany();

View file

@ -1,6 +1,6 @@
import { Antennas } from '@/models/index.js';
import define from '../../define.js';
import { ApiError } from '../../error.js';
import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
export const meta = {
tags: ['antennas', 'account'],

View file

@ -1,7 +1,7 @@
import { Antennas, UserLists, UserGroupJoinings } from '@/models/index.js';
import { publishInternalEvent } from '@/services/stream.js';
import define from '../../define.js';
import { ApiError } from '../../error.js';
import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
export const meta = {
tags: ['antennas'],

View file

@ -1,6 +1,6 @@
import { Resolver } from '@/remote/activitypub/resolver.js';
import { HOUR } from '@/const.js';
import define from '../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['federation'],

View file

@ -10,8 +10,8 @@ import { isActor, isPost } from '@/remote/activitypub/type.js';
import { SchemaType } from '@/misc/schema.js';
import { HOUR } from '@/const.js';
import { shouldBlockInstance } from '@/misc/should-block-instance.js';
import define from '../../define.js';
import { ApiError } from '../../error.js';
import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
export const meta = {
tags: ['federation'],

View file

@ -2,7 +2,7 @@ import { Apps } from '@/models/index.js';
import { genId } from '@/misc/gen-id.js';
import { secureRndstr } from '@/misc/secure-rndstr.js';
import { kinds } from '@/misc/api-permissions.js';
import define from '../../define.js';
import define from '@/server/api/define.js';
export const meta = {
tags: ['app'],

View file

@ -1,6 +1,6 @@
import { Apps } from '@/models/index.js';
import define from '../../define.js';
import { ApiError } from '../../error.js';
import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
export const meta = {
tags: ['app'],

View file

@ -3,8 +3,8 @@ import { AuthSessions, AccessTokens, Apps } from '@/models/index.js';
import { genId } from '@/misc/gen-id.js';
import { secureRndstr } from '@/misc/secure-rndstr.js';
import { kinds } from '@/misc/api-permissions.js';
import define from '../../define.js';
import { ApiError } from '../../error.js';
import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
export const meta = {
tags: ['auth'],

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