filter out duplicates only if they are less than 10 messages away

This commit is contained in:
Audric Ackermann 2021-08-03 14:15:01 +10:00
parent 57b22cbdda
commit 9b98b32d1b
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4
2 changed files with 2 additions and 2 deletions

View File

@ -200,7 +200,7 @@ export class ConversationModel extends Backbone.Model<ConversationAttributes> {
this.triggerUIRefresh = _.throttle(this.triggerUIRefresh, 1000, {
trailing: true,
});
this.throttledNotify = _.debounce(this.notify, 500, { maxWait: 1000, trailing: true });
this.throttledNotify = _.debounce(this.notify, 500, { maxWait: 5000, trailing: true });
//start right away the function is called, and wait 1sec before calling it again
const markReadDebounced = _.debounce(this.markReadBouncy, 1000, {
leading: true,

View File

@ -4,7 +4,7 @@ import { sha256 } from '../session/crypto';
const recentHashByConvo = new Map<string, Array<string>>();
const maxHashToKeepPerConvo = 50;
const maxHashToKeepPerConvo = 10;
export function isDuplicateBasedOnHash(
dataMessage: SignalService.DataMessage,