fix(encryptor): correctly send an error when there is no encryption key
It would crash otherwise, leaving no message
This commit is contained in:
parent
bcca0b399d
commit
ed639a9f4a
|
@ -670,6 +670,9 @@ func (s *encryptor) encryptWithHR(groupID []byte, keyID uint32, payload []byte)
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if hrCache == nil {
|
||||
return nil, errors.New("no encryption key found for the community")
|
||||
}
|
||||
|
||||
var dbHash []byte
|
||||
if len(hrCache.Hash) == 0 {
|
||||
|
|
Loading…
Reference in New Issue