Misskeyのアカウント追加に失敗する問題の対策

This commit is contained in:
tateisu 2019-02-06 10:43:55 +09:00
parent 82de8e1993
commit 6a46468bda
1 changed files with 27 additions and 33 deletions

View File

@ -189,40 +189,34 @@ class TootApiClient(
fun getScopeArrayMisskey(@Suppress("UNUSED_PARAMETER") ti : TootInstance) =
JSONArray().apply {
put("account-read")
put("account-write")
put("note-read")
put("note-write")
put("reaction-read")
put("reaction-write")
put("reaction-write")
put("following-read") // フォロリク申請一覧で使われていた
put("following-write")
put("drive-read")
put("drive-write")
put("notification-read")
put("notification-write")
put("favorite-read")
put("favorites-read")
put("favorite-write")
put("account/read")
put("account/write")
put("messaging-read")
put("messaging-write")
put("vote-read")
put("vote-write")
// https://github.com/syuilo/misskey/issues/2341
arrayOf(
"account-read",
"account-write",
"account/read",
"account/write",
"drive-read",
"drive-write",
"favorite-read",
"favorite-write",
"favorites-read",
"following-read",
"following-write",
"messaging-read",
"messaging-write",
"note-read",
"note-write",
"notification-read",
"notification-write",
"reaction-read",
"reaction-write",
"vote-read",
"vote-write"
)
// APIのエラーを回避するため、重複を排除する
.toMutableSet()
.forEach {put(it) }
}
private fun encodeScopeArray(scope_array : JSONArray?) : String? {