fix: avoid duplicate private self-message reports
Keep repeated confirmations of the same private message from producing duplicate events while preserving distinct messages and stored content. Refs #528.
This commit is contained in:
3 files changed
+54
-8
No files matched your search
@@ -479,7 +479,7 @@ export class OneBotInstance {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.post_type === 'message_sent' && event.message_type === 'group') {
|
||||
if (event.post_type === 'message_sent') {
|
||||
this.rememberSelfSentEvent(event);
|
||||
}
|
||||
} else {
|
||||
@@ -554,12 +554,6 @@ export class OneBotInstance {
|
||||
return false;
|
||||
}
|
||||
|
||||
// A client group send has no action-side event. Keep its first live
|
||||
// echo for the full window so repeated pushes cannot report it again.
|
||||
if (event.message_type !== 'group') {
|
||||
this.recentSelfSentEvents.delete(key);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user