DRY up the message receive timing validation
This commit is contained in:
parent
7ea945c157
commit
944a70abe7
4 changed files with 18 additions and 27 deletions
|
@ -134,7 +134,6 @@ import type { SendTypesType } from '../util/handleMessageSend';
|
|||
import { getStoriesBlocked } from '../util/stories';
|
||||
import { isNotNil } from '../util/isNotNil';
|
||||
import { chunk } from '../util/iterables';
|
||||
import { isOlderThan } from '../util/timestamp';
|
||||
import { inspectUnknownFieldTags } from '../util/inspectProtobufs';
|
||||
import { incrementMessageCounter } from '../util/incrementMessageCounter';
|
||||
import { filterAndClean } from '../types/BodyRange';
|
||||
|
@ -2389,17 +2388,6 @@ export default class MessageReceiver
|
|||
return;
|
||||
}
|
||||
|
||||
// Timing check
|
||||
if (isOlderThan(envelope.serverTimestamp, durations.DAY * 2)) {
|
||||
log.info(
|
||||
'MessageReceiver.handleEditMessage: cannot edit message older than 48h',
|
||||
logId,
|
||||
envelope.serverTimestamp
|
||||
);
|
||||
this.removeFromCache(envelope);
|
||||
return;
|
||||
}
|
||||
|
||||
const message = this.processDecrypted(envelope, msg.dataMessage);
|
||||
const groupId = this.getProcessedGroupId(message);
|
||||
const isBlocked = groupId ? this.isGroupBlocked(groupId) : false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue