Compare commits

...

77 commits

Author SHA1 Message Date
Johann150 6c7f1774e3
server: fix thread mutes not applying to renotes
Changelog: Fixed
2022-12-15 21:20:24 +01:00
Johann150 af43df15ca
reduce duplication in secureRndstr 2022-12-15 20:46:17 +01:00
Johann150 5f83383ab8
fix import error in tests 2022-12-15 20:45:55 +01:00
Johann150 8c759dde6c
server: fix error about duplicate resolve 2022-12-15 19:44:55 +01:00
Johann150 84d83d908a
client: add button to unrenote
Changelog: Added
2022-12-15 17:52:19 +01:00
Johann150 16d091497a
server: use extractDbHost instead of toPuny, translate comments
Also swapped logical or for nullish coalescing operator in some places.
2022-12-15 00:32:15 +01:00
Johann150 ef53ec276a
activitypub: simplify some URI/id related checks
followup on previous commit
2022-12-15 00:31:23 +01:00
Johann150 3582fd8260
activitypub: centrally check id matches URL in resolver
This makes some duplicated checks in models/note and models/person
unnecessary.
2022-12-15 00:29:39 +01:00
Johann150 6256ddbd30
client: remove unused variables 2022-12-14 22:09:29 +01:00
Johann150 00fcc238f7
client: remove broken instance ticker from landing page 2022-12-14 22:08:27 +01:00
Johann150 9f1670d5fd
server: fix default not found error image 2022-12-14 19:05:41 +01:00
Norm ff31b8b06d server: remove bios and cli
The BIOS and CLI functionality were mainly for debugging purposes.
If a user has to use those to resolve an issue with the server, that
really should be fixed at the source instead.

Closes: FoundKeyGang/FoundKey#283
Changelog: Removed
2022-12-14 17:59:25 +00:00
Johann150 e317a771b3
remove vscode config files 2022-12-14 18:52:36 +01:00
Johann150 398ee6435b
client: replace repo link with foundkey link 2022-12-14 18:21:24 +01:00
Johann150 ffff2ae5ef
server: fix missing import
closes FoundKeyGang/FoundKey#286
2022-12-14 18:08:44 +01:00
Johann150 ccc8bf0289
chore: fix more miscellaneous lints 2022-12-13 23:09:32 +01:00
Johann150 a231b36d59
chore: fix lint about unused variables in entities 2022-12-13 23:09:32 +01:00
Johann150 8e9c65fab0
chore: fix some import related lints 2022-12-13 23:09:31 +01:00
Norm 78a3051313
remove unneeded TODO 2022-12-13 16:46:29 -05:00
Norm 78717e85d3
server: change JSON.parse/stringify to structuredClone
structuredClone is more typesafe than using JSON.parse and
JSON.stringify.

Now that Node 18.x is the new baseline, this should be safe to use now.

See https://developer.mozilla.org/en-US/docs/Web/API/structuredClone
for details.
2022-12-13 16:45:38 -05:00
Norm a9d3cae511
server: add return type to extractApMentions 2022-12-13 16:31:15 -05:00
Norm bd27b7ca3a
server: add typing for renderFollowRelay 2022-12-13 16:06:18 -05:00
Norm e28a9eb8e8
use tsc --noEmit for backend and client
See https://github.com/misskey-dev/misskey/pull/9316
2022-12-13 16:02:06 -05:00
Norm e5a4c5d2d0
chore: update @typescript-eslint packages 2022-12-13 15:57:26 -05:00
Norm 6bba55c196
sw: add TypeScript type checking
This implements the upstream changes from
https://github.com/misskey-dev/misskey/pull/9314 but updated to our
version of ESLint.

