mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-06 00:50:13 +08:00
Ignore auto reply message (#607)
* try to fix #358 according to @Mar8s comment * Disable mirror * Cancel group coroutine when bot leave group and fire event separately * Re-add 0x82 and 0x83 * Revert else logic * Fix build * ignore auto reply message Co-authored-by: Him188 <Him188@mamoe.net>
This commit is contained in:
parent
b8bb129ac1
commit
648777e1bd
@ -328,9 +328,12 @@ internal object MessageSvcPbGetMsg : OutgoingPacketFactory<MessageSvcPbGetMsg.Re
|
|||||||
if (!bot.firstLoginSucceed) {
|
if (!bot.firstLoginSucceed) {
|
||||||
return@mapNotNull null
|
return@mapNotNull null
|
||||||
}
|
}
|
||||||
|
|
||||||
friend.lastMessageSequence.loop {
|
friend.lastMessageSequence.loop {
|
||||||
if (friend.lastMessageSequence.compareAndSet(it, msg.msgHead.msgSeq)) {
|
if (friend.lastMessageSequence.compareAndSet(
|
||||||
|
it,
|
||||||
|
msg.msgHead.msgSeq
|
||||||
|
) && msg.contentHead?.autoReply != 1
|
||||||
|
) {
|
||||||
return@mapNotNull FriendMessageEvent(
|
return@mapNotNull FriendMessageEvent(
|
||||||
friend,
|
friend,
|
||||||
msg.toMessageChain(bot, groupIdOrZero = 0, onlineSource = true),
|
msg.toMessageChain(bot, groupIdOrZero = 0, onlineSource = true),
|
||||||
|
Loading…
Reference in New Issue
Block a user