mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-13 20:10:09 +08:00
[core] ignore file downloaded message
This commit is contained in:
parent
69b0bf8b80
commit
ea02835ad2
@ -224,16 +224,19 @@ internal class FileMessageProtocol : MessageProtocol() {
|
||||
if (originalMsg != null && originalMsg.msgHead.msgType == 529) {
|
||||
markAsConsumed()
|
||||
val sub0x4 = originalMsg.msgBody.msgContent.loadAs(SubMsgType0x4.MsgBody.serializer())
|
||||
if (sub0x4.msgNotOnlineFile != null) {
|
||||
collect(
|
||||
FriendFileMessageImpl(
|
||||
sub0x4.msgNotOnlineFile.fileUuid.decodeToString(),
|
||||
sub0x4.msgNotOnlineFile.fileName.decodeToString(),
|
||||
sub0x4.msgNotOnlineFile.fileSize,
|
||||
sub0x4.msgNotOnlineFile.fileMd5
|
||||
)
|
||||
val msgNotOnline = sub0x4.msgNotOnlineFile ?: return
|
||||
|
||||
// notify that friend had downloaded the file.
|
||||
if (msgNotOnline.subcmd == 2) return
|
||||
|
||||
collect(
|
||||
FriendFileMessageImpl(
|
||||
sub0x4.msgNotOnlineFile.fileUuid.decodeToString(),
|
||||
sub0x4.msgNotOnlineFile.fileName.decodeToString(),
|
||||
sub0x4.msgNotOnlineFile.fileSize,
|
||||
sub0x4.msgNotOnlineFile.fileMd5
|
||||
)
|
||||
}
|
||||
)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user