drop an expiretimer message with the same timer already on use

pull/1226/head
Audric Ackermann 5 years ago
parent dca4b9ef6d
commit db1a133c25
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -631,6 +631,7 @@
'group'
);
const oldMembers = convo.get('members');
const oldName = convo.getName();
const ev = {
groupDetails: {
@ -717,7 +718,7 @@
options,
};
if (!convo.getName() || convo.getName() !== groupName) {
if (oldName !== groupName) {
updateObj.name = groupName;
}

@ -522,6 +522,16 @@ export async function handleMessageJob(
handleSessionReset(conversation, message);
} else if (message.isExpirationTimerUpdate()) {
const { expireTimer } = initialMessage;
const oldValue = conversation.get('expireTimer');
if (expireTimer === oldValue) {
if (confirm) {
confirm();
}
window.console.log(
'Dropping ExpireTimerUpdate message as we already have the same one set.'
);
return;
}
handleExpirationTimerUpdate(conversation, message, source, expireTimer);
} else {
await handleRegularMessage(

Loading…
Cancel
Save