return mail content size as restore size (#3705)

#### Does this PR need a docs update or release note?

- [x]  No

#### Type of change

- [x] 🐛 Bugfix

#### Test Plan

- [x]  Unit test
- [x] 💚 E2E
This commit is contained in:
Keepers 2023-06-28 16:45:15 -06:00 committed by GitHub
parent dcf02f6256
commit f1c0b2b42f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,7 +159,14 @@ func restoreMail(
return nil, clues.Stack(err)
}
return api.MailInfo(msg, int64(len(body))), nil
var size int64
if msg.GetBody() != nil {
bc := ptr.Val(msg.GetBody().GetContent())
size = int64(len(bc))
}
return api.MailInfo(msg, size), nil
}
func setMessageSVEPs(msg models.Messageable) models.Messageable {