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
This commit is contained in:
Johann150 2022-12-07 17:16:14 +01:00
commit 71b976ec96
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1
48 changed files with 34 additions and 1507 deletions

View file

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

View file

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

View file

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

View file

@ -321,9 +321,6 @@ dayX: "{day}"
monthX: "{month}" monthX: "{month}"
yearX: "{year}" yearX: "{year}"
pages: "Seiten" pages: "Seiten"
integration: "Integration"
connectService: "Verbinden"
disconnectService: "Trennen"
enableLocalTimeline: "Lokale Chronik aktivieren" enableLocalTimeline: "Lokale Chronik aktivieren"
enableGlobalTimeline: "Globale Chronik aktivieren" enableGlobalTimeline: "Globale Chronik aktivieren"
disablingTimelinesInfo: "Administratoren und Moderatoren haben immer Zugriff auf alle\ disablingTimelinesInfo: "Administratoren und Moderatoren haben immer Zugriff auf alle\
@ -433,7 +430,6 @@ normalPassword: "Durchschnittliches Passwort"
strongPassword: "Starkes Passwort" strongPassword: "Starkes Passwort"
passwordMatched: "Stimmt überein" passwordMatched: "Stimmt überein"
passwordNotMatched: "Stimmt nicht überein" passwordNotMatched: "Stimmt nicht überein"
signinWith: "Mit {x} anmelden"
signinFailed: "Anmeldung fehlgeschlagen. Überprüfe Benutzername und Passswort." signinFailed: "Anmeldung fehlgeschlagen. Überprüfe Benutzername und Passswort."
tapSecurityKey: "Tippe deinen Sicherheitsschlüssel an" tapSecurityKey: "Tippe deinen Sicherheitsschlüssel an"
or: "Oder" or: "Oder"
@ -1373,18 +1369,6 @@ recommended: "Empfehlung"
check: "Check" check: "Check"
maxCustomEmojiPicker: Maximale Anzahl vorgeschlagener benutzerdefinierter Emoji maxCustomEmojiPicker: Maximale Anzahl vorgeschlagener benutzerdefinierter Emoji
maxUnicodeEmojiPicker: Maximale Anzahl vorgeschlagener Unicode-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 documentation: Dokumentation
signinHistoryExpires: Frühere Login-Versuche werden aus Datenschutzgründen nach 60 signinHistoryExpires: Frühere Login-Versuche werden aus Datenschutzgründen nach 60
Tagen automatisch gelöscht. Tagen automatisch gelöscht.

View file

@ -311,9 +311,6 @@ dayX: "{day}"
monthX: "{month}" monthX: "{month}"
yearX: "{year}" yearX: "{year}"
pages: "Pages" pages: "Pages"
integration: "Integration"
connectService: "Connect"
disconnectService: "Disconnect"
enableLocalTimeline: "Enable local timeline" enableLocalTimeline: "Enable local timeline"
enableGlobalTimeline: "Enable global timeline" enableGlobalTimeline: "Enable global timeline"
disablingTimelinesInfo: "Adminstrators and Moderators will always have access to all\ disablingTimelinesInfo: "Adminstrators and Moderators will always have access to all\
@ -420,7 +417,6 @@ normalPassword: "Average password"
strongPassword: "Strong password" strongPassword: "Strong password"
passwordMatched: "Matches" passwordMatched: "Matches"
passwordNotMatched: "Does not match" passwordNotMatched: "Does not match"
signinWith: "Sign in with {x}"
signinFailed: "Unable to sign in. The entered username or password is incorrect." signinFailed: "Unable to sign in. The entered username or password is incorrect."
tapSecurityKey: "Tap your security key" tapSecurityKey: "Tap your security key"
or: "Or" or: "Or"
@ -1344,16 +1340,6 @@ _deck:
list: "List" list: "List"
mentions: "Mentions" mentions: "Mentions"
direct: "Direct notes" 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: _translationService:
_deepl: _deepl:
authKey: "DeepL Auth Key" authKey: "DeepL Auth Key"

View file

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

View file

@ -311,9 +311,6 @@ dayX: "{day}"
monthX: "{month}" monthX: "{month}"
yearX: "{year}" yearX: "{year}"
pages: "Pages" pages: "Pages"
integration: "Intégrations"
connectService: "Connexion"
disconnectService: "Déconnexion"
enableLocalTimeline: "Activer le fil local" enableLocalTimeline: "Activer le fil local"
enableGlobalTimeline: "Activer le fil global" enableGlobalTimeline: "Activer le fil global"
disablingTimelinesInfo: "Même si vous désactivez ces fils, les administrateur·rice·s\ 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" strongPassword: "Mot de passe fort"
passwordMatched: "Les mots de passe correspondent" passwordMatched: "Les mots de passe correspondent"
passwordNotMatched: "Les mots de passe ne correspondent pas" passwordNotMatched: "Les mots de passe ne correspondent pas"
signinWith: "Se connecter avec {x}"
signinFailed: "Échec dauthentification. Veuillez vérifier que votre nom dutilisateur\ signinFailed: "Échec dauthentification. Veuillez vérifier que votre nom dutilisateur\
\ et mot de passe sont corrects." \ et mot de passe sont corrects."
tapSecurityKey: "Appuyez sur votre clé de sécurité" tapSecurityKey: "Appuyez sur votre clé de sécurité"
@ -1331,18 +1327,6 @@ _deck:
list: "Listes" list: "Listes"
mentions: "Mentions" mentions: "Mentions"
direct: "Direct" 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 exportAll: Tout exporter
stopActivityDeliveryDescription: L'activité locale ne sera pas envoyé à cette instance. stopActivityDeliveryDescription: L'activité locale ne sera pas envoyé à cette instance.
La réception de l'activité continuera de fonctionner comme avant. La réception de l'activité continuera de fonctionner comme avant.

View file

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

View file

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

View file

@ -286,9 +286,6 @@ dayX: "{day}日"
monthX: "{month}月" monthX: "{month}月"
yearX: "{year}年" yearX: "{year}年"
pages: "ページ" pages: "ページ"
integration: "連携"
connectService: "接続する"
disconnectService: "切断する"
enableLocalTimeline: "ローカルタイムラインを有効にする" enableLocalTimeline: "ローカルタイムラインを有効にする"
enableGlobalTimeline: "グローバルタイムラインを有効にする" enableGlobalTimeline: "グローバルタイムラインを有効にする"
disablingTimelinesInfo: "これらのタイムラインを無効化しても、利便性のため管理者およびモデレーターは引き続き利用することができます。" disablingTimelinesInfo: "これらのタイムラインを無効化しても、利便性のため管理者およびモデレーターは引き続き利用することができます。"
@ -392,7 +389,6 @@ normalPassword: "普通のパスワード"
strongPassword: "強いパスワード" strongPassword: "強いパスワード"
passwordMatched: "一致しました" passwordMatched: "一致しました"
passwordNotMatched: "一致していません" passwordNotMatched: "一致していません"
signinWith: "{x}でログイン"
signinFailed: "ログインできませんでした。ユーザー名とパスワードを確認してください。" signinFailed: "ログインできませんでした。ユーザー名とパスワードを確認してください。"
tapSecurityKey: "セキュリティキーにタッチ" tapSecurityKey: "セキュリティキーにタッチ"
or: "もしくは" or: "もしくは"
@ -1273,13 +1269,3 @@ _deck:
list: "リスト" list: "リスト"
mentions: "あなた宛て" mentions: "あなた宛て"
direct: "ダイレクト" 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}月" monthX: "{month}月"
yearX: "{year}年" yearX: "{year}年"
pages: "ページ" pages: "ページ"
integration: "連携"
enableLocalTimeline: "ローカルタイムラインを使えるようにする" enableLocalTimeline: "ローカルタイムラインを使えるようにする"
enableGlobalTimeline: "グローバルタイムラインを使えるようにする" enableGlobalTimeline: "グローバルタイムラインを使えるようにする"
disablingTimelinesInfo: "ここらへんのタイムラインを使えんようにしてしもても、管理者とモデレーターは使えるままになってるで、そうやなかったら不便やからな。" disablingTimelinesInfo: "ここらへんのタイムラインを使えんようにしてしもても、管理者とモデレーターは使えるままになってるで、そうやなかったら不便やからな。"
@ -391,7 +390,6 @@ normalPassword: "普通のパスワード"
strongPassword: "ええ感じのパスワード" strongPassword: "ええ感じのパスワード"
passwordMatched: "よし!一致や!" passwordMatched: "よし!一致や!"
passwordNotMatched: "一致しとらんで?" passwordNotMatched: "一致しとらんで?"
signinWith: "{x}でログイン"
or: "それか" or: "それか"
language: "言語" language: "言語"
uiLanguage: "UIの表示言語" uiLanguage: "UIの表示言語"

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -305,9 +305,6 @@ dayX: "{day}"
monthX: "{month}" monthX: "{month}"
yearX: "{year}" yearX: "{year}"
pages: "Trang" 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ủ" enableLocalTimeline: "Bật bảng tin máy chủ"
enableGlobalTimeline: "Bật bảng tin liên hợp" 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\ 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" strongPassword: "Mật khẩu mạnh"
passwordMatched: "Trùng khớp" passwordMatched: "Trùng khớp"
passwordNotMatched: "Không 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\ 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." \ bạn."
tapSecurityKey: "Nhấn mã bảo mật 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}月" monthX: "{month}月"
yearX: "{year}年" yearX: "{year}年"
pages: "页面" pages: "页面"
integration: "关联"
connectService: "连接"
disconnectService: "断开连接"
enableLocalTimeline: "启用本地时间线功能" enableLocalTimeline: "启用本地时间线功能"
enableGlobalTimeline: "启用全局时间线" enableGlobalTimeline: "启用全局时间线"
disablingTimelinesInfo: "即使时间线功能被禁用,出于方便,管理员和数据图表也可以继续使用。" disablingTimelinesInfo: "即使时间线功能被禁用,出于方便,管理员和数据图表也可以继续使用。"
@ -390,7 +387,6 @@ normalPassword: "密码强度:中等"
strongPassword: "密码强度:强" strongPassword: "密码强度:强"
passwordMatched: "密码一致" passwordMatched: "密码一致"
passwordNotMatched: "密码不一致" passwordNotMatched: "密码不一致"
signinWith: "以{x}登录"
signinFailed: "无法登录,请检查您的用户名和密码是否正确。" signinFailed: "无法登录,请检查您的用户名和密码是否正确。"
tapSecurityKey: "轻触硬件安全密钥" tapSecurityKey: "轻触硬件安全密钥"
or: "或者" or: "或者"

