Misskey support has ended
This commit is contained in:
parent
767f0620a6
commit
600e7f709d
|
@ -7,6 +7,7 @@ import jp.juggler.subwaytooter.R
|
|||
import jp.juggler.subwaytooter.api.auth.AuthBase
|
||||
import jp.juggler.subwaytooter.api.entity.*
|
||||
import jp.juggler.subwaytooter.api.entity.TootAccountRef.Companion.tootAccountRefOrNull
|
||||
import jp.juggler.subwaytooter.pref.PrefB
|
||||
import jp.juggler.subwaytooter.table.SavedAccount
|
||||
import jp.juggler.subwaytooter.util.*
|
||||
import jp.juggler.util.data.*
|
||||
|
@ -400,6 +401,10 @@ class TootApiClient(
|
|||
|
||||
val account = this.account // may null
|
||||
|
||||
if( account?.isMisskey == true && !PrefB.bpEnableDeprecatedSomething.value){
|
||||
return result.setError(context.getString(R.string.misskey_support_end))
|
||||
}
|
||||
|
||||
try {
|
||||
if (!sendRequest(result) {
|
||||
val url = "https://${apiHost?.ascii}$path"
|
||||
|
|
|
@ -9,6 +9,7 @@ import jp.juggler.subwaytooter.api.TootParser
|
|||
import jp.juggler.subwaytooter.api.entity.EntityId
|
||||
import jp.juggler.subwaytooter.api.entity.Host
|
||||
import jp.juggler.subwaytooter.api.entity.TootInstance
|
||||
import jp.juggler.subwaytooter.pref.PrefB
|
||||
import jp.juggler.subwaytooter.pref.prefDevice
|
||||
import jp.juggler.subwaytooter.table.daoClientInfo
|
||||
import jp.juggler.subwaytooter.table.daoSavedAccount
|
||||
|
@ -119,6 +120,10 @@ class AuthMisskey10(override val client: TootApiClient) : AuthBase() {
|
|||
ti: TootInstance?,
|
||||
forceUpdateClient: Boolean,
|
||||
): Uri {
|
||||
if(!PrefB.bpEnableDeprecatedSomething.value){
|
||||
error(context.getString(R.string.misskey_support_end))
|
||||
}
|
||||
|
||||
val apiHost = apiHost ?: error("missing apiHost")
|
||||
|
||||
val clientInfo = daoClientInfo.load(apiHost, clientName)
|
||||
|
|
|
@ -2,12 +2,14 @@ package jp.juggler.subwaytooter.api.auth
|
|||
|
||||
import android.net.Uri
|
||||
import jp.juggler.subwaytooter.BuildConfig
|
||||
import jp.juggler.subwaytooter.R
|
||||
import jp.juggler.subwaytooter.api.TootApiClient
|
||||
import jp.juggler.subwaytooter.api.TootParser
|
||||
import jp.juggler.subwaytooter.api.auth.AuthMisskey10.Companion.encodeScopeArray
|
||||
import jp.juggler.subwaytooter.api.auth.AuthMisskey10.Companion.getScopeArrayMisskey
|
||||
import jp.juggler.subwaytooter.api.entity.Host
|
||||
import jp.juggler.subwaytooter.api.entity.TootInstance
|
||||
import jp.juggler.subwaytooter.pref.PrefB
|
||||
import jp.juggler.subwaytooter.pref.prefDevice
|
||||
import jp.juggler.subwaytooter.table.daoSavedAccount
|
||||
import jp.juggler.subwaytooter.util.LinkHelper
|
||||
|
@ -57,6 +59,10 @@ class AuthMisskey13(override val client: TootApiClient) : AuthBase() {
|
|||
ti: TootInstance?,
|
||||
forceUpdateClient: Boolean,
|
||||
): Uri {
|
||||
if(!PrefB.bpEnableDeprecatedSomething.value){
|
||||
error(context.getString(R.string.misskey_support_end))
|
||||
}
|
||||
|
||||
val apiHost = apiHost ?: error("missing apiHost")
|
||||
|
||||
val sessionId = UUID.randomUUID().toString()
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package jp.juggler.subwaytooter.api.entity
|
||||
|
||||
import android.os.SystemClock
|
||||
import jp.juggler.subwaytooter.R
|
||||
import jp.juggler.subwaytooter.api.TootApiClient
|
||||
import jp.juggler.subwaytooter.api.TootApiResult
|
||||
import jp.juggler.subwaytooter.api.TootParser
|
||||
|
@ -366,6 +367,10 @@ class TootInstance(parser: TootParser, src: JsonObject) {
|
|||
val result = TootApiResult.makeWithCaption(apiHost)
|
||||
if (result.error != null) return result
|
||||
|
||||
if(!PrefB.bpEnableDeprecatedSomething.value){
|
||||
return result.setError(context.getString(R.string.misskey_support_end))
|
||||
}
|
||||
|
||||
if (sendRequest(result) {
|
||||
buildJsonObject {
|
||||
put("dummy", 1)
|
||||
|
|
|
@ -1030,6 +1030,8 @@ val appSettingRoot = AppSettingItem(null, SettingType.Section, R.string.app_sett
|
|||
section(R.string.developer_options) {
|
||||
sw(PrefB.bpCheckBetaVersion, R.string.check_beta_release)
|
||||
|
||||
sw(PrefB.bpEnableDeprecatedSomething,R.string.enable_deprecated_something)
|
||||
|
||||
sw(PrefB.bpEmojiPickerCategoryOther, R.string.show_emoji_picker_other_category)
|
||||
action(R.string.drawable_list) {
|
||||
action = { startActivity(Intent(this, ActDrawableList::class.java)) }
|
||||
|
|
|
@ -360,4 +360,8 @@ object PrefB {
|
|||
"ShowUsernameFilteredPost",
|
||||
false
|
||||
)
|
||||
val bpEnableDeprecatedSomething = BooleanPref(
|
||||
"EnableDeprecatedSomething",
|
||||
false
|
||||
)
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ import jp.juggler.subwaytooter.api.push.ApiPushMisskey
|
|||
import jp.juggler.subwaytooter.dialog.SuspendProgress
|
||||
import jp.juggler.subwaytooter.notification.NotificationChannels
|
||||
import jp.juggler.subwaytooter.notification.NotificationDeleteReceiver.Companion.intentNotificationDelete
|
||||
import jp.juggler.subwaytooter.pref.PrefB
|
||||
import jp.juggler.subwaytooter.pref.PrefDevice
|
||||
import jp.juggler.subwaytooter.pref.prefDevice
|
||||
import jp.juggler.subwaytooter.push.*
|
||||
|
@ -590,6 +591,10 @@ class PushRepo(
|
|||
val account = daoSavedAccount.loadAccountByAcct(acct)
|
||||
?: error("missing account for acct ${status.acct}")
|
||||
|
||||
if(account.isMisskey && !PrefB.bpEnableDeprecatedSomething.value){
|
||||
error(context.getString(R.string.misskey_support_end))
|
||||
}
|
||||
|
||||
decodeMessageContent(status, pm, map)
|
||||
val messageJson = pm.messageJson
|
||||
|
||||
|
|
|
@ -1259,4 +1259,6 @@
|
|||
<string name="bug_report_desc">アプリは過去数日間のログを保持していますが、勝手に外部に送信することはありません。ユーザが明示的にログを送信する操作した時だけ参照されます。</string>
|
||||
<string name="log_save_level_desc">ログの重要度。 この設定より重要度が低いログは収集されません。</string>
|
||||
<string name="image_alpha_too_low">背景画像のアルファが低すぎます。 画像を見ることができますか?</string>
|
||||
<string name="enable_deprecated_something">陳腐化した何かを有効にする</string>
|
||||
<string name="misskey_support_end">Misskeyサポートは終了しました</string>
|
||||
</resources>
|
||||
|
|
|
@ -1267,4 +1267,6 @@
|
|||
<string name="bug_report_desc">The app keeps logs for the past few days, but does not send them outside without permission. It is only referenced when the user explicitly sends logs.</string>
|
||||
<string name="log_save_level_desc">Log severity level. Logs with a severity less than this setting will not be collected.</string>
|
||||
<string name="image_alpha_too_low">background image alpha is too low. can you view the image?</string>
|
||||
<string name="enable_deprecated_something">Enable deprecated something</string>
|
||||
<string name="misskey_support_end">Misskey support has ended</string>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue