4 Commits

Author SHA1 Message Date
be9ff46134 Merge pull request #325 from StarryKira/v1.0.9
fix get_image
2024-06-06 12:44:10 +08:00
1d6ac3e022 fix get_image 2024-06-06 12:32:59 +08:00
2db187e3d5 (#319) 2024-04-11 12:41:23 +08:00
18ec586b12 试着修复group_increase事件在大群中依然可能出现target_id=0的故障 (#318) 2024-04-11 01:04:52 +08:00
3 changed files with 17 additions and 7 deletions

View File

@ -3,7 +3,7 @@ name: Build Shamrock APK
on:
workflow_dispatch:
push:
branches: [ master ]
branches: [ v1.0.9 ]
paths-ignore:
- '**.md'
- '**.txt'
@ -97,4 +97,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: "${{ env.SHAMROCK_VERSION_x86_64 }}"
path: "${{ env.APK_FILE_X86_64 }}"
path: "${{ env.APK_FILE_X86_64 }}"

View File

@ -21,19 +21,19 @@ private fun formatFileName(file: String): String = file
fun Routing.fetchRes() {
getOrPost("/get_record") {
val file = formatFileName( fetchGetOrThrow("file") )
val file = formatFileName( fetchOrThrow("file") )
val format = fetchOrThrow("out_format")
call.respondText(GetRecord(file, format), ContentType.Application.Json)
}
getOrPost("/get_file") {
val file = formatFileName( fetchGetOrThrow("file") )
val file = formatFileName( fetchOrThrow("file") )
val fileType = fetchOrThrow("file_type")
call.respondText(GetFile(file, fileType), ContentType.Application.Json)
}
getOrPost("/get_image") {
val file = formatFileName( fetchGetOrThrow("file") )
val file = formatFileName( fetchOrThrow("file") )
call.respondText(GetImage(file), ContentType.Application.Json)
}

View File

@ -372,8 +372,18 @@ internal object PrimitiveListener {
}
val operatorUid = event.operatorUid
val operator = ContactHelper.getUinByUidAsync(operatorUid).toLong()
val target = ContactHelper.getUinByUidAsync(targetUid).toLong()
var operator = ContactHelper.getUinByUidAsync(operatorUid).toLong()
var target = ContactHelper.getUinByUidAsync(targetUid).toLong()
if (target== 0.toLong()){
GroupSvc.getTroopMemberInfoByUid(groupCode,targetUid).onSuccess {
target=it.uin
}
}
if (operator== 0.toLong()){
GroupSvc.getTroopMemberInfoByUid(groupCode,operatorUid).onSuccess {
operator=it.uin
}
}
LogCenter.log("群成员增加($groupCode): $target, type = $type")
if (!GlobalEventTransmitter.GroupNoticeTransmitter