From 9e3b0661dad938f3f9634831f97ecb61c83ff16c Mon Sep 17 00:00:00 2001 From: Him188 Date: Mon, 30 Sep 2019 00:06:28 +0800 Subject: [PATCH] update --- .../src/main/java/net/mamoe/mirai/message/FaceID.java | 1 + .../src/main/java/net/mamoe/mirai/network/LoginSession.kt | 2 +- .../net/mamoe/mirai/network/handler/MessagePacketHandler.kt | 6 ++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mirai-core/src/main/java/net/mamoe/mirai/message/FaceID.java b/mirai-core/src/main/java/net/mamoe/mirai/message/FaceID.java index 7245b721f..c84411b2a 100644 --- a/mirai-core/src/main/java/net/mamoe/mirai/message/FaceID.java +++ b/mirai-core/src/main/java/net/mamoe/mirai/message/FaceID.java @@ -1,6 +1,7 @@ package net.mamoe.mirai.message; /** + * @author LamGC * @author Him188moe */ public enum FaceID { diff --git a/mirai-core/src/main/java/net/mamoe/mirai/network/LoginSession.kt b/mirai-core/src/main/java/net/mamoe/mirai/network/LoginSession.kt index dd86d3473..6958e3bac 100644 --- a/mirai-core/src/main/java/net/mamoe/mirai/network/LoginSession.kt +++ b/mirai-core/src/main/java/net/mamoe/mirai/network/LoginSession.kt @@ -41,7 +41,7 @@ class LoginSession( /** - * 发送一个数据包, 并期待接受一个特定的 [ServerPacket]. 仅 Kotlin 使用 + * 发送一个数据包, 并期待接受一个特定的 [ServerPacket]. * 发送成功后, 该方法会等待收到 [ServerPacket] 直到超时. * * 实现方法: diff --git a/mirai-core/src/main/java/net/mamoe/mirai/network/handler/MessagePacketHandler.kt b/mirai-core/src/main/java/net/mamoe/mirai/network/handler/MessagePacketHandler.kt index 2520d0a54..3fa8f0cab 100644 --- a/mirai-core/src/main/java/net/mamoe/mirai/network/handler/MessagePacketHandler.kt +++ b/mirai-core/src/main/java/net/mamoe/mirai/network/handler/MessagePacketHandler.kt @@ -4,6 +4,8 @@ import net.mamoe.mirai.contact.Group import net.mamoe.mirai.contact.QQ import net.mamoe.mirai.event.events.group.GroupMessageEvent import net.mamoe.mirai.event.events.qq.FriendMessageEvent +import net.mamoe.mirai.getGroupByNumber +import net.mamoe.mirai.getQQ import net.mamoe.mirai.message.defaults.MessageChain import net.mamoe.mirai.network.LoginSession import net.mamoe.mirai.network.packet.ServerFriendMessageEventPacket @@ -33,7 +35,7 @@ class MessagePacketHandler(session: LoginSession) : PacketHandler(session) { is ServerFriendMessageEventPacket -> { if (ignoreMessage) return - FriendMessageEvent(session.bot, session.bot.contacts.getQQ(packet.qq), packet.message).broadcast() + FriendMessageEvent(session.bot, session.bot.getQQ(packet.qq), packet.message).broadcast() } is ServerGroupMessageEventPacket -> { @@ -41,7 +43,7 @@ class MessagePacketHandler(session: LoginSession) : PacketHandler(session) { if (packet.qq == session.bot.account.qqNumber) return - GroupMessageEvent(session.bot, session.bot.contacts.getGroupByNumber(packet.groupNumber), session.bot.contacts.getQQ(packet.qq), packet.message).broadcast() + GroupMessageEvent(session.bot, session.bot.getGroupByNumber(packet.groupNumber), session.bot.getQQ(packet.qq), packet.message).broadcast() } is ServerSendFriendMessageResponsePacket,