mirror of
https://github.com/whitechi73/OpenShamrock.git
synced 2024-08-14 13:12:17 +08:00
Shamrock
: fix guild
sync
This commit is contained in:
parent
fb00e5c1ff
commit
e68a1ffd37
@ -5,6 +5,7 @@ import com.tencent.mobileqq.transfile.TransferRequest
|
||||
import com.tencent.mobileqq.transfile.api.ITransFileController
|
||||
import io.ktor.server.routing.Routing
|
||||
import io.ktor.server.routing.post
|
||||
import moe.fuqiuluo.shamrock.remote.service.config.ShamrockConfig
|
||||
import moe.fuqiuluo.shamrock.remote.structures.Status
|
||||
import moe.fuqiuluo.shamrock.tools.fetchPost
|
||||
import moe.fuqiuluo.shamrock.tools.respond
|
||||
@ -15,7 +16,7 @@ import kotlin.random.Random
|
||||
import kotlin.random.nextLong
|
||||
|
||||
fun Routing.registerBDH() {
|
||||
post("/upload_group_image") {
|
||||
if(ShamrockConfig.isDev()) post("/upload_group_image") {
|
||||
val troop = fetchPost("troop")
|
||||
val picBytes = Base64.decode(fetchPost("pic"), Base64.DEFAULT)
|
||||
val md5Str = MD5.getMd5Hex(picBytes)
|
||||
@ -46,5 +47,4 @@ fun Routing.registerBDH() {
|
||||
.transferAsync(transferRequest)
|
||||
respond(isOk = true, Status.Ok, "$md5Str.jpg")
|
||||
}
|
||||
|
||||
}
|
@ -174,8 +174,6 @@ internal object AioListener : IKernelMsgListener {
|
||||
|
||||
override fun onMsgInfoListUpdate(msgList: ArrayList<MsgRecord>?) {
|
||||
msgList?.forEach { record ->
|
||||
if (record.chatType == MsgConstant.KCHATTYPEGUILD) return@forEach// TODO: 频道消息暂不处理
|
||||
|
||||
if (record.sendStatus == MsgConstant.KSENDSTATUSFAILED
|
||||
|| record.sendStatus == MsgConstant.KSENDSTATUSSENDING
|
||||
) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user