Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions msgsecret.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func (cli *Client) EncryptPollVote(ctx context.Context, pollInfo *types.MessageI
if err != nil {
return nil, fmt.Errorf("failed to marshal poll vote protobuf: %w", err)
}
ciphertext, iv, err := cli.encryptMsgSecret(ctx, cli.getOwnID(), pollInfo.Chat, pollInfo.Sender, pollInfo.ID, EncSecretPollVote, plaintext)
ciphertext, iv, err := cli.encryptMsgSecret(ctx, cli.getOwnLID(), pollInfo.Chat, pollInfo.Sender, pollInfo.ID, EncSecretPollVote, plaintext)
if err != nil {
return nil, fmt.Errorf("failed to encrypt poll vote: %w", err)
}
Expand All @@ -347,7 +347,6 @@ func (cli *Client) EncryptComment(ctx context.Context, rootMsgInfo *types.Messag
if err != nil {
return nil, fmt.Errorf("failed to marshal comment protobuf: %w", err)
}
// TODO is hardcoding LID here correct? What about polls?
ciphertext, iv, err := cli.encryptMsgSecret(ctx, cli.getOwnLID(), rootMsgInfo.Chat, rootMsgInfo.Sender, rootMsgInfo.ID, EncSecretComment, plaintext)
if err != nil {
return nil, fmt.Errorf("failed to encrypt comment: %w", err)
Expand Down