feat: support client private-message reporting
Handle confirmed private messages sent from the client and preserve account isolation when sessions change. Surface unavailable messages without reporting incomplete content. Refs #528.
This commit is contained in:
12 files changed
+963
-4
No files matched your search
@@ -85,8 +85,18 @@ export class IncomingPacketPipeline {
|
||||
}
|
||||
|
||||
process(pkt: PacketInfo): Promise<void> {
|
||||
return this.processWithHandlers(pkt, this.cmdHandlers_.get(pkt.serviceCmd));
|
||||
}
|
||||
|
||||
processEvents(pkt: PacketInfo, events: readonly QQEventVariant[]): Promise<void> {
|
||||
return this.processWithHandlers(pkt, [() => [...events]]);
|
||||
}
|
||||
|
||||
private processWithHandlers(
|
||||
pkt: PacketInfo,
|
||||
handlers: readonly CmdParser[] | undefined,
|
||||
): Promise<void> {
|
||||
const startedAt = Date.now();
|
||||
const handlers = this.cmdHandlers_.get(pkt.serviceCmd);
|
||||
|
||||
if (!handlers) {
|
||||
this.packetLog.trace(() => [
|
||||
|
||||
Reference in new issue
Block a user