mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-10 19:35:15 +08:00
Calculate groupCode, fixes #301
This commit is contained in:
parent
bd74291594
commit
5635509cbd
@ -2,6 +2,7 @@ package net.mamoe.mirai.qqandroid.network.protocol.packet.chat
|
|||||||
|
|
||||||
import kotlinx.io.core.ByteReadPacket
|
import kotlinx.io.core.ByteReadPacket
|
||||||
import kotlinx.io.core.readBytes
|
import kotlinx.io.core.readBytes
|
||||||
|
import net.mamoe.mirai.contact.Group
|
||||||
import net.mamoe.mirai.event.events.BotInvitedJoinGroupRequestEvent
|
import net.mamoe.mirai.event.events.BotInvitedJoinGroupRequestEvent
|
||||||
import net.mamoe.mirai.event.events.MemberJoinRequestEvent
|
import net.mamoe.mirai.event.events.MemberJoinRequestEvent
|
||||||
import net.mamoe.mirai.event.events.NewFriendRequestEvent
|
import net.mamoe.mirai.event.events.NewFriendRequestEvent
|
||||||
@ -51,7 +52,7 @@ internal class NewContact {
|
|||||||
struct.msgSeq,
|
struct.msgSeq,
|
||||||
msgAdditional,
|
msgAdditional,
|
||||||
struct.reqUin,
|
struct.reqUin,
|
||||||
groupCode,
|
Group.calculateGroupUinByGroupCode(groupCode),
|
||||||
reqUinNick
|
reqUinNick
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -141,7 +142,7 @@ internal class NewContact {
|
|||||||
bot,
|
bot,
|
||||||
struct.msgSeq,
|
struct.msgSeq,
|
||||||
actionUin,
|
actionUin,
|
||||||
groupCode,
|
Group.calculateGroupUinByGroupCode(groupCode),
|
||||||
groupName,
|
groupName,
|
||||||
actionUinNick
|
actionUinNick
|
||||||
)
|
)
|
||||||
@ -152,7 +153,7 @@ internal class NewContact {
|
|||||||
struct.msgSeq,
|
struct.msgSeq,
|
||||||
msgAdditional,
|
msgAdditional,
|
||||||
struct.reqUin,
|
struct.reqUin,
|
||||||
groupCode,
|
Group.calculateGroupUinByGroupCode(groupCode),
|
||||||
groupName,
|
groupName,
|
||||||
reqUinNick
|
reqUinNick
|
||||||
)
|
)
|
||||||
@ -180,7 +181,7 @@ internal class NewContact {
|
|||||||
true -> 11 // accept
|
true -> 11 // accept
|
||||||
false -> 12 // reject
|
false -> 12 // reject
|
||||||
},
|
},
|
||||||
groupCode = event.groupId,
|
groupCode = Group.calculateGroupCodeByGroupUin(event.groupId),
|
||||||
msg = "",
|
msg = "",
|
||||||
remark = "",
|
remark = "",
|
||||||
blacklist = blackList
|
blacklist = blackList
|
||||||
@ -207,7 +208,7 @@ internal class NewContact {
|
|||||||
Structmsg.ReqSystemMsgAction(
|
Structmsg.ReqSystemMsgAction(
|
||||||
actionInfo = Structmsg.SystemMsgActionInfo(
|
actionInfo = Structmsg.SystemMsgActionInfo(
|
||||||
type = if (accept) 11 else 12,
|
type = if (accept) 11 else 12,
|
||||||
groupCode = event.groupId
|
groupCode = Group.calculateGroupCodeByGroupUin(event.groupId)
|
||||||
),
|
),
|
||||||
groupMsgType = 2,
|
groupMsgType = 2,
|
||||||
language = 1000,
|
language = 1000,
|
||||||
|
Loading…
Reference in New Issue
Block a user