Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
feat(kotlin): FileMessage (not tested)
Browse files Browse the repository at this point in the history
#90


Former-commit-id: ada91b7
  • Loading branch information
Nambers committed Oct 24, 2021
1 parent b71cdcc commit 05cb76d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion kotlin/shared/src/main/kotlin/PublicShared.kt
Original file line number Diff line number Diff line change
Expand Up @@ -503,13 +503,24 @@ object PublicShared {
return remoteFileList(path, c)
c.withGroup(bot, "找不到对应群组,位置K-remoteFileInfo,gid:${c.id}") { group ->
val tmp = group.filesRoot.resolve(path).resolveById(id) ?: let {
logger.error("cannot find the file,位置:K-remoteFileinfo, id:$id")
logger.error("cannot find the file,位置:K-remoteFileinfo, id:$id, path:$path")
return "E2"
}
return fileInfo0(tmp)
}
}

suspend fun remoteFileInfo(id: String, c: Config.Contact): String =
c.withBot { bot ->
c.withGroup(bot, "找不到对应群组,位置K-remoteFileInfo,gid:${c.id}") { group ->
val tmp = group.filesRoot.resolveById(id) ?: let {
logger.error("cannot find the file,位置:K-remoteFileinfo, id:$id")
return "E1"
}
return fileInfo0(tmp)
}
}

//查询权限
fun kqueryM(c: Config.Contact): String =
c.withBot { bot ->
Expand Down

0 comments on commit 05cb76d

Please sign in to comment.