Merge remote-tracking branch 'origin/master'

This commit is contained in:
whitechi72 2024-01-03 17:45:43 +08:00
commit 2645e8f451
4 changed files with 28 additions and 5 deletions

View File

@ -7,7 +7,7 @@ pluginManagement {
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
google()
mavenCentral()

View File

@ -46,7 +46,7 @@ internal object ActionManager {
SetFriendAddRequest, SetGroupAddRequest,
// GUILD
GetGuildServiceProfile,
GetGuildServiceProfile, GetGuildList,
// WEATHER
GetWeatherCityCode, GetWeather,

View File

@ -0,0 +1,20 @@
package moe.fuqiuluo.shamrock.remote.action.handlers
import kotlinx.serialization.json.JsonElement
import moe.fuqiuluo.shamrock.remote.action.ActionSession
import moe.fuqiuluo.shamrock.remote.action.IActionHandler
import moe.fuqiuluo.shamrock.tools.EmptyJsonArray
import moe.fuqiuluo.shamrock.tools.EmptyJsonString
internal object GetGuildList : IActionHandler() {
override suspend fun internalHandle(session: ActionSession): String {
return invoke(echo = session.echo)
}
operator fun invoke(echo: JsonElement = EmptyJsonString): String {
// TODO: get_guild_list
return ok(EmptyJsonArray, echo, "此功能尚未实现")
}
override fun path(): String = "get_guild_list"
}

View File

@ -4,16 +4,19 @@ import com.tencent.mobileqq.qqguildsdk.api.IGPSService
import kotlinx.serialization.json.JsonElement
import moe.fuqiuluo.shamrock.remote.action.ActionSession
import moe.fuqiuluo.shamrock.remote.action.IActionHandler
import moe.fuqiuluo.shamrock.tools.EmptyJsonObject
import moe.fuqiuluo.shamrock.tools.EmptyJsonString
import moe.fuqiuluo.shamrock.xposed.helper.AppRuntimeFetcher
import mqq.app.MobileQQ
internal object GetGuildServiceProfile : IActionHandler() {
override suspend fun internalHandle(session: ActionSession): String {
TODO("Not yet implemented")
return invoke(echo = session.echo)
}
operator fun invoke(echo: JsonElement = EmptyJsonString): String {
// TODO: get_guild_service_profile
return ok(EmptyJsonObject, echo, "此功能尚未实现")
val service = AppRuntimeFetcher.appRuntime
.getRuntimeService(IGPSService::class.java, "all")
if (!service.isGProSDKInitCompleted) {