View file

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

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

@ -29,7 +29,6 @@
"ajv": "8.11.0", "ajv": "8.11.0",
"archiver": "5.3.1", "archiver": "5.3.1",
"autobind-decorator": "2.4.0", "autobind-decorator": "2.4.0",
"autwh": "0.1.0",
"aws-sdk": "2.1165.0", "aws-sdk": "2.1165.0",
"bcryptjs": "2.4.3", "bcryptjs": "2.4.3",
"blurhash": "1.1.5", "blurhash": "1.1.5",
@ -146,7 +145,6 @@
"@types/node": "18.7.16", "@types/node": "18.7.16",
"@types/node-fetch": "3.0.3", "@types/node-fetch": "3.0.3",
"@types/nodemailer": "6.4.5", "@types/nodemailer": "6.4.5",
"@types/oauth": "^0.9.1",
"@types/pg": "^8.6.5", "@types/pg": "^8.6.5",
"@types/pug": "2.0.6", "@types/pug": "2.0.6",
"@types/punycode": "2.1.0", "@types/punycode": "2.1.0",

View file

@ -246,57 +246,6 @@ export class Meta {
}) })
public swPrivateKey: string; 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', { @Column('enum', {
enum: TranslationService, enum: TranslationService,
nullable: true, nullable: true,

View file

