Shamrock: friend poke event detail fix #103

This commit is contained in:
ikechan8370 2023-11-28 17:19:08 +08:00
parent c6dad5677c
commit 85aaa54e4e
2 changed files with 17 additions and 4 deletions

View File

@ -395,7 +395,7 @@ internal object GlobalEventTransmitter: BaseSvc() {
* 私聊通知 通知器
*/
object PrivateNoticeTransmitter {
suspend fun transPrivatePoke(msgTime: Long, operation: Long, target: Long): Boolean {
suspend fun transPrivatePoke(msgTime: Long, operation: Long, target: Long, action: String?, suffix: String?, actionImg: String?): Boolean {
pushNotice(NoticeEvent(
time = msgTime,
selfId = app.longAccountUin,
@ -405,7 +405,12 @@ internal object GlobalEventTransmitter: BaseSvc() {
operatorId = operation,
userId = operation,
senderId = operation,
target = target
target = target,
pokeDetail = PokeDetail(
actionImg = actionImg,
action = action,
suffix = suffix
)
))
return true
}

View File

@ -96,6 +96,9 @@ internal object PrimitiveListener {
lateinit var target: String
lateinit var operation: String
var suffix: String? = null
var actionImg: String? = null
var action: String? = null
detail[7]
.asList
.value
@ -104,12 +107,17 @@ internal object PrimitiveListener {
when(it[1].asUtf8String) {
"uin_str1" -> operation = value
"uin_str2" -> target = value
"action_str" -> action = value
"alt_str1" -> action = value
"suffix_str" -> suffix = value
"action_img_url" -> actionImg = value
}
}
LogCenter.log("私聊戳一戳: $operation -> $target")
LogCenter.log("私聊戳一戳: $operation $action $target $suffix")
if(!GlobalEventTransmitter.PrivateNoticeTransmitter
.transPrivatePoke(msgTime, operation.toLong(), target.toLong())) {
.transPrivatePoke(msgTime, operation.toLong(), target.toLong(), action, suffix, actionImg)) {
LogCenter.log("私聊戳一戳推送失败!", Level.WARN)
}
}