mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-15 22:56:48 +00:00
Other: Mitigate double-unlock of user keyring
We need to unlock the user keyring anyway to unlock the address keyring, so we should just return it instead of re-unlocking the user keyring when sending a message.
This commit is contained in:
@ -248,7 +248,7 @@ func (user *User) handleCreateMessageEvent(ctx context.Context, event liteapi.Me
|
||||
return fmt.Errorf("failed to get full message: %w", err)
|
||||
}
|
||||
|
||||
return user.withAddrKR(event.Message.AddressID, func(addrKR *crypto.KeyRing) error {
|
||||
return user.withAddrKR(event.Message.AddressID, func(_, addrKR *crypto.KeyRing) error {
|
||||
buildRes, err := buildRFC822(ctx, full, addrKR)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to build RFC822 message: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user