@ -167,11 +167,6 @@ export class UserProfile {
@JoinColumn() @JoinColumn()
public pinnedPage: Page | null; public pinnedPage: Page | null;
@Column('jsonb', {
default: {},
})
public integrations: Record<string, any>;
@Index() @Index()
@Column('boolean', { @Column('boolean', {
default: false, select: false, default: false, select: false,

View file

@ -387,7 +387,6 @@ export const UserRepository = db.getRepository(User).extend({
hasUnreadMessagingMessage: this.getHasUnreadMessagingMessage(user.id), hasUnreadMessagingMessage: this.getHasUnreadMessagingMessage(user.id),
hasUnreadNotification: this.getHasUnreadNotification(user.id), hasUnreadNotification: this.getHasUnreadNotification(user.id),
hasPendingReceivedFollowRequest: this.getHasPendingReceivedFollowRequest(user.id), hasPendingReceivedFollowRequest: this.getHasPendingReceivedFollowRequest(user.id),
integrations: profile!.integrations,
mutedWords: profile!.mutedWords, mutedWords: profile!.mutedWords,
mutedInstances: profile!.mutedInstances, mutedInstances: profile!.mutedInstances,
mutingNotificationTypes: profile!.mutingNotificationTypes, mutingNotificationTypes: profile!.mutingNotificationTypes,

View file

@ -352,10 +352,6 @@ export const packedMeDetailedOnlySchema = {
type: 'boolean', type: 'boolean',
nullable: false, optional: false, nullable: false, optional: false,
}, },
integrations: {
type: 'object',
nullable: true, optional: false,
},
mutedWords: { mutedWords: {
type: 'array', type: 'array',
nullable: false, optional: false, nullable: false, optional: false,

View file

@ -25,7 +25,7 @@ import { publishInternalEvent } from '@/services/stream.js';
import { db } from '@/db/postgre.js'; import { db } from '@/db/postgre.js';
import { apLogger } from '../logger.js'; import { apLogger } from '../logger.js';
import { fromHtml } from '@/mfm/from-html.js'; import { fromHtml } from '@/mfm/from-html.js';
import { isCollectionOrOrderedCollection, isCollection, IActor, getApId, getOneApHrefNullable, IObject, isPropertyValue, IApPropertyValue, getApType, isActor } from '../type.js'; import { isCollectionOrOrderedCollection, isCollection, IActor, getApId, getOneApHrefNullable, IObject, isPropertyValue, getApType, isActor } from '../type.js';
import Resolver from '../resolver.js'; import Resolver from '../resolver.js';
import { extractApHashtags } from './tag.js'; import { extractApHashtags } from './tag.js';
import { resolveNote, extractEmojis } from './note.js'; import { resolveNote, extractEmojis } from './note.js';
@ -401,37 +401,6 @@ export async function resolvePerson(uri: string, resolver: Resolver): Promise<Ca
return await createPerson(uri, resolver); return await createPerson(uri, resolver);
} }
const services: {
[x: string]: (id: string, username: string) => any
} = {
'misskey:authentication:twitter': (userId, screenName) => ({ userId, screenName }),
'misskey:authentication:github': (id, login) => ({ id, login }),
'misskey:authentication:discord': (id, name) => $discord(id, name),
};
const $discord = (id: string, name: string) => {
if (typeof name !== 'string') {
return { id, username: 'unknown', discriminator: '0000' };
} else {
const [username, discriminator] = name.split('#');
return { id, username, discriminator };
}
};
function addService(target: { [x: string]: any }, source: IApPropertyValue) {
const service = services[source.name];
if (typeof source.value !== 'string') {
source.value = 'unknown';
}
const [id, username] = source.value.split('@');
if (service) {
target[source.name.split(':')[2]] = service(id, username);
}
}
export function analyzeAttachments(attachments: IObject | IObject[] | undefined) { export function analyzeAttachments(attachments: IObject | IObject[] | undefined) {
const fields: { const fields: {
name: string, name: string,
@ -441,14 +410,10 @@ export function analyzeAttachments(attachments: IObject | IObject[] | undefined)
if (Array.isArray(attachments)) { if (Array.isArray(attachments)) {
for (const attachment of attachments.filter(isPropertyValue)) { for (const attachment of attachments.filter(isPropertyValue)) {
if (isPropertyValue(attachment.identifier)) { fields.push({
addService(services, attachment.identifier); name: attachment.name,
} else { value: fromHtml(attachment.value),
fields.push({ });
name: attachment.name,
value: fromHtml(attachment.value),
});
}
} }
} }

View file

@ -102,18 +102,6 @@ export const meta = {
type: 'boolean', type: 'boolean',
optional: false, nullable: false, optional: false, nullable: false,
}, },
enableTwitterIntegration: {
type: 'boolean',
optional: false, nullable: false,
},
enableGithubIntegration: {
type: 'boolean',
optional: false, nullable: false,
},
enableDiscordIntegration: {
type: 'boolean',
optional: false, nullable: false,
},
translatorAvailable: { translatorAvailable: {
type: 'boolean', type: 'boolean',
optional: false, nullable: false, optional: false, nullable: false,
@ -163,30 +151,6 @@ export const meta = {
optional: true, nullable: true, optional: true, nullable: true,
format: 'id', format: 'id',
}, },
twitterConsumerKey: {
type: 'string',
optional: true, nullable: true,
},
twitterConsumerSecret: {
type: 'string',
optional: true, nullable: true,
},
githubClientId: {
type: 'string',
optional: true, nullable: true,
},
githubClientSecret: {
type: 'string',
optional: true, nullable: true,
},
discordClientId: {
type: 'string',
optional: true, nullable: true,
},
discordClientSecret: {
type: 'string',
optional: true, nullable: true,
},
summaryProxy: { summaryProxy: {
type: 'string', type: 'string',
optional: true, nullable: true, optional: true, nullable: true,
@ -324,9 +288,6 @@ export default define(meta, paramDef, async (ps, me) => {
defaultLightTheme: instance.defaultLightTheme, defaultLightTheme: instance.defaultLightTheme,
defaultDarkTheme: instance.defaultDarkTheme, defaultDarkTheme: instance.defaultDarkTheme,
enableEmail: instance.enableEmail, enableEmail: instance.enableEmail,
enableTwitterIntegration: instance.enableTwitterIntegration,
enableGithubIntegration: instance.enableGithubIntegration,
enableDiscordIntegration: instance.enableDiscordIntegration,
pinnedPages: instance.pinnedPages, pinnedPages: instance.pinnedPages,
pinnedClipId: instance.pinnedClipId, pinnedClipId: instance.pinnedClipId,
cacheRemoteFiles: instance.cacheRemoteFiles, cacheRemoteFiles: instance.cacheRemoteFiles,
@ -338,12 +299,6 @@ export default define(meta, paramDef, async (ps, me) => {
hcaptchaSecretKey: instance.hcaptchaSecretKey, hcaptchaSecretKey: instance.hcaptchaSecretKey,
recaptchaSecretKey: instance.recaptchaSecretKey, recaptchaSecretKey: instance.recaptchaSecretKey,
proxyAccountId: instance.proxyAccountId, proxyAccountId: instance.proxyAccountId,
twitterConsumerKey: instance.twitterConsumerKey,
twitterConsumerSecret: instance.twitterConsumerSecret,
githubClientId: instance.githubClientId,
githubClientSecret: instance.githubClientSecret,
discordClientId: instance.discordClientId,
discordClientSecret: instance.discordClientSecret,
summalyProxy: instance.summalyProxy, summalyProxy: instance.summalyProxy,
email: instance.email, email: instance.email,
smtpSecure: instance.smtpSecure, smtpSecure: instance.smtpSecure,

View file

@ -45,11 +45,6 @@ export default define(meta, paramDef, async (ps, me) => {
}; };
} }
const maskedKeys = ['accessToken', 'accessTokenSecret', 'refreshToken'];
Object.keys(profile.integrations).forEach(integration => {
maskedKeys.forEach(key => profile.integrations[integration][key] = '<MASKED>');
});
const signins = await Signins.findBy({ userId: user.id }); const signins = await Signins.findBy({ userId: user.id });
return { return {
@ -61,7 +56,6 @@ export default define(meta, paramDef, async (ps, me) => {
carefulBot: profile.carefulBot, carefulBot: profile.carefulBot,
injectFeaturedNote: profile.injectFeaturedNote, injectFeaturedNote: profile.injectFeaturedNote,
receiveAnnouncementEmail: profile.receiveAnnouncementEmail, receiveAnnouncementEmail: profile.receiveAnnouncementEmail,
integrations: profile.integrations,
mutedWords: profile.mutedWords, mutedWords: profile.mutedWords,
mutedInstances: profile.mutedInstances, mutedInstances: profile.mutedInstances,
mutingNotificationTypes: profile.mutingNotificationTypes, mutingNotificationTypes: profile.mutingNotificationTypes,

View file

@ -60,15 +60,6 @@ export const paramDef = {
deeplAuthKey: { type: 'string', nullable: true }, deeplAuthKey: { type: 'string', nullable: true },
libreTranslateAuthKey: { type: 'string', nullable: true }, libreTranslateAuthKey: { type: 'string', nullable: true },
libreTranslateEndpoint: { type: 'string', nullable: true }, libreTranslateEndpoint: { type: 'string', nullable: true },
enableTwitterIntegration: { type: 'boolean' },
twitterConsumerKey: { type: 'string', nullable: true },
twitterConsumerSecret: { type: 'string', nullable: true },
enableGithubIntegration: { type: 'boolean' },
githubClientId: { type: 'string', nullable: true },
githubClientSecret: { type: 'string', nullable: true },
enableDiscordIntegration: { type: 'boolean' },
discordClientId: { type: 'string', nullable: true },
discordClientSecret: { type: 'string', nullable: true },
enableEmail: { type: 'boolean' }, enableEmail: { type: 'boolean' },
email: { type: 'string', nullable: true }, email: { type: 'string', nullable: true },
smtpSecure: { type: 'boolean' }, smtpSecure: { type: 'boolean' },
@ -230,42 +221,6 @@ export default define(meta, paramDef, async (ps, me) => {
set.summalyProxy = ps.summalyProxy; set.summalyProxy = ps.summalyProxy;
} }
if (ps.enableTwitterIntegration !== undefined) {
set.enableTwitterIntegration = ps.enableTwitterIntegration;
}
if (ps.twitterConsumerKey !== undefined) {
set.twitterConsumerKey = ps.twitterConsumerKey;
}
if (ps.twitterConsumerSecret !== undefined) {
set.twitterConsumerSecret = ps.twitterConsumerSecret;
}
if (ps.enableGithubIntegration !== undefined) {
set.enableGithubIntegration = ps.enableGithubIntegration;
}
if (ps.githubClientId !== undefined) {
set.githubClientId = ps.githubClientId;
}
if (ps.githubClientSecret !== undefined) {
set.githubClientSecret = ps.githubClientSecret;
}
if (ps.enableDiscordIntegration !== undefined) {
set.enableDiscordIntegration = ps.enableDiscordIntegration;
}
if (ps.discordClientId !== undefined) {
set.discordClientId = ps.discordClientId;
}
if (ps.discordClientSecret !== undefined) {
set.discordClientSecret = ps.discordClientSecret;
}
if (ps.enableEmail !== undefined) { if (ps.enableEmail !== undefined) {
set.enableEmail = ps.enableEmail; set.enableEmail = ps.enableEmail;
} }

View file

@ -170,18 +170,6 @@ export const meta = {
type: 'boolean', type: 'boolean',
optional: false, nullable: false, optional: false, nullable: false,
}, },
enableTwitterIntegration: {
type: 'boolean',
optional: false, nullable: false,
},
enableGithubIntegration: {
type: 'boolean',
optional: false, nullable: false,
},
enableDiscordIntegration: {
type: 'boolean',
optional: false, nullable: false,
},
translatorAvailable: { translatorAvailable: {
type: 'boolean', type: 'boolean',
optional: false, nullable: false, optional: false, nullable: false,
@ -222,18 +210,6 @@ export const meta = {
type: 'boolean', type: 'boolean',
optional: false, nullable: false, optional: false, nullable: false,
}, },
twitter: {
type: 'boolean',
optional: false, nullable: false,
},
github: {
type: 'boolean',
optional: false, nullable: false,
},
discord: {
type: 'boolean',
optional: false, nullable: false,
},
serviceWorker: { serviceWorker: {
type: 'boolean', type: 'boolean',
optional: true, nullable: false, optional: true, nullable: false,
@ -314,10 +290,6 @@ export default define(meta, paramDef, async (ps, me) => {
defaultDarkTheme: instance.defaultDarkTheme, defaultDarkTheme: instance.defaultDarkTheme,
enableEmail: instance.enableEmail, enableEmail: instance.enableEmail,
enableTwitterIntegration: instance.enableTwitterIntegration,
enableGithubIntegration: instance.enableGithubIntegration,
enableDiscordIntegration: instance.enableDiscordIntegration,
translatorAvailable: translatorAvailable(instance), translatorAvailable: translatorAvailable(instance),
pinnedPages: instance.pinnedPages, pinnedPages: instance.pinnedPages,
@ -338,9 +310,6 @@ export default define(meta, paramDef, async (ps, me) => {
hcaptcha: instance.enableHcaptcha, hcaptcha: instance.enableHcaptcha,
recaptcha: instance.enableRecaptcha, recaptcha: instance.enableRecaptcha,
objectStorage: instance.useObjectStorage, objectStorage: instance.useObjectStorage,
twitter: instance.enableTwitterIntegration,
github: instance.enableGithubIntegration,
discord: instance.enableDiscordIntegration,
serviceWorker: true, serviceWorker: true,
miauth: true, miauth: true,
}, },

View file

@ -16,9 +16,6 @@ import signup from './private/signup.js';
import signin from './private/signin.js'; import signin from './private/signin.js';
import signupPending from './private/signup-pending.js'; import signupPending from './private/signup-pending.js';
import { oauth } from './common/oauth.js'; import { oauth } from './common/oauth.js';
import discord from './service/discord.js';
import github from './service/github.js';
import twitter from './service/twitter.js';
// Init app // Init app
const app = new Koa(); const app = new Koa();
@ -82,10 +79,6 @@ router.post('/signup', signup);
router.post('/signin', signin); router.post('/signin', signin);
router.post('/signup-pending', signupPending); router.post('/signup-pending', signupPending);
router.use(discord.routes());
router.use(github.routes());
router.use(twitter.routes());
router.get('/v1/instance/peers', async ctx => { router.get('/v1/instance/peers', async ctx => {
const instances = await Instances.find({ const instances = await Instances.find({
select: ['host'], select: ['host'],

View file

@ -1,294 +0,0 @@
import Koa from 'koa';
import Router from '@koa/router';
import { OAuth2 } from 'oauth';
import { v4 as uuid } from 'uuid';
import { IsNull } from 'typeorm';
import { getJson } from '@/misc/fetch.js';
import config from '@/config/index.js';
import { publishMainStream } from '@/services/stream.js';
import { fetchMeta } from '@/misc/fetch-meta.js';
import { Users, UserProfiles } from '@/models/index.js';
import { ILocalUser } from '@/models/entities/user.js';
import { redisClient } from '@/db/redis.js';
import { I18n } from '@/misc/i18n.js';
import signin from '../common/signin.js';
function getUserToken(ctx: Koa.BaseContext): string | null {
return ((ctx.headers['cookie'] || '').match(/igi=(\w+)/) || [null, null])[1];
}
function compareOrigin(ctx: Koa.BaseContext): boolean {
function normalizeUrl(url?: string): string {
return url ? url.endsWith('/') ? url.substr(0, url.length - 1) : url : '';
}
const referer = ctx.headers['referer'];
return (normalizeUrl(referer) === normalizeUrl(config.url));
}
// Init router
const router = new Router();
router.get('/disconnect/discord', async ctx => {
if (!compareOrigin(ctx)) {
ctx.throw(400, 'invalid origin');
return;
}
const userToken = getUserToken(ctx);
if (!userToken) {
ctx.throw(400, 'signin required');
return;
}
const user = await Users.findOneByOrFail({
host: IsNull(),
token: userToken,
});
const profile = await UserProfiles.findOneByOrFail({ userId: user.id });
const i18n = new I18n(profile.lang ?? 'en-US');
delete profile.integrations.discord;
await UserProfiles.update(user.id, {
integrations: profile.integrations,
});
ctx.body = i18n.t('_services._discord.disconnected');
// Publish i updated event
publishMainStream(user.id, 'meUpdated', await Users.pack(user, user, {
detail: true,
includeSecrets: true,
}));
});
async function getOAuth2() {
const meta = await fetchMeta(true);
if (meta.enableDiscordIntegration) {
return new OAuth2(
meta.discordClientId!,
meta.discordClientSecret!,
'https://discord.com/',
'api/oauth2/authorize',
'api/oauth2/token');
} else {
return null;
}
}
router.get('/connect/discord', async ctx => {
if (!compareOrigin(ctx)) {
ctx.throw(400, 'invalid origin');
return;
}
const userToken = getUserToken(ctx);
if (!userToken) {
ctx.throw(400, 'signin required');
return;
}
const params = {
redirect_uri: `${config.url}/api/dc/cb`,
scope: ['identify'],
state: uuid(),
response_type: 'code',
};
redisClient.set(userToken, JSON.stringify(params));
const oauth2 = await getOAuth2();
ctx.redirect(oauth2!.getAuthorizeUrl(params));
});
router.get('/signin/discord', async ctx => {
const sessid = uuid();
const params = {
redirect_uri: `${config.url}/api/dc/cb`,
scope: ['identify'],
state: uuid(),
response_type: 'code',
};
ctx.cookies.set('signin_with_discord_sid', sessid, {
path: '/',
secure: config.url.startsWith('https'),
httpOnly: true,
});
redisClient.set(sessid, JSON.stringify(params));
const oauth2 = await getOAuth2();
ctx.redirect(oauth2!.getAuthorizeUrl(params));
});
router.get('/dc/cb', async ctx => {
const userToken = getUserToken(ctx);
const oauth2 = await getOAuth2();
if (!userToken) {
const sessid = ctx.cookies.get('signin_with_discord_sid');
if (!sessid) {
ctx.throw(400, 'invalid session');
return;
}
const code = ctx.query.code;
if (!code || typeof code !== 'string') {
ctx.throw(400, 'invalid session');
return;
}
const { redirect_uri, state } = await new Promise<any>((res, rej) => {
redisClient.get(sessid, async (_, state) => {
res(JSON.parse(state));
});
});
if (ctx.query.state !== state) {
ctx.throw(400, 'invalid session');
return;
}
const { accessToken, refreshToken, expiresDate } = await new Promise<any>((res, rej) =>
oauth2!.getOAuthAccessToken(code, {
grant_type: 'authorization_code',
redirect_uri,
}, (err, accessToken, refreshToken, result) => {
if (err) {
rej(err);
} else if (result.error) {
rej(result.error);
} else {
res({
accessToken,
refreshToken,
expiresDate: Date.now() + Number(result.expires_in) * 1000,
});
}
}));
const { id, username, discriminator } = (await getJson('https://discord.com/api/users/@me', '*/*', 10 * 1000, {
'Authorization': `Bearer ${accessToken}`,
})) as Record<string, unknown>;
if (typeof id !== 'string' || typeof username !== 'string' || typeof discriminator !== 'string') {
ctx.throw(400, 'invalid session');
return;
}
const profile = await UserProfiles.createQueryBuilder()
.where('"integrations"->\'discord\'->>\'id\' = :id', { id })
.andWhere('"userHost" IS NULL')
.getOne();
if (profile == null) {
ctx.throw(404, `There were no FoundKey accounts linked to @${username}#${discriminator}...`);
return;
}
await UserProfiles.update(profile.userId, {
integrations: {
...profile.integrations,
discord: {
id,
accessToken,
refreshToken,
expiresDate,
username,
discriminator,
},
},
});
signin(ctx, await Users.findOneBy({ id: profile.userId }) as ILocalUser, true);
} else {
const code = ctx.query.code;
if (!code || typeof code !== 'string') {
ctx.throw(400, 'invalid session');
return;
}
const { redirect_uri, state } = await new Promise<any>((res, rej) => {
redisClient.get(userToken, async (_, state) => {
res(JSON.parse(state));
});
});
if (ctx.query.state !== state) {
ctx.throw(400, 'invalid session');
return;
}
const { accessToken, refreshToken, expiresDate } = await new Promise<any>((res, rej) =>
oauth2!.getOAuthAccessToken(code, {
grant_type: 'authorization_code',
redirect_uri,
}, (err, accessToken, refreshToken, result) => {
if (err) {
rej(err);
} else if (result.error) {
rej(result.error);
} else {
res({
accessToken,
refreshToken,
expiresDate: Date.now() + Number(result.expires_in) * 1000,
});
}
}));
const { id, username, discriminator } = (await getJson('https://discord.com/api/users/@me', '*/*', 10 * 1000, {
'Authorization': `Bearer ${accessToken}`,
})) as Record<string, unknown>;
if (typeof id !== 'string' || typeof username !== 'string' || typeof discriminator !== 'string') {
ctx.throw(400, 'invalid session');
return;
}
const user = await Users.findOneByOrFail({
host: IsNull(),
token: userToken,
});
const profile = await UserProfiles.findOneByOrFail({ userId: user.id });
const i18n = new I18n(profile.lang ?? 'en-US');
await UserProfiles.update(user.id, {
integrations: {
...profile.integrations,
discord: {
accessToken,
refreshToken,
expiresDate,
id,
username,
discriminator,
},
},
});
ctx.body = i18n.t('_services._discord.connected', {
username,
discriminator,
mkUsername: user.username,
});
// Publish i updated event
publishMainStream(user.id, 'meUpdated', await Users.pack(user, user, {
detail: true,
includeSecrets: true,
}));
}
});
export default router;

View file

@ -1,265 +0,0 @@
import Koa from 'koa';
import Router from '@koa/router';
import { OAuth2 } from 'oauth';
import { v4 as uuid } from 'uuid';
import { IsNull } from 'typeorm';
import { getJson } from '@/misc/fetch.js';
import config from '@/config/index.js';
import { publishMainStream } from '@/services/stream.js';
import { fetchMeta } from '@/misc/fetch-meta.js';
import { Users, UserProfiles } from '@/models/index.js';
import { ILocalUser } from '@/models/entities/user.js';
import { redisClient } from '@/db/redis.js';
import signin from '../common/signin.js';
import { I18n } from '@/misc/i18n.js';
function getUserToken(ctx: Koa.BaseContext): string | null {
return ((ctx.headers['cookie'] || '').match(/igi=(\w+)/) || [null, null])[1];
}
function compareOrigin(ctx: Koa.BaseContext): boolean {
function normalizeUrl(url?: string): string {
return url ? url.endsWith('/') ? url.substr(0, url.length - 1) : url : '';
}
const referer = ctx.headers['referer'];
return (normalizeUrl(referer) === normalizeUrl(config.url));
}
// Init router
const router = new Router();
router.get('/disconnect/github', async ctx => {
if (!compareOrigin(ctx)) {
ctx.throw(400, 'invalid origin');
return;
}
const userToken = getUserToken(ctx);
if (!userToken) {
ctx.throw(400, 'signin required');
return;
}
const user = await Users.findOneByOrFail({
host: IsNull(),
token: userToken,
});
const profile = await UserProfiles.findOneByOrFail({ userId: user.id });
const i18n = new I18n(profile.lang ?? 'en-US');
delete profile.integrations.github;
await UserProfiles.update(user.id, {
integrations: profile.integrations,
});
ctx.body = i18n.t('_services._github.disconnected');
// Publish i updated event
publishMainStream(user.id, 'meUpdated', await Users.pack(user, user, {
detail: true,
includeSecrets: true,
}));
});
async function getOath2() {
const meta = await fetchMeta(true);
if (meta.enableGithubIntegration && meta.githubClientId && meta.githubClientSecret) {
return new OAuth2(
meta.githubClientId,
meta.githubClientSecret,
'https://github.com/',
'login/oauth/authorize',
'login/oauth/access_token');
} else {
return null;
}
}
router.get('/connect/github', async ctx => {
if (!compareOrigin(ctx)) {
ctx.throw(400, 'invalid origin');
return;
}
const userToken = getUserToken(ctx);
if (!userToken) {
ctx.throw(400, 'signin required');
return;
}
const params = {
redirect_uri: `${config.url}/api/gh/cb`,
scope: ['read:user'],
state: uuid(),
};
redisClient.set(userToken, JSON.stringify(params));
const oauth2 = await getOath2();
ctx.redirect(oauth2!.getAuthorizeUrl(params));
});
router.get('/signin/github', async ctx => {
const sessid = uuid();
const params = {
redirect_uri: `${config.url}/api/gh/cb`,
scope: ['read:user'],
state: uuid(),
};
ctx.cookies.set('signin_with_github_sid', sessid, {
path: '/',
secure: config.url.startsWith('https'),
httpOnly: true,
});
redisClient.set(sessid, JSON.stringify(params));
const oauth2 = await getOath2();
ctx.redirect(oauth2!.getAuthorizeUrl(params));
});
router.get('/gh/cb', async ctx => {
const userToken = getUserToken(ctx);
const oauth2 = await getOath2();
if (!userToken) {
const sessid = ctx.cookies.get('signin_with_github_sid');
if (!sessid) {
ctx.throw(400, 'invalid session');
return;
}
const code = ctx.query.code;
if (!code || typeof code !== 'string') {
ctx.throw(400, 'invalid session');
return;
}
const { redirect_uri, state } = await new Promise<any>((res, rej) => {
redisClient.get(sessid, async (_, state) => {
res(JSON.parse(state));
});
});
if (ctx.query.state !== state) {
ctx.throw(400, 'invalid session');
return;
}
const { accessToken } = await new Promise<any>((res, rej) =>
oauth2!.getOAuthAccessToken(code, {
redirect_uri,
}, (err, accessToken, refresh, result) => {
if (err) {
rej(err);
} else if (result.error) {
rej(result.error);
} else {
res({ accessToken });
}
}));
const { login, id } = (await getJson('https://api.github.com/user', 'application/vnd.github.v3+json', 10 * 1000, {
'Authorization': `bearer ${accessToken}`,
})) as Record<string, unknown>;
if (typeof login !== 'string' || typeof id !== 'string') {
ctx.throw(400, 'invalid session');
return;
}
const link = await UserProfiles.createQueryBuilder()
.where('"integrations"->\'github\'->>\'id\' = :id', { id })
.andWhere('"userHost" IS NULL')
.getOne();
if (link == null) {
ctx.throw(404, `There were no FoundKey accounts linked to @${login}...`);
return;
}
signin(ctx, await Users.findOneBy({ id: link.userId }) as ILocalUser, true);
} else {
const code = ctx.query.code;
if (!code || typeof code !== 'string') {
ctx.throw(400, 'invalid session');
return;
}
const { redirect_uri, state } = await new Promise<any>((res, rej) => {
redisClient.get(userToken, async (_, state) => {
res(JSON.parse(state));
});
});
if (ctx.query.state !== state) {
ctx.throw(400, 'invalid session');
return;
}
const { accessToken } = await new Promise<any>((res, rej) =>
oauth2!.getOAuthAccessToken(
code,
{ redirect_uri },
(err, accessToken, refresh, result) => {
if (err) {
rej(err);
} else if (result.error) {
rej(result.error);
} else {
res({ accessToken });
}
}));
const { login, id } = (await getJson('https://api.github.com/user', 'application/vnd.github.v3+json', 10 * 1000, {
'Authorization': `bearer ${accessToken}`,
})) as Record<string, unknown>;
if (typeof login !== 'string' || typeof id !== 'string') {
ctx.throw(400, 'invalid session');
return;
}
const user = await Users.findOneByOrFail({
host: IsNull(),
token: userToken,
});
const profile = await UserProfiles.findOneByOrFail({ userId: user.id });
const i18n = new I18n(profile.lang ?? 'en-US');
await UserProfiles.update(user.id, {
integrations: {
...profile.integrations,
github: {
accessToken,
id,
login,
},
},
});
ctx.body = i18n.t('_services._github.connected', {
login,
userName: user.username,
});
// Publish i updated event
publishMainStream(user.id, 'meUpdated', await Users.pack(user, user, {
detail: true,
includeSecrets: true,
}));
}
});
export default router;

View file

@ -1,207 +0,0 @@
import Koa from 'koa';
import Router from '@koa/router';
import { v4 as uuid } from 'uuid';
import autwh from 'autwh';
import { IsNull } from 'typeorm';
import { publishMainStream } from '@/services/stream.js';
import config from '@/config/index.js';
import { fetchMeta } from '@/misc/fetch-meta.js';
import { Users, UserProfiles } from '@/models/index.js';
import { ILocalUser } from '@/models/entities/user.js';
import { redisClient } from '@/db/redis.js';
import signin from '../common/signin.js';
import { I18n } from '@/misc/i18n.js';
function getUserToken(ctx: Koa.BaseContext): string | null {
return ((ctx.headers['cookie'] || '').match(/igi=(\w+)/) || [null, null])[1];
}
function compareOrigin(ctx: Koa.BaseContext): boolean {
function normalizeUrl(url?: string): string {
return url == null ? '' : url.endsWith('/') ? url.substr(0, url.length - 1) : url;
}
const referer = ctx.headers['referer'];
return (normalizeUrl(referer) === normalizeUrl(config.url));
}
// Init router
const router = new Router();
router.get('/disconnect/twitter', async ctx => {
if (!compareOrigin(ctx)) {
ctx.throw(400, 'invalid origin');
return;
}
const userToken = getUserToken(ctx);
if (userToken == null) {
ctx.throw(400, 'signin required');
return;
}
const user = await Users.findOneByOrFail({
host: IsNull(),
token: userToken,
});
const profile = await UserProfiles.findOneByOrFail({ userId: user.id });
const i18n = new I18n(profile.lang ?? 'en-US');
delete profile.integrations.twitter;
await UserProfiles.update(user.id, {
integrations: profile.integrations,
});
ctx.body = i18n.t('_services._twitter.disconnected');
// Publish i updated event
publishMainStream(user.id, 'meUpdated', await Users.pack(user, user, {
detail: true,
includeSecrets: true,
}));
});
async function getTwAuth() {
const meta = await fetchMeta(true);
if (meta.enableTwitterIntegration && meta.twitterConsumerKey && meta.twitterConsumerSecret) {
return autwh({
consumerKey: meta.twitterConsumerKey,
consumerSecret: meta.twitterConsumerSecret,
callbackUrl: `${config.url}/api/tw/cb`,
});
} else {
return null;
}
}
router.get('/connect/twitter', async ctx => {
if (!compareOrigin(ctx)) {
ctx.throw(400, 'invalid origin');
return;
}
const userToken = getUserToken(ctx);
if (userToken == null) {
ctx.throw(400, 'signin required');
return;
}
const twAuth = await getTwAuth();
const twCtx = await twAuth!.begin();
redisClient.set(userToken, JSON.stringify(twCtx));
ctx.redirect(twCtx.url);
});
router.get('/signin/twitter', async ctx => {
const twAuth = await getTwAuth();
const twCtx = await twAuth!.begin();
const sessid = uuid();
redisClient.set(sessid, JSON.stringify(twCtx));
ctx.cookies.set('signin_with_twitter_sid', sessid, {
path: '/',
secure: config.url.startsWith('https'),
httpOnly: true,
});
ctx.redirect(twCtx.url);
});
router.get('/tw/cb', async ctx => {
const userToken = getUserToken(ctx);
const twAuth = await getTwAuth();
if (userToken == null) {
const sessid = ctx.cookies.get('signin_with_twitter_sid');
if (sessid == null) {
ctx.throw(400, 'invalid session');
return;
}
const get = new Promise<any>((res, rej) => {
redisClient.get(sessid, async (_, twCtx) => {
res(twCtx);
});
});
const twCtx = await get;
const verifier = ctx.query.oauth_verifier;
if (!verifier || typeof verifier !== 'string') {
ctx.throw(400, 'invalid session');
return;
}
const result = await twAuth!.done(JSON.parse(twCtx), verifier);
const link = await UserProfiles.createQueryBuilder()
.where('"integrations"->\'twitter\'->>\'userId\' = :id', { id: result.userId })
.andWhere('"userHost" IS NULL')
.getOne();
if (link == null) {
ctx.throw(404, `There were no FoundKey accounts linked to @${result.screenName}...`);
return;
}
signin(ctx, await Users.findOneBy({ id: link.userId }) as ILocalUser, true);
} else {
const verifier = ctx.query.oauth_verifier;
if (!verifier || typeof verifier !== 'string') {
ctx.throw(400, 'invalid session');
return;
}
const get = new Promise<any>((res, rej) => {
redisClient.get(userToken, async (_, twCtx) => {
res(twCtx);
});
});
const twCtx = await get;
const result = await twAuth!.done(JSON.parse(twCtx), verifier);
const user = await Users.findOneByOrFail({
host: IsNull(),
token: userToken,
});
const profile = await UserProfiles.findOneByOrFail({ userId: user.id });
const i18n = new I18n(profile.lang ?? 'en-US');
await UserProfiles.update(user.id, {
integrations: {
...profile.integrations,
twitter: {
accessToken: result.accessToken,
accessTokenSecret: result.accessTokenSecret,
userId: result.userId,
screenName: result.screenName,
},
},
});
ctx.body = i18n.t('_services._twitter.connected', {
twitterUserName: result.screenName,
userName: user.username,
});
// Publish i updated event
publishMainStream(user.id, 'meUpdated', await Users.pack(user, user, {
detail: true,
includeSecrets: true,
}));
}
});
export default router;

View file

@ -97,9 +97,6 @@ const nodeinfo2 = async (): Promise<NodeInfo2Base> => {
enableHcaptcha: meta.enableHcaptcha, enableHcaptcha: meta.enableHcaptcha,
enableRecaptcha: meta.enableRecaptcha, enableRecaptcha: meta.enableRecaptcha,
maxNoteTextLength: config.maxNoteTextLength, maxNoteTextLength: config.maxNoteTextLength,
enableTwitterIntegration: meta.enableTwitterIntegration,
enableGithubIntegration: meta.enableGithubIntegration,
enableDiscordIntegration: meta.enableDiscordIntegration,
enableEmail: meta.enableEmail, enableEmail: meta.enableEmail,
proxyAccountName: proxyAccount?.username ?? null, proxyAccountName: proxyAccount?.username ?? null,
themeColor: meta.themeColor || '#86b300', themeColor: meta.themeColor || '#86b300',

View file

@ -18,7 +18,6 @@
"abort-controller": "3.0.0", "abort-controller": "3.0.0",
"autobind-decorator": "2.4.0", "autobind-decorator": "2.4.0",
"autosize": "5.0.1", "autosize": "5.0.1",
"autwh": "0.1.0",
"blurhash": "1.1.5", "blurhash": "1.1.5",
"broadcast-channel": "4.13.0", "broadcast-channel": "4.13.0",
"browser-image-resizer": "2.4.1", "browser-image-resizer": "2.4.1",
@ -86,7 +85,6 @@
"@types/katex": "0.14.0", "@types/katex": "0.14.0",
"@types/matter-js": "0.17.7", "@types/matter-js": "0.17.7",
"@types/mocha": "9.1.1", "@types/mocha": "9.1.1",
"@types/oauth": "0.9.1",
"@types/punycode": "2.1.0", "@types/punycode": "2.1.0",
"@types/qrcode": "1.5.0", "@types/qrcode": "1.5.0",
"@types/seedrandom": "3.0.2", "@types/seedrandom": "3.0.2",

View file

@ -39,11 +39,6 @@
</div> </div>
</div> </div>
</div> </div>
<div class="social _section">
<a v-if="meta && meta.enableTwitterIntegration" class="_borderButton _gap" :href="`${apiUrl}/signin/twitter`"><i class="fab fa-twitter" style="margin-right: 4px;"></i>{{ i18n.t('signinWith', { x: 'Twitter' }) }}</a>
<a v-if="meta && meta.enableGithubIntegration" class="_borderButton _gap" :href="`${apiUrl}/signin/github`"><i class="fab fa-github" style="margin-right: 4px;"></i>{{ i18n.t('signinWith', { x: 'GitHub' }) }}</a>
<a v-if="meta && meta.enableDiscordIntegration" class="_borderButton _gap" :href="`${apiUrl}/signin/discord`"><i class="fab fa-discord" style="margin-right: 4px;"></i>{{ i18n.t('signinWith', { x: 'Discord' }) }}</a>
</div>
</form> </form>
</template> </template>

View file

@ -157,11 +157,6 @@ const menuDef = $computed(() => [{
text: i18n.ts.relays, text: i18n.ts.relays,
to: '/admin/relays', to: '/admin/relays',
active: props.initialPage === 'relays', active: props.initialPage === 'relays',
}, {
icon: 'fas fa-share-alt',
text: i18n.ts.integration,
to: '/admin/integrations',
active: props.initialPage === 'integrations',
}, { }, {
icon: 'fas fa-ban', icon: 'fas fa-ban',
text: i18n.ts.instanceBlocking, text: i18n.ts.instanceBlocking,
@ -204,7 +199,6 @@ const component = $computed(() => {
case 'object-storage': return defineAsyncComponent(() => import('./object-storage.vue')); case 'object-storage': return defineAsyncComponent(() => import('./object-storage.vue'));
case 'security': return defineAsyncComponent(() => import('./security.vue')); case 'security': return defineAsyncComponent(() => import('./security.vue'));
case 'relays': return defineAsyncComponent(() => import('./relays.vue')); case 'relays': return defineAsyncComponent(() => import('./relays.vue'));
case 'integrations': return defineAsyncComponent(() => import('./integrations.vue'));
case 'instance-block': return defineAsyncComponent(() => import('./instance-block.vue')); case 'instance-block': return defineAsyncComponent(() => import('./instance-block.vue'));
case 'proxy-account': return defineAsyncComponent(() => import('./proxy-account.vue')); case 'proxy-account': return defineAsyncComponent(() => import('./proxy-account.vue'));
case 'translation-settings': return defineAsyncComponent(() => import('./translation-settings.vue')); case 'translation-settings': return defineAsyncComponent(() => import('./translation-settings.vue'));

View file

@ -1,59 +0,0 @@
<template>
<FormSuspense :p="init">
<div class="_formRoot">
<FormSwitch v-model="enableDiscordIntegration" class="_formBlock">
<template #label>{{ i18n.ts.enable }}</template>
</FormSwitch>
<template v-if="enableDiscordIntegration">
<FormInfo class="_formBlock">Callback URL: {{ `${uri}/api/dc/cb` }}</FormInfo>
<FormInput v-model="discordClientId" class="_formBlock">
<template #prefix><i class="fas fa-key"></i></template>
<template #label>Client ID</template>
</FormInput>
<FormInput v-model="discordClientSecret" class="_formBlock">
<template #prefix><i class="fas fa-key"></i></template>
<template #label>Client Secret</template>
</FormInput>
</template>
<FormButton primary class="_formBlock" @click="save"><i class="fas fa-save"></i> {{ i18n.ts.save }}</FormButton>
</div>
</FormSuspense>
</template>
<script lang="ts" setup>
import FormSwitch from '@/components/form/switch.vue';
import FormInput from '@/components/form/input.vue';
import FormButton from '@/components/ui/button.vue';
import FormInfo from '@/components/ui/info.vue';
import FormSuspense from '@/components/form/suspense.vue';
import * as os from '@/os';
import { fetchInstance } from '@/instance';
import { i18n } from '@/i18n';
let uri: string = $ref('');
let enableDiscordIntegration: boolean = $ref(false);
let discordClientId: string | null = $ref(null);
let discordClientSecret: string | null = $ref(null);
async function init() {
const meta = await os.api('admin/meta');
uri = meta.uri;
enableDiscordIntegration = meta.enableDiscordIntegration;
discordClientId = meta.discordClientId;
discordClientSecret = meta.discordClientSecret;
}
function save() {
os.apiWithDialog('admin/update-meta', {
enableDiscordIntegration,
discordClientId,
discordClientSecret,
}).then(() => {
fetchInstance();
});
}
</script>

View file

@ -1,59 +0,0 @@
<template>
<FormSuspense :p="init">
<div class="_formRoot">
<FormSwitch v-model="enableGithubIntegration" class="_formBlock">
<template #label>{{ i18n.ts.enable }}</template>
</FormSwitch>
<template v-if="enableGithubIntegration">
<FormInfo class="_formBlock">Callback URL: {{ `${uri}/api/gh/cb` }}</FormInfo>
<FormInput v-model="githubClientId" class="_formBlock">
<template #prefix><i class="fas fa-key"></i></template>
<template #label>Client ID</template>
</FormInput>
<FormInput v-model="githubClientSecret" class="_formBlock">
<template #prefix><i class="fas fa-key"></i></template>
<template #label>Client Secret</template>
</FormInput>
</template>
<FormButton primary class="_formBlock" @click="save"><i class="fas fa-save"></i> {{ i18n.ts.save }}</FormButton>
</div>
</FormSuspense>
</template>
<script lang="ts" setup>
import FormSwitch from '@/components/form/switch.vue';
import FormInput from '@/components/form/input.vue';
import FormButton from '@/components/ui/button.vue';
import FormInfo from '@/components/ui/info.vue';
import FormSuspense from '@/components/form/suspense.vue';
import * as os from '@/os';
import { fetchInstance } from '@/instance';
import { i18n } from '@/i18n';
let uri: string = $ref('');
let enableGithubIntegration: boolean = $ref(false);
let githubClientId: string | null = $ref(null);
let githubClientSecret: string | null = $ref(null);
async function init() {
const meta = await os.api('admin/meta');
uri = meta.uri;
enableGithubIntegration = meta.enableGithubIntegration;
githubClientId = meta.githubClientId;
githubClientSecret = meta.githubClientSecret;
}
function save() {
os.apiWithDialog('admin/update-meta', {
enableGithubIntegration,
githubClientId,
githubClientSecret,
}).then(() => {
fetchInstance();
});
}
</script>

View file

@ -1,59 +0,0 @@
<template>
<FormSuspense :p="init">
<div class="_formRoot">
<FormSwitch v-model="enableTwitterIntegration" class="_formBlock">
<template #label>{{ i18n.ts.enable }}</template>
</FormSwitch>
<template v-if="enableTwitterIntegration">
<FormInfo class="_formBlock">Callback URL: {{ `${uri}/api/tw/cb` }}</FormInfo>
<FormInput v-model="twitterConsumerKey" class="_formBlock">
<template #prefix><i class="fas fa-key"></i></template>
<template #label>Consumer Key</template>
</FormInput>
<FormInput v-model="twitterConsumerSecret" class="_formBlock">
<template #prefix><i class="fas fa-key"></i></template>
<template #label>Consumer Secret</template>
</FormInput>
</template>
<FormButton primary class="_formBlock" @click="save"><i class="fas fa-save"></i> {{ i18n.ts.save }}</FormButton>
</div>
</FormSuspense>
</template>
<script lang="ts" setup>
import FormSwitch from '@/components/form/switch.vue';
import FormInput from '@/components/form/input.vue';
import FormButton from '@/components/ui/button.vue';
import FormInfo from '@/components/ui/info.vue';
import FormSuspense from '@/components/form/suspense.vue';
import * as os from '@/os';
import { fetchInstance } from '@/instance';
import { i18n } from '@/i18n';
let uri: string = $ref('');
let enableTwitterIntegration: boolean = $ref(false);
let twitterConsumerKey: string | null = $ref(null);
let twitterConsumerSecret: string | null = $ref(null);
async function init() {
const meta = await os.api('admin/meta');
uri = meta.uri;
enableTwitterIntegration = meta.enableTwitterIntegration;
twitterConsumerKey = meta.twitterConsumerKey;
twitterConsumerSecret = meta.twitterConsumerSecret;
}
function save() {
os.apiWithDialog('admin/update-meta', {
enableTwitterIntegration,
twitterConsumerKey,
twitterConsumerSecret,
}).then(() => {
fetchInstance();
});
}
</script>

View file

@ -1,54 +0,0 @@
<template>
<MkStickyContainer>
<template #header><MkPageHeader/></template>
<MkSpacer :content-max="700" :margin-min="16" :margin-max="32">
<FormSuspense :p="init">
<FormFolder class="_formBlock">
<template #icon><i class="fab fa-twitter"></i></template>
<template #label>Twitter</template>
<template #suffix>{{ enableTwitterIntegration ? i18n.ts.enabled : i18n.ts.disabled }}</template>
<XTwitter/>
</FormFolder>
<FormFolder class="_formBlock">
<template #icon><i class="fab fa-github"></i></template>
<template #label>GitHub</template>
<template #suffix>{{ enableGithubIntegration ? i18n.ts.enabled : i18n.ts.disabled }}</template>
<XGithub/>
</FormFolder>
<FormFolder class="_formBlock">
<template #icon><i class="fab fa-discord"></i></template>
<template #label>Discord</template>
<template #suffix>{{ enableDiscordIntegration ? i18n.ts.enabled : i18n.ts.disabled }}</template>
<XDiscord/>
</FormFolder>
</FormSuspense>
</MkSpacer>
</MkStickyContainer>
</template>
<script lang="ts" setup>
import XTwitter from './integrations.twitter.vue';
import XGithub from './integrations.github.vue';
import XDiscord from './integrations.discord.vue';
import FormSuspense from '@/components/form/suspense.vue';
import FormFolder from '@/components/form/folder.vue';
import * as os from '@/os';
import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata';
let enableTwitterIntegration: boolean = $ref(false);
let enableGithubIntegration: boolean = $ref(false);
let enableDiscordIntegration: boolean = $ref(false);
async function init() {
const meta = await os.api('admin/meta');
enableTwitterIntegration = meta.enableTwitterIntegration;
enableGithubIntegration = meta.enableGithubIntegration;
enableDiscordIntegration = meta.enableDiscordIntegration;
}
definePageMetadata({
title: i18n.ts.integration,
icon: 'fas fa-share-alt',
});
</script>

View file

@ -89,11 +89,6 @@ const menuDef = computed(() => [{
text: i18n.ts.email, text: i18n.ts.email,
to: '/settings/email', to: '/settings/email',
active: props.initialPage === 'email', active: props.initialPage === 'email',
}, {
icon: 'fas fa-share-alt',
text: i18n.ts.integration,
to: '/settings/integration',
active: props.initialPage === 'integration',
}, { }, {
icon: 'fas fa-lock', icon: 'fas fa-lock',
text: i18n.ts.security, text: i18n.ts.security,
@ -200,7 +195,6 @@ const component = computed(() => {
case 'mute-block': return defineAsyncComponent(() => import('./mute-block.vue')); case 'mute-block': return defineAsyncComponent(() => import('./mute-block.vue'));
case 'word-mute': return defineAsyncComponent(() => import('./word-mute.vue')); case 'word-mute': return defineAsyncComponent(() => import('./word-mute.vue'));
case 'instance-mute': return defineAsyncComponent(() => import('./instance-mute.vue')); case 'instance-mute': return defineAsyncComponent(() => import('./instance-mute.vue'));
case 'integration': return defineAsyncComponent(() => import('./integration.vue'));
case 'security': return defineAsyncComponent(() => import('./security.vue')); case 'security': return defineAsyncComponent(() => import('./security.vue'));
case '2fa': return defineAsyncComponent(() => import('./2fa.vue')); case '2fa': return defineAsyncComponent(() => import('./2fa.vue'));
case 'api': return defineAsyncComponent(() => import('./api.vue')); case 'api': return defineAsyncComponent(() => import('./api.vue'));

View file

@ -1,95 +0,0 @@
<template>
<div class="_formRoot">
<FormSection v-if="instance.enableTwitterIntegration">
<template #label><i class="fab fa-twitter"></i> Twitter</template>
<p v-if="integrations.twitter">{{ i18n.ts.connectedTo }}: <a :href="`https://twitter.com/${integrations.twitter.screenName}`" rel="nofollow noopener" target="_blank">@{{ integrations.twitter.screenName }}</a></p>
<MkButton v-if="integrations.twitter" danger @click="disconnectTwitter">{{ i18n.ts.disconnectService }}</MkButton>
<MkButton v-else primary @click="connectTwitter">{{ i18n.ts.connectService }}</MkButton>
</FormSection>
<FormSection v-if="instance.enableDiscordIntegration">
<template #label><i class="fab fa-discord"></i> Discord</template>
<p v-if="integrations.discord">{{ i18n.ts.connectedTo }}: <a :href="`https://discord.com/users/${integrations.discord.id}`" rel="nofollow noopener" target="_blank">@{{ integrations.discord.username }}#{{ integrations.discord.discriminator }}</a></p>
<MkButton v-if="integrations.discord" danger @click="disconnectDiscord">{{ i18n.ts.disconnectService }}</MkButton>
<MkButton v-else primary @click="connectDiscord">{{ i18n.ts.connectService }}</MkButton>
</FormSection>
<FormSection v-if="instance.enableGithubIntegration">
<template #label><i class="fab fa-github"></i> GitHub</template>
<p v-if="integrations.github">{{ i18n.ts.connectedTo }}: <a :href="`https://github.com/${integrations.github.login}`" rel="nofollow noopener" target="_blank">@{{ integrations.github.login }}</a></p>
<MkButton v-if="integrations.github" danger @click="disconnectGithub">{{ i18n.ts.disconnectService }}</MkButton>
<MkButton v-else primary @click="connectGithub">{{ i18n.ts.connectService }}</MkButton>
</FormSection>
</div>
</template>
<script lang="ts" setup>
import { computed, onMounted, ref, watch } from 'vue';
import { apiUrl } from '@/config';
import FormSection from '@/components/form/section.vue';
import MkButton from '@/components/ui/button.vue';
import { $i } from '@/account';
import { instance } from '@/instance';
import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata';
const twitterForm = ref<Window | null>(null);
const discordForm = ref<Window | null>(null);
const githubForm = ref<Window | null>(null);
const integrations = computed(() => $i!.integrations);
function openWindow(service: string, type: string) {
return window.open(`${apiUrl}/${type}/${service}`,
`${service}_${type}_window`,
'height=570, width=520',
);
}
function connectTwitter() {
twitterForm.value = openWindow('twitter', 'connect');
}
function disconnectTwitter() {
openWindow('twitter', 'disconnect');
}
function connectDiscord() {
discordForm.value = openWindow('discord', 'connect');
}
function disconnectDiscord() {
openWindow('discord', 'disconnect');
}
function connectGithub() {
githubForm.value = openWindow('github', 'connect');
}
function disconnectGithub() {
openWindow('github', 'disconnect');
}
onMounted(() => {
document.cookie = `igi=${$i!.token}; path=/;` +
' max-age=31536000;' +
(document.location.protocol.startsWith('https') ? ' secure' : '');
watch(integrations, () => {
if (integrations.value.twitter) {
if (twitterForm.value) twitterForm.value.close();
}
if (integrations.value.discord) {
if (discordForm.value) discordForm.value.close();
}
if (integrations.value.github) {
if (githubForm.value) githubForm.value.close();
}
});
});
definePageMetadata({
title: i18n.ts.integration,
icon: 'fas fa-share-alt',
});
</script>

View file

@ -98,7 +98,6 @@ export type MeDetailed = UserDetailed & {
hasUnreadSpecifiedNotes: boolean; hasUnreadSpecifiedNotes: boolean;
hideOnlineStatus: boolean; hideOnlineStatus: boolean;
injectFeaturedNote: boolean; injectFeaturedNote: boolean;
integrations: Record<string, any>;
isDeleted: boolean; isDeleted: boolean;
isExplorable: boolean; isExplorable: boolean;
mutedWords: string[][]; mutedWords: string[][];
@ -277,9 +276,6 @@ export type LiteInstanceMetadata = {
swPublickey: string | null; swPublickey: string | null;
maxNoteTextLength: number; maxNoteTextLength: number;
enableEmail: boolean; enableEmail: boolean;
enableTwitterIntegration: boolean;
enableGithubIntegration: boolean;
enableDiscordIntegration: boolean;
enableServiceWorker: boolean; enableServiceWorker: boolean;
emojis: CustomEmoji[]; emojis: CustomEmoji[];
iconUrl: string; iconUrl: string;

View file

@ -2216,15 +2216,6 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@types/oauth@npm:0.9.1, @types/oauth@npm:^0.9.1":
version: 0.9.1
resolution: "@types/oauth@npm:0.9.1"
dependencies:
"@types/node": "*"
checksum: 5c079611b455eff58fba6358e028b191a1e65475600f8ed8d98c1696fedcfb0290aa6c6a19cf50f21a9e2d816ecb43a19f910900d91f8ba3727e33c48f97d7f3
languageName: node
linkType: hard
"@types/parse5@npm:*": "@types/parse5@npm:*":
version: 7.0.0 version: 7.0.0
resolution: "@types/parse5@npm:7.0.0" resolution: "@types/parse5@npm:7.0.0"
@ -3474,15 +3465,6 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"autwh@npm:0.1.0":
version: 0.1.0
resolution: "autwh@npm:0.1.0"
dependencies:
oauth: 0.9.15
checksum: 5ca904d43421e7475de29adfda65ca769105cbf597c9c43fef934f20b0daa331621157cdf34513eae5f492e1b4fc6443f37438da08bf2ba1c4e3e7d6d3f3f738
languageName: node
linkType: hard
"aws-sdk@npm:2.1165.0": "aws-sdk@npm:2.1165.0":
version: 2.1165.0 version: 2.1165.0
resolution: "aws-sdk@npm:2.1165.0" resolution: "aws-sdk@npm:2.1165.0"
@ -3675,7 +3657,6 @@ __metadata:
"@types/node": 18.7.16 "@types/node": 18.7.16
"@types/node-fetch": 3.0.3 "@types/node-fetch": 3.0.3
"@types/nodemailer": 6.4.5 "@types/nodemailer": 6.4.5
"@types/oauth": ^0.9.1
"@types/pg": ^8.6.5 "@types/pg": ^8.6.5
"@types/pug": 2.0.6 "@types/pug": 2.0.6
"@types/punycode": 2.1.0 "@types/punycode": 2.1.0
@ -3702,7 +3683,6 @@ __metadata:
ajv: 8.11.0 ajv: 8.11.0
archiver: 5.3.1 archiver: 5.3.1
autobind-decorator: 2.4.0 autobind-decorator: 2.4.0
autwh: 0.1.0
aws-sdk: 2.1165.0 aws-sdk: 2.1165.0
bcryptjs: 2.4.3 bcryptjs: 2.4.3
blurhash: 1.1.5 blurhash: 1.1.5
@ -4704,7 +4684,6 @@ __metadata:
"@types/katex": 0.14.0 "@types/katex": 0.14.0
"@types/matter-js": 0.17.7 "@types/matter-js": 0.17.7
"@types/mocha": 9.1.1 "@types/mocha": 9.1.1
"@types/oauth": 0.9.1
"@types/punycode": 2.1.0 "@types/punycode": 2.1.0
"@types/qrcode": 1.5.0 "@types/qrcode": 1.5.0
"@types/seedrandom": 3.0.2 "@types/seedrandom": 3.0.2
@ -4719,7 +4698,6 @@ __metadata:
abort-controller: 3.0.0 abort-controller: 3.0.0
autobind-decorator: 2.4.0 autobind-decorator: 2.4.0
autosize: 5.0.1 autosize: 5.0.1
autwh: 0.1.0
blurhash: 1.1.5 blurhash: 1.1.5
broadcast-channel: 4.13.0 broadcast-channel: 4.13.0
browser-image-resizer: 2.4.1 browser-image-resizer: 2.4.1
@ -12623,13 +12601,6 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"oauth@npm:0.9.15":
version: 0.9.15
resolution: "oauth@npm:0.9.15"
checksum: 957c0d8d85300398dcb0e293953650c0fc3facc795bee8228238414f19f59cef5fd4ee8d17a972c142924c10c5f6ec50ef80f77f4a6cc6e3c98f9d22c027801c
languageName: node
linkType: hard
"object-assign@npm:^4.0.1, object-assign@npm:^4.1.0, object-assign@npm:^4.1.1": "object-assign@npm:^4.0.1, object-assign@npm:^4.1.0, object-assign@npm:^4.1.1":
version: 4.1.1 version: 4.1.1
resolution: "object-assign@npm:4.1.1" resolution: "object-assign@npm:4.1.1"