Drop verified syncs, use storage service for event
This commit is contained in:
parent
8c4b875dca
commit
da45f26d37
5 changed files with 10 additions and 135 deletions
|
@ -104,7 +104,6 @@ import {
|
|||
KeysEvent,
|
||||
PNIIdentityEvent,
|
||||
StickerPackEvent,
|
||||
VerifiedEvent,
|
||||
ReadSyncEvent,
|
||||
ViewSyncEvent,
|
||||
ContactEvent,
|
||||
|
@ -485,11 +484,6 @@ export default class MessageReceiver
|
|||
handler: (ev: StickerPackEvent) => void
|
||||
): void;
|
||||
|
||||
public override addEventListener(
|
||||
name: 'verified',
|
||||
handler: (ev: VerifiedEvent) => void
|
||||
): void;
|
||||
|
||||
public override addEventListener(
|
||||
name: 'readSync',
|
||||
handler: (ev: ReadSyncEvent) => void
|
||||
|
@ -2458,7 +2452,9 @@ export default class MessageReceiver
|
|||
return this.handleRead(envelope, syncMessage.read);
|
||||
}
|
||||
if (syncMessage.verified) {
|
||||
return this.handleVerified(envelope, syncMessage.verified);
|
||||
log.info('Got verified sync message, dropping');
|
||||
this.removeFromCache(envelope);
|
||||
return undefined;
|
||||
}
|
||||
if (syncMessage.configuration) {
|
||||
return this.handleConfiguration(envelope, syncMessage.configuration);
|
||||
|
@ -2655,27 +2651,6 @@ export default class MessageReceiver
|
|||
return this.dispatchAndWait(ev);
|
||||
}
|
||||
|
||||
private async handleVerified(
|
||||
envelope: ProcessedEnvelope,
|
||||
verified: Proto.IVerified
|
||||
): Promise<void> {
|
||||
const ev = new VerifiedEvent(
|
||||
{
|
||||
state: verified.state,
|
||||
destination: dropNull(verified.destination),
|
||||
destinationUuid: verified.destinationUuid
|
||||
? normalizeUuid(
|
||||
verified.destinationUuid,
|
||||
'handleVerified.destinationUuid'
|
||||
)
|
||||
: undefined,
|
||||
identityKey: verified.identityKey ? verified.identityKey : undefined,
|
||||
},
|
||||
this.removeFromCache.bind(this, envelope)
|
||||
);
|
||||
return this.dispatchAndWait(ev);
|
||||
}
|
||||
|
||||
private async handleRead(
|
||||
envelope: ProcessedEnvelope,
|
||||
read: Array<Proto.SyncMessage.IRead>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue