diff --git a/pkg/signalmeow/profile.go b/pkg/signalmeow/profile.go index 86b28691..e5dceca3 100644 --- a/pkg/signalmeow/profile.go +++ b/pkg/signalmeow/profile.go @@ -267,6 +267,12 @@ func (cli *Client) DownloadUserAvatar(ctx context.Context, avatarPath string, pr if err != nil { return nil, fmt.Errorf("failed to read response body: %w", err) } + if encryptedAvatar == nil { + return nil, fmt.Errorf("failed to read response body: encryptedAvatar was nil") + } + if profileKey == nil { + return nil, fmt.Errorf("failed to read response body: profileKey was nil") + } avatar, err := decryptBytes(profileKey[:], encryptedAvatar) if err != nil { return nil, fmt.Errorf("failed to decrypt response: %w", err)