fix: only log errors when syncing an expire timer message and not all sync messages

pull/2660/head
William Grant 2 years ago
parent 6f1230398c
commit 349b513051

@ -340,18 +340,12 @@ export const buildSyncMessage = (
} }
// don't include our profileKey on syncing message. This is to be done by a ConfigurationMessage now // don't include our profileKey on syncing message. This is to be done by a ConfigurationMessage now
const timestamp = _.toNumber(sentTimestamp); const timestamp = _.toNumber(sentTimestamp);
if ( if (dataMessage.flags === SignalService.DataMessage.Flags.EXPIRATION_TIMER_UPDATE) {
expireUpdate && if (expireUpdate && !isEmpty(expireUpdate)) {
!isEmpty(expireUpdate) &&
dataMessage.flags === SignalService.DataMessage.Flags.EXPIRATION_TIMER_UPDATE
) {
return buildSyncExpireTimerMessage(identifier, expireUpdate, timestamp, syncTarget); return buildSyncExpireTimerMessage(identifier, expireUpdate, timestamp, syncTarget);
} else { } else {
window.log.info( window.log.info(`WIP: Building Sync Expire Timer Message failed`, dataMessage, expireUpdate);
`WIP: Something went wrong when syncing a disappearing message`, }
dataMessage,
expireUpdate
);
} }
return buildSyncVisibleMessage(identifier, dataMessage, timestamp, syncTarget); return buildSyncVisibleMessage(identifier, dataMessage, timestamp, syncTarget);
}; };

Loading…
Cancel
Save