Also updates TypeScript to 4.9.4 for all packages.
2022-12-13 15:42:08 -05:00
Norm 1d469f3c34
fix import typo 2022-12-13 15:12:29 -05:00
Norm 3f0228e14c
server: use color-convert KEYWORD instead of extracting parameter type 2022-12-13 15:11:29 -05:00
Johann150 73f81177b4
foundkey-js: adjust type definition 2022-12-13 20:54:50 +01:00
Johann150 6a26da3516
client: use configurable images 2022-12-13 20:54:49 +01:00
Johann150 5ea744b1b2
server: use configurable images 2022-12-13 20:54:49 +01:00
Johann150 ae6ba05306
add config for error images
Changelog: Added
2022-12-13 20:54:49 +01:00
Sam Smucny 21069223e3
client: add tooltips to visibility icons
Changelog: Changed
2022-12-13 20:49:17 +01:00
Johann150 d4d1e03479
server: fix errors for replies and state when note doesnt exist 2022-12-13 20:35:46 +01:00
Norm 5513a3eb3a chore: update .gitattributes to reflect removed assets
Since there's no longer any .afdesign/.psd files or the like, it's not necessary to have those in .gitattributes any longer.
2022-12-11 23:16:05 +00:00
Johann150 d5dd7c1ef5
chore: remove more unused assets 2022-12-11 20:52:52 +01:00
Johann150 a80521b6a8
chore: remove unused assets 2022-12-11 20:44:38 +01:00
Norm 030394b30d
refactor: remove default export for boot 2022-12-11 14:42:55 -05:00
Johann150 768d9bbdfb
refactor: remove default export for perform 2022-12-11 18:23:19 +01:00
Johann150 3ef1a4b0f9
refactor: remove default export for Resolver 2022-12-11 18:23:07 +01:00
Johann150 ae59ce51b0
refactor: remove default export for DbResolver 2022-12-11 18:16:48 +01:00
Johann150 14a9b9bedd
refactor: remove default export for request 2022-12-11 18:16:45 +01:00
Johann150 985a13f47f
refactor: remove default export for DeliverManager 2022-12-11 17:56:25 +01:00
Norm 3e46433ede docker: Ignore .woodpecker 2022-12-11 01:35:33 +00:00
Johann150 507b328fdf
activitypub: also forward resolver to resolveNote 2022-12-10 11:23:10 +01:00
Norm cf7449509f docs: add rfc links to oauth documentation 2022-12-10 05:23:22 +00:00
Norm f46ba3f700 Merge pull request 'server: misc services code cleanup' (#275) from refactor/services into main
Reviewed-on: FoundKeyGang/FoundKey#275
2022-12-10 04:10:44 +00:00
Norm 3cf673960b server: Fix typing for user token
Also fix a comment in the User model that wrongly states that the token
is null if the user is local, when it's the opposite.
2022-12-08 23:20:41 -05:00
Norm cbfd866122 server: make fetcher key non-null 2022-12-08 23:19:39 -05:00
Norm b23a8dbaed server: translate comments 2022-12-08 23:18:45 -05:00
Norm 80a73a7510 server: remove unused imports from suspend-user.ts 2022-12-08 23:18:45 -05:00
Norm 3dec9a47f0 server: fix various type errors in services 2022-12-08 23:18:45 -05:00
Norm b8fb7a38cc server: improve Logger typing information and docs 2022-12-08 23:18:45 -05:00
Norm fdc682e810 server: remove sendEmailNotification
The functions have their bodies completely comented out,
which means they are doing nothing.
2022-12-08 23:18:45 -05:00
Johann150 fde751df8f
fix: properly supply resolver (2) 2022-12-08 19:06:55 +01:00
Johann150 1faf1035f9
server: handle users getting deleted somewhere else
I don't know why but several jobs got stuck in my inbox queue because
of errors like 'Could not find any entity of type "User" matching...'.
2022-12-08 18:12:24 +01:00
Johann150 e2ce599aca
fix: properly supply resolver 2022-12-08 18:12:05 +01:00
Johann150 73870e85cd
client: make headlines in queue widget links
The headlines "inbox queue" and "deliver queue" are now links to the
admin panel page about the queue.

Changelog: Changed
2022-12-07 23:23:16 +01:00
Norm 350f21d955
server: fix typing for skippedInstances query 2022-12-07 16:41:34 -05:00
Norm 873e21f090
chore: update eslint 2022-12-07 16:27:53 -05:00
Norm 2afe54c121
eslint: allow backticks to avoid escaping single/double quotes 2022-12-07 16:27:39 -05:00
Johann150 501cf834c8
client: fix issue of search only working once
closes FoundKeyGang/FoundKey#274

Changelog: Fixed
2022-12-07 21:56:27 +01:00
Norm b66f7550ab
server: auto-fix lints 2022-12-07 13:39:21 -05:00
Johann150 18664dbca3
server: add missing paren
How did this not break yet?
2022-12-07 18:29:04 +01:00
Johann150 0f3f42eb39
remove rndstr dependency
This dependency was unused in the client.

The use of it in the server can be replaced entirely by the
secureRndstr function, with some slight modifications.

That function could probably be refactored a bit more as well.
2022-12-07 18:08:09 +01:00
Johann150 71b976ec96
BREAKING: remove integrations
The Discord, Github and Twitter integrations have been removed to reduce
complexity and because they were only used on very few instances.

Server admins that did disable this may want to revoke the OAuth client
registrations for their instance that they made on the respective service.

Changelog: Removed
2022-12-07 17:16:14 +01:00
Andy d3f1ad9a88 chore: remove unused packages 2022-12-06 23:18:27 +01:00
Andy 1aa3898db5 server: remove unused import 2022-12-06 23:12:45 +01:00
Andy 96c3744555 client: remove integration settings menu entry 2022-12-06 23:00:32 +01:00
Andy b023741f50 server: remove integrations field from user 2022-12-06 23:00:08 +01:00
Andy 87e1e658f2 locales: remove integration-related locales 2022-12-06 22:03:34 +01:00
Andy 7e8d5c3b79 foundkey-js: remove integration fields from instance type 2022-12-06 21:52:16 +01:00
Andy c785fbab6e client: remove integration signin options 2022-12-06 21:51:01 +01:00
Andy 547a1f81d4 client: remove integration settings 2022-12-06 21:50:34 +01:00
Andy 95384d0bb2 client: remove integration admin settings 2022-12-06 21:50:20 +01:00
Andy 4cc5b734e7 activitypub: remove integration fields from person and nodeinfo 2022-12-06 21:49:19 +01:00
Andy 5d32872999 server: remove integration API routes 2022-12-06 21:48:31 +01:00
Andy b4b1204f77 server: remove integration-related fields from meta 2022-12-06 21:47:59 +01:00
242 changed files with 783 additions and 2389 deletions

View file

@ -133,3 +133,10 @@ redis:
#allowedPrivateNetworks: [
# '127.0.0.1/32'
#]
# images used on error screens. You can use absolute or relative URLs.
# If you use relative URLs, be aware that the URL may be used on different pages/paths, so the path component should be absolute.
#images:
# info: /twemoji/1f440.svg
# notFound: /twemoji/2049.svg
# error: /twemoji/1f480.svg

View file

@ -1,6 +1,6 @@
.autogen
.vscode
.config
.woodpecker
Dockerfile
build/
built/

View file

@ -2,9 +2,10 @@ root = true
[*]
indent_style = tab
indent_size = 2
indent_size = 4
charset = utf-8
insert_final_newline = true
[*.yml]
indent_style = space
indent_size = 2

6
.gitattributes vendored
View file

@ -1,7 +1 @@
*.svg -diff -text
*.psd -diff -text
*.ai -diff -text
*.mqo -diff -text
*.glb -diff -text
*.blend -diff -text
*.afdesign -diff -text

2
.gitignore vendored
View file

@ -1,6 +1,6 @@
# Visual Studio Code
/.vscode
!/.vscode/extensions.json
/.vsls.json
# Intelij-IDEA
/.idea

View file

@ -1,8 +0,0 @@
{
"recommendations": [
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint",
"Vue.volar",
"Vue.vscode-typescript-vue-plugin"
]
}

View file

@ -1,4 +0,0 @@
{
"$schema": "http://json.schemastore.org/vsls",
"gitignore": "exclude"
}

22
.woodpecker/lint-sw.yml Normal file
View file

@ -0,0 +1,22 @@
clone:
git:
image: woodpeckerci/plugin-git
settings:
depth: 1 # CI does not need commit history
recursive: true
pipeline:
install:
when:
event:
- pull_request
image: node:18.6.0
commands:
- yarn install
lint:
when:
event:
- pull_request
image: node:18.6.0
commands:
- yarn workspace sw run lint

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -1,9 +1,9 @@
# 3rd party access
Foundkey supports:
- OAuth 2.0 Authorization Code grant per RFC 6749.
- OAuth Bearer Token Usage per RFC 6750.
- Proof Key for Code Exchange (PKCE) per RFC 7636.
- OAuth 2.0 Authorization Server Metadata per RFC 8414.
- OAuth 2.0 Authorization Code grant per [RFC 6749](https://www.rfc-editor.org/rfc/rfc6749).
- OAuth Bearer Token Usage per [RFC 6750](https://www.rfc-editor.org/rfc/rfc6750).
- Proof Key for Code Exchange (PKCE) per [RFC 7636](https://www.rfc-editor.org/rfc/rfc7636).
- OAuth 2.0 Authorization Server Metadata per [RFC 8414](https://www.rfc-editor.org/rfc/rfc8414.html).
# Discovery
Because the implementation may change in the future, it is recommended that you use OAuth 2.0 Authorization Server Metadata a.k.a. OpenID Connect Discovery.

View file

@ -36,7 +36,7 @@ gulp.task('copy:client:locales', cb => {
});
gulp.task('build:backend:script', () => {
return gulp.src(['./packages/backend/src/server/web/boot.js', './packages/backend/src/server/web/bios.js', './packages/backend/src/server/web/cli.js'])
return gulp.src(['./packages/backend/src/server/web/boot.js'])
.pipe(replace('LANGS', JSON.stringify(Object.keys(locales))))
.pipe(terser({
toplevel: true
@ -45,7 +45,7 @@ gulp.task('build:backend:script', () => {
});
gulp.task('build:backend:style', () => {
return gulp.src(['./packages/backend/src/server/web/style.css', './packages/backend/src/server/web/bios.css', './packages/backend/src/server/web/cli.css'])
return gulp.src(['./packages/backend/src/server/web/style.css'])
.pipe(cssnano({
zindex: false
}))

View file

@ -293,9 +293,6 @@ dayX: "{day}"
monthX: "{month}"
yearX: "{year}"
pages: "الصفحات"
integration: "التكامل"
connectService: "اتصل"
disconnectService: "اقطع الاتصال"
enableLocalTimeline: "تفعيل الخيط المحلي"
enableGlobalTimeline: "تفعيل الخيط الزمني الشامل"
disablingTimelinesInfo: "سيتمكن المديرون والمشرفون من الوصول إلى كل الخيوط الزمنية\
@ -402,7 +399,6 @@ normalPassword: "الكلمة السرية جيدة"
strongPassword: "الكلمة السرية قوية"
passwordMatched: "التطابق صحيح!"
passwordNotMatched: "غير متطابقتان"
signinWith: "الولوج عبر {x}"
signinFailed: "فشل الولوج، خطأ في اسم المستخدم أو كلمة المرور."
tapSecurityKey: "أنقر مفتاح الأمان"
or: "أو"

View file

@ -308,9 +308,6 @@ dayX: "{day}"
monthX: "{month}"
yearX: "{year}"
pages: "পৃষ্ঠা"
integration: "ইন্টিগ্রেশন"
connectService: "সংযুক্ত করুন"
disconnectService: "সংযোগ বিচ্ছিন্ন করুন"
enableLocalTimeline: "স্থানীয় টাইমলাইন চালু করুন"
enableGlobalTimeline: "গ্লোবাল টাইমলাইন চালু করুন"
disablingTimelinesInfo: "আপনি এই টাইমলাইনগুলি বন্ধ করলেও প্রশাসক এবং মডারেটররা এই\
@ -417,7 +414,6 @@ normalPassword: "সাধারণ পাসওয়ার্ড"
strongPassword: "শক্তিশালী পাসওয়ার্ড"
passwordMatched: "মিলেছে"
passwordNotMatched: "মিলেনি"
signinWith: "{x} এর সাহায্যে সাইন ইন করুন"
signinFailed: "লগ ইন করা যায়নি। আপনার ব্যবহারকারীর নাম এবং পাসওয়ার্ড চেক করুন."
tapSecurityKey: "সিকিউরিটি কী স্পর্শ করুন"
or: "অথবা"

View file

@ -277,9 +277,6 @@ dayX: "{day}"
monthX: "{month}"
yearX: "{year}"
pages: "Stránky"
integration: "Integrace"
connectService: "Připojit"
disconnectService: "Odpojit"
enableLocalTimeline: "Povolit lokální čas"
enableGlobalTimeline: "Povolit globální čas"
enableRegistration: "Povolit registraci novým uživatelům"
@ -353,7 +350,6 @@ normalPassword: "Dobré heslo"
strongPassword: "Silné heslo"
passwordMatched: "Hesla se schodují"
passwordNotMatched: "Hesla se neschodují"
signinWith: "Přihlásit se s {x}"
signinFailed: "Nelze se přihlásit. Zkontrolujte prosím své uživatelské jméno a heslo."
or: "Nebo"
language: "Jazyk"

View file

@ -321,9 +321,6 @@ dayX: "{day}"
monthX: "{month}"
yearX: "{year}"
pages: "Seiten"
integration: "Integration"
connectService: "Verbinden"
disconnectService: "Trennen"
enableLocalTimeline: "Lokale Chronik aktivieren"
enableGlobalTimeline: "Globale Chronik aktivieren"
disablingTimelinesInfo: "Administratoren und Moderatoren haben immer Zugriff auf alle\
@ -433,7 +430,6 @@ normalPassword: "Durchschnittliches Passwort"
strongPassword: "Starkes Passwort"
passwordMatched: "Stimmt überein"
passwordNotMatched: "Stimmt nicht überein"
signinWith: "Mit {x} anmelden"
signinFailed: "Anmeldung fehlgeschlagen. Überprüfe Benutzername und Passswort."
tapSecurityKey: "Tippe deinen Sicherheitsschlüssel an"
or: "Oder"
@ -1373,18 +1369,6 @@ recommended: "Empfehlung"
check: "Check"
maxCustomEmojiPicker: Maximale Anzahl vorgeschlagener benutzerdefinierter Emoji
maxUnicodeEmojiPicker: Maximale Anzahl vorgeschlagener Unicode-Emoji
_services:
_discord:
connected: 'Discord: @{username}#{discriminator} wurde mit Foundkey-Account @{mkUsername}
verknüpft!'
disconnected: Discord-Verknüpfung wurde entfernt.
_twitter:
connected: Twitter-Account @{twitterUserName} wurde mit Foundkey-Account @{userName}
verknüpft!
disconnected: Twitter-Verknüpfung wurde entfernt.
_github:
connected: GitHub-Account @{login} wurde mit Foundkey-Account @{userName} verknüpft!
disconnected: GitHub-Verknüpfung wurde entfernt.
documentation: Dokumentation
signinHistoryExpires: Frühere Login-Versuche werden aus Datenschutzgründen nach 60
Tagen automatisch gelöscht.

View file

@ -96,6 +96,8 @@ unfollow: "Unfollow"
followRequestPending: "Follow request pending"
renote: "Renote"
unrenote: "Take back renote"
unrenoteAll: "Take back all renotes"
unrenoteAllConfirm: "Are you sure that you want to take back all renotes of this note?"
quote: "Quote"
pinnedNote: "Pinned note"
you: "You"
@ -311,9 +313,6 @@ dayX: "{day}"
monthX: "{month}"
yearX: "{year}"
pages: "Pages"
integration: "Integration"
connectService: "Connect"
disconnectService: "Disconnect"
enableLocalTimeline: "Enable local timeline"
enableGlobalTimeline: "Enable global timeline"
disablingTimelinesInfo: "Adminstrators and Moderators will always have access to all\
@ -420,7 +419,6 @@ normalPassword: "Average password"
strongPassword: "Strong password"
passwordMatched: "Matches"
passwordNotMatched: "Does not match"
signinWith: "Sign in with {x}"
signinFailed: "Unable to sign in. The entered username or password is incorrect."
tapSecurityKey: "Tap your security key"
or: "Or"
@ -1344,16 +1342,6 @@ _deck:
list: "List"
mentions: "Mentions"
direct: "Direct notes"
_services:
_discord:
connected: "Discord: @{username}#{discriminator} connected to FoundKey: @{mkUsername}!"
disconnected: "Discord linkage has been removed."
_twitter:
connected: "Twitter: @{twitterUserName} connected to FoundKey: @{userName}!"
disconnected: "Twitter linkage has been removed."
_github:
connected: "GitHub: @{login} connected to FoundKey: @{userName}!"
disconnected: "GitHub linkage has been removed."
_translationService:
_deepl:
authKey: "DeepL Auth Key"

View file

@ -311,9 +311,6 @@ dayX: "Día {day}"
monthX: "Mes {month}"
yearX: "Año {year}"
pages: "Páginas"
integration: "Integración"
connectService: "Conectar"
disconnectService: "Desconectar"
enableLocalTimeline: "Habilitar linea de tiempo local"
enableGlobalTimeline: "Habilitar linea de tiempo global"
disablingTimelinesInfo: "Aunque se desactiven estas lineas de tiempo, por conveniencia\
@ -420,7 +417,6 @@ normalPassword: "Buena contraseña"
strongPassword: "Muy buena contraseña"
passwordMatched: "Correcto"
passwordNotMatched: "Las contraseñas no son las mismas"
signinWith: "Inicie sesión con {x}"
signinFailed: "Autenticación fallida. Asegúrate de haber usado el nombre de usuario\
\ y contraseña correctos."
tapSecurityKey: "Toque la clave de seguridad"

View file

@ -311,9 +311,6 @@ dayX: "{day}"
monthX: "{month}"
yearX: "{year}"
pages: "Pages"
integration: "Intégrations"
connectService: "Connexion"
disconnectService: "Déconnexion"
enableLocalTimeline: "Activer le fil local"
enableGlobalTimeline: "Activer le fil global"
disablingTimelinesInfo: "Même si vous désactivez ces fils, les administrateur·rice·s\
@ -423,7 +420,6 @@ normalPassword: "Mot de passe acceptable"
strongPassword: "Mot de passe fort"
passwordMatched: "Les mots de passe correspondent"
passwordNotMatched: "Les mots de passe ne correspondent pas"
signinWith: "Se connecter avec {x}"
signinFailed: "Échec dauthentification. Veuillez vérifier que votre nom dutilisateur\
\ et mot de passe sont corrects."
tapSecurityKey: "Appuyez sur votre clé de sécurité"
@ -1331,18 +1327,6 @@ _deck:
list: "Listes"
mentions: "Mentions"
direct: "Direct"
_services:
_discord:
connected: '@{username}#{discriminator} sur Discord est connecté à @{mkUsername}
sur FoundKey !'
disconnected: La liaison avec Discord à été supprimée.
_twitter:
connected: '@{twitterUserName} sur Twitter est connecté à @{userName} sur FoundKey
!'
disconnected: La liaison avec Twitter à été supprimée.
_github:
disconnected: La liaison avec Github à été supprimée.
connected: '@{login} sur Github est connecté à @{userName} sur FoundKey !'
exportAll: Tout exporter
stopActivityDeliveryDescription: L'activité locale ne sera pas envoyé à cette instance.
La réception de l'activité continuera de fonctionner comme avant.

View file

@ -310,9 +310,6 @@ dayX: "{day}"
monthX: "{month}"
yearX: "{year}"
pages: "Halaman"
integration: "Integrasi"
connectService: "Sambungkan"
disconnectService: "Putuskan"
enableLocalTimeline: "Nyalakan linimasa lokal"
enableGlobalTimeline: "Nyalakan linimasa global"
disablingTimelinesInfo: "Admin dan Moderator akan selalu memiliki akses ke semua linimasa\
@ -419,7 +416,6 @@ normalPassword: "Kata sandi baik"
strongPassword: "Kata sandi kuat"
passwordMatched: "Kata sandi sama"
passwordNotMatched: "Kata sandi tidak sama"
signinWith: "Masuk dengan {x}"
signinFailed: "Tidak dapat masuk. Nama pengguna atau kata sandi yang kamu masukkan\
\ salah."
tapSecurityKey: "Ketuk kunci keamanan kamu"

View file

@ -304,9 +304,6 @@ dayX: "{day}"
monthX: "{month}"
yearX: "{year}"
pages: "Pagine"
integration: "App collegate"
connectService: "Connessione"
disconnectService: "Disconnessione "
enableLocalTimeline: "Abilita Timeline locale"
enableGlobalTimeline: "Abilita Timeline federata"
disablingTimelinesInfo: "Anche se disabiliti queste timeline, gli amministratori e\
@ -413,7 +410,6 @@ normalPassword: "Password buona"
strongPassword: "Password forte"
passwordMatched: "Corretta"
passwordNotMatched: "Le password non corrispondono."
signinWith: "Accedi con {x}"
signinFailed: "Autenticazione non riuscita. Controlla la tua password e nome utente."
tapSecurityKey: "Premi la chiave di sicurezza"
or: "oppure"

View file

@ -286,9 +286,6 @@ dayX: "{day}日"
monthX: "{month}月"
yearX: "{year}年"
pages: "ページ"
integration: "連携"
connectService: "接続する"
disconnectService: "切断する"
enableLocalTimeline: "ローカルタイムラインを有効にする"
enableGlobalTimeline: "グローバルタイムラインを有効にする"
disablingTimelinesInfo: "これらのタイムラインを無効化しても、利便性のため管理者およびモデレーターは引き続き利用することができます。"
@ -392,7 +389,6 @@ normalPassword: "普通のパスワード"
strongPassword: "強いパスワード"
passwordMatched: "一致しました"
passwordNotMatched: "一致していません"
signinWith: "{x}でログイン"
signinFailed: "ログインできませんでした。ユーザー名とパスワードを確認してください。"
tapSecurityKey: "セキュリティキーにタッチ"
or: "もしくは"
@ -1273,13 +1269,3 @@ _deck:
list: "リスト"
mentions: "あなた宛て"
direct: "ダイレクト"
_services:
_discord:
connected: "Discord: @{username}#{discriminator} を、FoundKey: @{mkUsername} に接続しました!"
disconnected: "Discordの連携を解除しました :v:"
_twitter:
connected: "Twitter: @{twitterUserName} を、FoundKey: @{userName} に接続しました!"
disconnected: "Twitterの連携を解除しました :v:"
_github:
connected: "GitHub: @{login} を、FoundKey: @{userName} に接続しました!"
disconnected: "GitHubの連携を解除しました :v:"

View file

@ -288,7 +288,6 @@ dayX: "{day}日"
monthX: "{month}月"
yearX: "{year}年"
pages: "ページ"
integration: "連携"
enableLocalTimeline: "ローカルタイムラインを使えるようにする"
enableGlobalTimeline: "グローバルタイムラインを使えるようにする"
disablingTimelinesInfo: "ここらへんのタイムラインを使えんようにしてしもても、管理者とモデレーターは使えるままになってるで、そうやなかったら不便やからな。"
@ -391,7 +390,6 @@ normalPassword: "普通のパスワード"
strongPassword: "ええ感じのパスワード"
passwordMatched: "よし!一致や!"
passwordNotMatched: "一致しとらんで?"
signinWith: "{x}でログイン"
or: "それか"
language: "言語"
uiLanguage: "UIの表示言語"

View file

@ -39,7 +39,6 @@ userList: "Tibdarin"
securityKey: "Tasarutt n tɣellist"
securityKeyName: "Isem n tsarutt"
signinRequired: "Ttxil jerred"
signinWith: "Tuqqna s {x}"
tapSecurityKey: "Sekcem tasarutt-ik·im n tɣellist"
uiLanguage: "Tutlayt n wegrudem"
plugins: "Izegrar"

View file

@ -315,9 +315,6 @@ dayX: "{day}일"
monthX: "{month}월"
yearX: "{year}년"
pages: "페이지"
integration: "연동"
connectService: "계정 연동"
disconnectService: "계정 연동 해제"
enableLocalTimeline: "로컬 타임라인 활성화"
enableGlobalTimeline: "글로벌 타임라인 활성화"
disablingTimelinesInfo: "특정 타임라인을 비활성화하더라도 관리자 및 모더레이터는 계속 사용할 수 있습니다."
@ -438,7 +435,6 @@ normalPassword: "좋은 비밀번호"
strongPassword: "강한 비밀번호"
passwordMatched: "일치합니다"
passwordNotMatched: "일치하지 않습니다"
signinWith: "{x}로 로그인"
signinFailed: "로그인할 수 없습니다. 사용자명과 비밀번호를 확인하여 주십시오."
tapSecurityKey: "보안 키를 터치"
or: "혹은"

View file

@ -298,9 +298,6 @@ dayX: "{day}"
monthX: "{month}"
yearX: "{year}"
pages: "Strony"
integration: "Integracja"
connectService: "Połącz"
disconnectService: "Rozłącz"
enableLocalTimeline: "Włącz lokalną oś czasu"
enableGlobalTimeline: "Włącz globalną oś czasu"
disablingTimelinesInfo: "Administratorzy i moderatorzy będą zawsze mieć dostęp do\
@ -407,7 +404,6 @@ normalPassword: "Dobre hasło"
strongPassword: "Silne hasło"
passwordMatched: "Pasuje"
passwordNotMatched: "Hasła nie pasują do siebie"
signinWith: "Zaloguj się z {x}"
signinFailed: "Nie udało się zalogować. Wprowadzona nazwa użytkownika lub hasło są\
\ nieprawidłowe."
tapSecurityKey: "Wybierz swój klucz bezpieczeństwa"

View file

@ -311,9 +311,6 @@ dayX: "{day}"
monthX: "{month}"
yearX: "{year}"
pages: "Pagini"
integration: "Integrare"
connectService: "Conectează"
disconnectService: "Deconectează"
enableLocalTimeline: "Activează cronologia locală"
enableGlobalTimeline: "Activeaza cronologia globală"
disablingTimelinesInfo: "Administratorii și Moderatorii vor avea mereu access la toate\
@ -420,7 +417,6 @@ normalPassword: "Parolă medie"
strongPassword: "Parolă puternică"
passwordMatched: "Se potrivește!"
passwordNotMatched: "Nu se potrivește"
signinWith: "Autentifică-te cu {x}"
signinFailed: "Nu se poate autentifica. Numele de utilizator sau parola introduse\
\ sunt incorecte."
tapSecurityKey: "Apasă pe cheia ta de securitate."

View file

@ -304,9 +304,6 @@ dayX: "{day} день"
monthX: "{month} месяц"
yearX: "{year} год"
pages: "Страницы"
integration: "Интеграция"
connectService: "Подключиться"
disconnectService: "Отключиться"
enableLocalTimeline: "Включить локальную ленту"
enableGlobalTimeline: "Включить глобальную ленту"
disablingTimelinesInfo: "У администраторов и модераторов есть доступ ко всем лентам,\
@ -415,7 +412,6 @@ normalPassword: "Годный пароль"
strongPassword: "Надёжный пароль"
passwordMatched: "Совпали"
passwordNotMatched: "Не совпадают"
signinWith: "Использовать {x} для входа"
signinFailed: "Невозможно войти в систему. Введенное вами имя пользователя или пароль\
\ неверны."
tapSecurityKey: "Нажмите на свой электронный ключ"

View file

@ -305,9 +305,6 @@ dayX: "{day}"
monthX: "{month}"
yearX: "{year}"
pages: "Stránky"
integration: "Integrácia"
connectService: "Pripojiť"
disconnectService: "Odpojiť"
enableLocalTimeline: "Povoliť lokálnu časovú os"
enableGlobalTimeline: "Povoliť globálnu časovú os"
disablingTimelinesInfo: "Administrátori a moderátori majú vždy prístup ku všetkým\
@ -414,7 +411,6 @@ normalPassword: "Dobré heslo"
strongPassword: "Silné heslo"
passwordMatched: "Heslá sú rovnaké"
passwordNotMatched: "Heslá nie sú rovnaké"
signinWith: "Prihlásiť sa použitím {x}"
signinFailed: "Nedá sa prihlásiť. Skontrolujte prosím meno používateľa a heslo."
tapSecurityKey: "Ťuknite na bezpečnostný kľúč"
or: "Alebo"

View file

@ -305,9 +305,6 @@ dayX: "{day}"
monthX: "{month}"
yearX: "{year}"
pages: "Сторінки"
integration: "Інтеграція"
connectService: "Під’єднати"
disconnectService: "Відключитися"
enableLocalTimeline: "Увімкнути локальну стрічку"
enableGlobalTimeline: "Увімкнути глобальну стрічку"
disablingTimelinesInfo: "Адміністратори та модератори завжди мають доступ до всіх\
@ -414,7 +411,6 @@ normalPassword: "Достатній пароль"
strongPassword: "Міцний пароль"
passwordMatched: "Все вірно"
passwordNotMatched: "Паролі не співпадають"
signinWith: "Увійти за допомогою {x}"
signinFailed: "Не вдалося увійти. Введені ім’я користувача або пароль неправильнi."
tapSecurityKey: "Торкніться ключа безпеки"
or: "або"

View file

@ -305,9 +305,6 @@ dayX: "{day}"
monthX: "{month}"
yearX: "{year}"
pages: "Trang"
integration: "Tương tác"
connectService: "Kết nối"
disconnectService: "Ngắt kết nối"
enableLocalTimeline: "Bật bảng tin máy chủ"
enableGlobalTimeline: "Bật bảng tin liên hợp"
disablingTimelinesInfo: "Quản trị viên và Kiểm duyệt viên luôn có quyền truy cập mọi\
@ -415,7 +412,6 @@ normalPassword: "Mật khẩu tạm được"
strongPassword: "Mật khẩu mạnh"
passwordMatched: "Trùng khớp"
passwordNotMatched: "Không trùng khớp"
signinWith: "Đăng nhập bằng {x}"
signinFailed: "Không thể đăng nhập. Vui lòng kiểm tra tên người dùng và mật khẩu của\
\ bạn."
tapSecurityKey: "Nhấn mã bảo mật của bạn"

View file

@ -284,9 +284,6 @@ dayX: "{day}日"
monthX: "{month}月"
yearX: "{year}年"
pages: "页面"
integration: "关联"
connectService: "连接"
disconnectService: "断开连接"
enableLocalTimeline: "启用本地时间线功能"
enableGlobalTimeline: "启用全局时间线"
disablingTimelinesInfo: "即使时间线功能被禁用,出于方便,管理员和数据图表也可以继续使用。"
@ -390,7 +387,6 @@ normalPassword: "密码强度:中等"
strongPassword: "密码强度:强"
passwordMatched: "密码一致"
passwordNotMatched: "密码不一致"
signinWith: "以{x}登录"
signinFailed: "无法登录,请检查您的用户名和密码是否正确。"
tapSecurityKey: "轻触硬件安全密钥"
or: "或者"

View file

@ -284,9 +284,6 @@ dayX: "{day}日"
monthX: "{month}月"
yearX: "{year}年"
pages: "頁面"
integration: "整合"
connectService: "己連結"
disconnectService: "己斷開 "
enableLocalTimeline: "開啟本地時間軸"
enableGlobalTimeline: "啟用公開時間軸"
disablingTimelinesInfo: "即使您關閉了時間線功能,管理員和協調人仍可以繼續使用,以方便您。"
@ -390,7 +387,6 @@ normalPassword: "密碼強度普通"
strongPassword: "密碼強度高"
passwordMatched: "密碼一致"
passwordNotMatched: "密碼不一致"
signinWith: "以{x}登錄"
signinFailed: "登入失敗。 請檢查使用者名稱和密碼。"
tapSecurityKey: "點擊安全密鑰"
or: "或者"

View file

@ -46,11 +46,11 @@
"devDependencies": {
"@types/gulp": "4.0.9",
"@types/gulp-rename": "2.0.1",
"@typescript-eslint/parser": "^5.44.0",
"@typescript-eslint/parser": "^5.46.1",
"cross-env": "7.0.3",
"cypress": "10.3.0",
"start-server-and-test": "1.14.0",
"typescript": "^4.9.3"
"typescript": "^4.9.4"
},
"packageManager": "yarn@3.3.0"
}

View file

@ -0,0 +1,29 @@
export class removeIntegrations1670359028055 {
name = 'removeIntegrations1670359028055'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableTwitterIntegration"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "twitterConsumerKey"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "twitterConsumerSecret"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableGithubIntegration"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "githubClientId"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "githubClientSecret"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableDiscordIntegration"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "discordClientId"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "discordClientSecret"`);
await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "integrations"`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "user_profile" ADD "integrations" jsonb NOT NULL DEFAULT '{}'`);
await queryRunner.query(`ALTER TABLE "meta" ADD "discordClientSecret" character varying(128)`);
await queryRunner.query(`ALTER TABLE "meta" ADD "discordClientId" character varying(128)`);
await queryRunner.query(`ALTER TABLE "meta" ADD "enableDiscordIntegration" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`ALTER TABLE "meta" ADD "githubClientSecret" character varying(128)`);
await queryRunner.query(`ALTER TABLE "meta" ADD "githubClientId" character varying(128)`);
await queryRunner.query(`ALTER TABLE "meta" ADD "enableGithubIntegration" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`ALTER TABLE "meta" ADD "twitterConsumerSecret" character varying(128)`);
await queryRunner.query(`ALTER TABLE "meta" ADD "twitterConsumerKey" character varying(128)`);
await queryRunner.query(`ALTER TABLE "meta" ADD "enableTwitterIntegration" boolean NOT NULL DEFAULT false`);
}
}

View file

@ -7,7 +7,7 @@
"scripts": {
"build": "tsc -p tsconfig.json || echo done. && tsc-alias -p tsconfig.json",
"watch": "node watch.mjs",
"lint": "eslint src --ext .ts",
"lint": "tsc --noEmit && eslint src --ext .ts",
"mocha": "cross-env NODE_ENV=test TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha",
"migrate": "npx typeorm migration:run -d ormconfig.js",
"start": "node --experimental-json-modules ./built/index.js",
@ -29,7 +29,6 @@
"ajv": "8.11.0",
"archiver": "5.3.1",
"autobind-decorator": "2.4.0",
"autwh": "0.1.0",
"aws-sdk": "2.1165.0",
"bcryptjs": "2.4.3",
"blurhash": "1.1.5",
@ -92,7 +91,6 @@
"reflect-metadata": "0.1.13",
"rename": "1.0.4",
"require-all": "3.0.0",
"rndstr": "1.0.0",
"rss-parser": "3.12.0",
"sanitize-html": "2.7.0",
"semver": "7.3.7",
@ -124,6 +122,7 @@
"@types/bcryptjs": "2.4.2",
"@types/bull": "3.15.8",
"@types/cbor": "6.0.0",
"@types/color-convert": "^2.0.0",
"@types/escape-regexp": "0.0.1",
"@types/fluent-ffmpeg": "2.1.20",
"@types/is-url": "1.2.30",
@ -146,7 +145,6 @@
"@types/node": "18.7.16",
"@types/node-fetch": "3.0.3",
"@types/nodemailer": "6.4.5",
"@types/oauth": "^0.9.1",
"@types/pg": "^8.6.5",
"@types/pug": "2.0.6",
"@types/punycode": "2.1.0",
@ -161,20 +159,21 @@
"@types/sinon": "^10.0.13",
"@types/sinonjs__fake-timers": "8.1.2",
"@types/speakeasy": "2.0.7",
"@types/syslog-pro": "^1.0.0",
"@types/tinycolor2": "1.4.3",
"@types/tmp": "0.2.3",
"@types/uuid": "8.3.4",
"@types/web-push": "3.3.2",
"@types/websocket": "1.0.5",
"@types/ws": "8.5.3",
"@typescript-eslint/eslint-plugin": "^5.44.0",
"@typescript-eslint/parser": "^5.44.0",
"@typescript-eslint/eslint-plugin": "^5.46.1",
"@typescript-eslint/parser": "^5.46.1",
"cross-env": "7.0.3",
"eslint": "^8.28.0",
"eslint": "^8.29.0",
"eslint-plugin-import": "^2.26.0",
"execa": "6.1.0",
"form-data": "^4.0.0",
"sinon": "^14.0.2",
"typescript": "^4.9.3"
"typescript": "^4.9.4"
}
}

View file

@ -17,7 +17,7 @@ const ev = new Xev();
/**
* Init process
*/
export default async function(): Promise<void> {
export async function boot(): Promise<void> {
process.title = `FoundKey (${cluster.isPrimary ? 'master' : 'worker'})`;
if (cluster.isPrimary || envOption.disableClustering) {

View file

@ -153,7 +153,7 @@ async function spawnWorkers(clusterLimits: Required<Config['clusterLimits']>): P
bootLogger.info(`Starting ${total} workers...`);
await Promise.all(workers.map(mode => spawnWorker(mode)));
bootLogger.succ(`All workers started`);
bootLogger.succ('All workers started');
}
function spawnWorker(mode: 'web' | 'queue'): Promise<void> {

View file

@ -38,6 +38,12 @@ export default function load(): Config {
config.port = config.port || parseInt(process.env.PORT || '', 10);
config.images = Object.assign({
info: '/twemoji/1f440.svg',
notFound: '/twemoji/2049.svg',
error: '/twemoji/1f480.svg',
}, config.images ?? {});
if (!config.maxNoteTextLength) config.maxNoteTextLength = 3000;
mixin.version = meta.version;

View file

@ -59,7 +59,7 @@ export type Source = {
deliverJobMaxAttempts?: number;
inboxJobMaxAttempts?: number;
syslog: {
syslog?: {
host: string;
port: number;
};
@ -67,6 +67,12 @@ export type Source = {
mediaProxy?: string;
proxyRemoteFiles?: boolean;
internalStoragePath?: string;
images?: {
info?: string;
notFound?: string;
error?: string;
};
};
/**

View file

@ -1,6 +1,5 @@
// https://github.com/typeorm/typeorm/issues/2400
import pg from 'pg';
import { SECOND } from '@/const.js';
pg.types.setTypeParser(20, Number);
@ -8,6 +7,7 @@ import { Logger, DataSource } from 'typeorm';
import * as highlight from 'cli-highlight';
import config from '@/config/index.js';
import { SECOND } from '@/const.js';
import { User } from '@/models/entities/user.js';
import { DriveFile } from '@/models/entities/drive-file.js';
import { DriveFolder } from '@/models/entities/drive-folder.js';
@ -78,33 +78,33 @@ import { redisClient } from './redis.js';
const sqlLogger = dbLogger.createSubLogger('sql', 'gray', false);
class MyCustomLogger implements Logger {
private highlight(sql: string) {
private highlight(sql: string): string {
return highlight.highlight(sql, {
language: 'sql', ignoreIllegals: true,
});
}
public logQuery(query: string, parameters?: any[]) {
public logQuery(query: string): void {
sqlLogger.info(this.highlight(query).substring(0, 100));
}
public logQueryError(error: string, query: string, parameters?: any[]) {
public logQueryError(error: string, query: string): void {
sqlLogger.error(this.highlight(query));
}
public logQuerySlow(time: number, query: string, parameters?: any[]) {
public logQuerySlow(time: number, query: string): void {
sqlLogger.warn(this.highlight(query));
}
public logSchemaBuild(message: string) {
public logSchemaBuild(message: string): void {
sqlLogger.info(message);
}
public log(message: string) {
public log(message: string): void {
sqlLogger.info(message);
}
public logMigration(message: string) {
public logMigration(message: string): void {
sqlLogger.info(message);
}
}

View file

@ -3,7 +3,7 @@
*/
import { EventEmitter } from 'node:events';
import boot from '@/boot/index.js';
import { boot } from '@/boot/index.js';
Error.stackTraceLimit = Infinity;
EventEmitter.defaultMaxListeners = 128;

View file

@ -72,7 +72,7 @@ export function fromHtml(html: string, quoteUri?: string | null): string {
const href = getAttr(node, 'href');
// hashtags
if (txt.startsWith('#') && href && (attrHas(node, 'rel', 'tag') || attrHas(node, 'class', 'hashtag')) {
if (txt.startsWith('#') && href && (attrHas(node, 'rel', 'tag') || attrHas(node, 'class', 'hashtag'))) {
text += txt;
// mentions
} else if (txt.startsWith('@') && !attrHas(node, 'rel', 'me')) {

View file

@ -1,7 +1,7 @@
export class Cache<T> {
public cache: Map<string | null, { date: number; value: T; }>;
public cache: Map<string, { date: number; value: T; }>;
private lifetime: number;
public fetcher: (key: string | null) => Promise<T | undefined>;
public fetcher: (key: string) => Promise<T | undefined>;
constructor(lifetime: number, fetcher: Cache<T>['fetcher']) {
this.cache = new Map();
@ -9,14 +9,14 @@ export class Cache<T> {
this.fetcher = fetcher;
}
public set(key: string | null, value: T): void {
public set(key: string, value: T): void {
this.cache.set(key, {
date: Date.now(),
value,
});
}
public get(key: string | null): T | undefined {
public get(key: string): T | undefined {
const cached = this.cache.get(key);
if (cached == null) return undefined;
@ -29,7 +29,7 @@ export class Cache<T> {
return cached.value;
}
public delete(key: string | null): void {
public delete(key: string): void {
this.cache.delete(key);
}
@ -38,7 +38,7 @@ export class Cache<T> {
* run to get the value. If the fetcher returns undefined, it is
* returned but not cached.
*/
public async fetch(key: string | null): Promise<T | undefined> {
public async fetch(key: string): Promise<T | undefined> {
const cached = this.get(key);
if (cached !== undefined) {
return cached;

View file

@ -1,10 +1,9 @@
import * as crypto from 'node:crypto';
const L_CHARS = '0123456789abcdefghijklmnopqrstuvwxyz';
const LU_CHARS = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
const LU_CHARS = L_CHARS + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
export function secureRndstr(length = 32, useLU = true): string {
const chars = useLU ? LU_CHARS : L_CHARS;
export function secureRndstrCustom(length = 32, chars: string): string {
const chars_len = chars.length;
let str = '';
@ -19,3 +18,8 @@ export function secureRndstr(length = 32, useLU = true): string {
return str;
}
export function secureRndstr(length = 32, useLU = true): string {
const chars = useLU ? LU_CHARS : L_CHARS;
return secureRndstrCustom(length, chars);
}

View file

@ -35,7 +35,7 @@ export async function skippedInstances(hosts: Array<Instance['host']>): Promise<
hosts.filter(host => !skipped.includes(host) && !host.includes(',')).join(','),
],
)
.then(res => res.map(row => row.host)),
.then((res: Instance[]) => res.map(row => row.host)),
);
}

View file

@ -17,7 +17,7 @@ export class AbuseUserReport {
@Column(id())
public targetUserId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -27,7 +27,7 @@ export class AbuseUserReport {
@Column(id())
public reporterId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -39,7 +39,7 @@ export class AbuseUserReport {
})
public assigneeId: User['id'] | null;
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'SET NULL',
})
@JoinColumn()

View file

@ -41,7 +41,7 @@ export class AccessToken {
@Column(id())
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -53,7 +53,7 @@ export class AccessToken {
})
public appId: App['id'] | null;
@ManyToOne(type => App, {
@ManyToOne(() => App, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -18,7 +18,7 @@ export class AnnouncementRead {
@Column(id())
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -28,7 +28,7 @@ export class AnnouncementRead {
@Column(id())
public announcementId: Announcement['id'];
@ManyToOne(type => Announcement, {
@ManyToOne(() => Announcement, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -16,7 +16,7 @@ export class AntennaNote {
})
public noteId: Note['id'];
@ManyToOne(type => Note, {
@ManyToOne(() => Note, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -29,7 +29,7 @@ export class AntennaNote {
})
public antennaId: Antenna['id'];
@ManyToOne(type => Antenna, {
@ManyToOne(() => Antenna, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -21,7 +21,7 @@ export class Antenna {
})
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -42,7 +42,7 @@ export class Antenna {
})
public userListId: UserList['id'] | null;
@ManyToOne(type => UserList, {
@ManyToOne(() => UserList, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -54,7 +54,7 @@ export class Antenna {
})
public userGroupJoiningId: UserGroupJoining['id'] | null;
@ManyToOne(type => UserGroupJoining, {
@ManyToOne(() => UserGroupJoining, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -21,7 +21,7 @@ export class App {
})
public userId: User['id'] | null;
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'SET NULL',
nullable: true,
})

View file

@ -11,7 +11,7 @@ export class AttestationChallenge {
@PrimaryColumn(id())
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -1,4 +1,4 @@
import { Entity, PrimaryColumn, Index, Column, ManyToOne, OneToOne, JoinColumn } from 'typeorm';
import { Entity, PrimaryColumn, Index, Column, ManyToOne, JoinColumn } from 'typeorm';
import { id } from '../id.js';
import { AccessToken } from './access-token.js';
import { App } from './app.js';
@ -45,5 +45,5 @@ export class AuthSession {
nullable: true,
comment: 'PKCE code_challenge value, if provided (OAuth only)',
})
pkceChallenge: string | null;
pkceChallenge: string | null;
}

View file

@ -21,7 +21,7 @@ export class Blocking {
})
public blockeeId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -34,7 +34,7 @@ export class Blocking {
})
public blockerId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -22,7 +22,7 @@ export class ChannelFollowing {
})
public followeeId: Channel['id'];
@ManyToOne(type => Channel, {
@ManyToOne(() => Channel, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -35,7 +35,7 @@ export class ChannelFollowing {
})
public followerId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -18,7 +18,7 @@ export class ChannelNotePining {
@Column(id())
public channelId: Channel['id'];
@ManyToOne(type => Channel, {
@ManyToOne(() => Channel, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -27,7 +27,7 @@ export class ChannelNotePining {
@Column(id())
public noteId: Note['id'];
@ManyToOne(type => Note, {
@ManyToOne(() => Note, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -28,7 +28,7 @@ export class Channel {
})
public userId: User['id'] | null;
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'SET NULL',
})
@JoinColumn()
@ -53,7 +53,7 @@ export class Channel {
})
public bannerId: DriveFile['id'] | null;
@ManyToOne(type => DriveFile, {
@ManyToOne(() => DriveFile, {
onDelete: 'SET NULL',
})
@JoinColumn()

View file

@ -16,7 +16,7 @@ export class ClipNote {
})
public noteId: Note['id'];
@ManyToOne(type => Note, {
@ManyToOne(() => Note, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -29,7 +29,7 @@ export class ClipNote {
})
public clipId: Clip['id'];
@ManyToOne(type => Clip, {
@ManyToOne(() => Clip, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -19,7 +19,7 @@ export class Clip {
})
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -23,7 +23,7 @@ export class DriveFile {
})
public userId: User['id'] | null;
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'RESTRICT',
})
@JoinColumn()
@ -144,7 +144,7 @@ export class DriveFile {
})
public folderId: DriveFolder['id'] | null;
@ManyToOne(type => DriveFolder, {
@ManyToOne(() => DriveFolder, {
onDelete: 'SET NULL',
})
@JoinColumn()

View file

@ -27,7 +27,7 @@ export class DriveFolder {
})
public userId: User['id'] | null;
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -41,7 +41,7 @@ export class DriveFolder {
})
public parentId: DriveFolder['id'] | null;
@ManyToOne(type => DriveFolder, {
@ManyToOne(() => DriveFolder, {
onDelete: 'SET NULL',
})
@JoinColumn()

View file

@ -20,7 +20,7 @@ export class FollowRequest {
})
public followeeId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -33,7 +33,7 @@ export class FollowRequest {
})
public followerId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -21,7 +21,7 @@ export class Following {
})
public followeeId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -34,7 +34,7 @@ export class Following {
})
public followerId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -16,7 +16,7 @@ export class GalleryLike {
@Column(id())
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -25,7 +25,7 @@ export class GalleryLike {
@Column(id())
public postId: GalleryPost['id'];
@ManyToOne(type => GalleryPost, {
@ManyToOne(() => GalleryPost, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -37,7 +37,7 @@ export class GalleryPost {
})
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -22,7 +22,7 @@ export class MessagingMessage {
})
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -35,7 +35,7 @@ export class MessagingMessage {
})
public recipientId: User['id'] | null;
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -48,7 +48,7 @@ export class MessagingMessage {
})
public groupId: UserGroup['id'] | null;
@ManyToOne(type => UserGroup, {
@ManyToOne(() => UserGroup, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -81,7 +81,7 @@ export class MessagingMessage {
})
public fileId: DriveFile['id'] | null;
@ManyToOne(type => DriveFile, {
@ManyToOne(() => DriveFile, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -134,7 +134,7 @@ export class Meta {
})
public proxyAccountId: User['id'] | null;
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'SET NULL',
})
@JoinColumn()
@ -246,57 +246,6 @@ export class Meta {
})
public swPrivateKey: string;
@Column('boolean', {
default: false,
})
public enableTwitterIntegration: boolean;
@Column('varchar', {
length: 128,
nullable: true,
})
public twitterConsumerKey: string | null;
@Column('varchar', {
length: 128,
nullable: true,
})
public twitterConsumerSecret: string | null;
@Column('boolean', {
default: false,
})
public enableGithubIntegration: boolean;
@Column('varchar', {
length: 128,
nullable: true,
})
public githubClientId: string | null;
@Column('varchar', {
length: 128,
nullable: true,
})
public githubClientSecret: string | null;
@Column('boolean', {
default: false,
})
public enableDiscordIntegration: boolean;
@Column('varchar', {
length: 128,
nullable: true,
})
public discordClientId: string | null;
@Column('varchar', {
length: 128,
nullable: true,
})
public discordClientSecret: string | null;
@Column('enum', {
enum: TranslationService,
nullable: true,

View file

@ -16,7 +16,7 @@ export class ModerationLog {
@Column(id())
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -17,7 +17,7 @@ export class MutedNote {
})
public noteId: Note['id'];
@ManyToOne(type => Note, {
@ManyToOne(() => Note, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -30,7 +30,7 @@ export class MutedNote {
})
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -27,7 +27,7 @@ export class Muting {
})
public muteeId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -40,7 +40,7 @@ export class Muting {
})
public muterId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -18,7 +18,7 @@ export class NoteFavorite {
@Column(id())
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -27,7 +27,7 @@ export class NoteFavorite {
@Column(id())
public noteId: Note['id'];
@ManyToOne(type => Note, {
@ManyToOne(() => Note, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -19,7 +19,7 @@ export class NoteReaction {
@Column(id())
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -29,7 +29,7 @@ export class NoteReaction {
@Column(id())
public noteId: Note['id'];
@ManyToOne(type => Note, {
@ManyToOne(() => Note, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -20,7 +20,7 @@ export class NoteThreadMuting {
})
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -14,7 +14,7 @@ export class NoteUnread {
@Column(id())
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -24,7 +24,7 @@ export class NoteUnread {
@Column(id())
public noteId: Note['id'];
@ManyToOne(type => Note, {
@ManyToOne(() => Note, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -22,7 +22,7 @@ export class NoteWatching {
})
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -35,7 +35,7 @@ export class NoteWatching {
})
public noteId: Note['id'];
@ManyToOne(type => Note, {
@ManyToOne(() => Note, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -27,7 +27,7 @@ export class Note {
})
public replyId: Note['id'] | null;
@ManyToOne(type => Note, {
@ManyToOne(() => Note, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -41,7 +41,7 @@ export class Note {
})
public renoteId: Note['id'] | null;
@ManyToOne(type => Note, {
@ManyToOne(() => Note, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -75,7 +75,7 @@ export class Note {
})
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -179,7 +179,7 @@ export class Note {
})
public channelId: Channel['id'] | null;
@ManyToOne(type => Channel, {
@ManyToOne(() => Channel, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -28,7 +28,7 @@ export class Notification {
})
public notifieeId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -45,7 +45,7 @@ export class Notification {
})
public notifierId: User['id'] | null;
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -89,7 +89,7 @@ export class Notification {
})
public noteId: Note['id'] | null;
@ManyToOne(type => Note, {
@ManyToOne(() => Note, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -101,7 +101,7 @@ export class Notification {
})
public followRequestId: FollowRequest['id'] | null;
@ManyToOne(type => FollowRequest, {
@ManyToOne(() => FollowRequest, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -113,7 +113,7 @@ export class Notification {
})
public userGroupInvitationId: UserGroupInvitation['id'] | null;
@ManyToOne(type => UserGroupInvitation, {
@ManyToOne(() => UserGroupInvitation, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -165,7 +165,7 @@ export class Notification {
})
public appAccessTokenId: AccessToken['id'] | null;
@ManyToOne(type => AccessToken, {
@ManyToOne(() => AccessToken, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -16,7 +16,7 @@ export class PageLike {
@Column(id())
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -25,7 +25,7 @@ export class PageLike {
@Column(id())
public pageId: Page['id'];
@ManyToOne(type => Page, {
@ManyToOne(() => Page, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -57,7 +57,7 @@ export class Page {
})
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -69,7 +69,7 @@ export class Page {
})
public eyeCatchingImageId: DriveFile['id'] | null;
@ManyToOne(type => DriveFile, {
@ManyToOne(() => DriveFile, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -22,7 +22,7 @@ export class PasswordResetRequest {
})
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -19,7 +19,7 @@ export class PollVote {
@Column(id())
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -29,7 +29,7 @@ export class PollVote {
@Column(id())
public noteId: Note['id'];
@ManyToOne(type => Note, {
@ManyToOne(() => Note, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -9,7 +9,7 @@ export class Poll {
@PrimaryColumn(id())
public noteId: Note['id'];
@OneToOne(type => Note, {
@OneToOne(() => Note, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -25,7 +25,7 @@ export class RegistryItem {
})
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -21,7 +21,7 @@ export class RenoteMuting {
})
public muteeId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -34,7 +34,7 @@ export class RenoteMuting {
})
public muterId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -16,7 +16,7 @@ export class Signin {
@Column(id())
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -14,7 +14,7 @@ export class SwSubscription {
@Column(id())
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -21,7 +21,7 @@ export class UserGroupInvitation {
})
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -34,7 +34,7 @@ export class UserGroupInvitation {
})
public userGroupId: UserGroup['id'];
@ManyToOne(type => UserGroup, {
@ManyToOne(() => UserGroup, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -21,7 +21,7 @@ export class UserGroupJoining {
})
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
@ -34,7 +34,7 @@ export class UserGroupJoining {
})
public userGroupId: UserGroup['id'];
@ManyToOne(type => UserGroup, {
@ManyToOne(() => UserGroup, {
onDelete: 'CASCADE',
})
@JoinColumn()

View file

@ -25,7 +25,7 @@ export class UserGroup {
})
public userId: User['id'];
@ManyToOne(type => User, {
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()

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