Keep profileKey in situations where it didn't work; still fail over
This commit is contained in:
parent
b72fb50ea0
commit
0eb4bd86bd
3 changed files with 55 additions and 95 deletions
|
@ -108,19 +108,7 @@ function processError(error: unknown): void {
|
|||
'private'
|
||||
);
|
||||
if (error.code === 401 || error.code === 403) {
|
||||
if (
|
||||
conversation.get('sealedSender') === SEALED_SENDER.ENABLED ||
|
||||
conversation.get('sealedSender') === SEALED_SENDER.UNRESTRICTED
|
||||
) {
|
||||
log.warn(
|
||||
`handleMessageSend: Got 401/403 for ${conversation.idForLogging()}, removing profile key`
|
||||
);
|
||||
|
||||
void conversation.setProfileKey(undefined, {
|
||||
reason: 'handleMessageSend/processError',
|
||||
});
|
||||
}
|
||||
if (conversation.get('sealedSender') === SEALED_SENDER.UNKNOWN) {
|
||||
if (conversation.get('sealedSender') !== SEALED_SENDER.DISABLED) {
|
||||
log.warn(
|
||||
`handleMessageSend: Got 401/403 for ${conversation.idForLogging()}, setting sealedSender = DISABLED`
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue