fix: #408
This commit is contained in:
1 parent
f450d52268
commit
6678d5cb68
1 file changed
+3
-2
+3
-2
@@ -591,12 +591,13 @@ export class NapCatOneBot11Adapter {
|
|||||||
private async emitRecallMsg(msgList: RawMessage[], cache: LRUCache<string, boolean>) {
|
private async emitRecallMsg(msgList: RawMessage[], cache: LRUCache<string, boolean>) {
|
||||||
for (const message of msgList) {
|
for (const message of msgList) {
|
||||||
// log("message update", message.sendStatus, message.msgId, message.msgSeq)
|
// log("message update", message.sendStatus, message.msgId, message.msgSeq)
|
||||||
|
const peer: Peer = { chatType: message.chatType, peerUid: message.peerUid, guildId: '' };
|
||||||
if (message.recallTime != '0' && !cache.get(message.msgId)) { //todo: 这个判断方法不太好,应该使用灰色消息元素来判断?
|
if (message.recallTime != '0' && !cache.get(message.msgId)) { //todo: 这个判断方法不太好,应该使用灰色消息元素来判断?
|
||||||
cache.put(message.msgId, true);
|
cache.put(message.msgId, true);
|
||||||
// 撤回消息上报
|
// 撤回消息上报
|
||||||
const oriMessageId = MessageUnique.getShortIdByMsgId(message.msgId);
|
let oriMessageId = MessageUnique.getShortIdByMsgId(message.msgId);
|
||||||
if (!oriMessageId) {
|
if (!oriMessageId) {
|
||||||
continue;
|
oriMessageId = MessageUnique.createUniqueMsgId(peer, message.msgId);
|
||||||
}
|
}
|
||||||
if (message.chatType == ChatType.KCHATTYPEC2C) {
|
if (message.chatType == ChatType.KCHATTYPEC2C) {
|
||||||
const friendRecallEvent = new OB11FriendRecallNoticeEvent(
|
const friendRecallEvent = new OB11FriendRecallNoticeEvent(
|
||||||
|
|||||||
Reference in new issue
Block a user