mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
session_rpcserver: priv flags only to be set if privacy map active
Error out if an AddAutopilotSession call has privacy map flags specified but does not activate the privacy mapper.
This commit is contained in:
parent
aa8080da24
commit
889cdfea71
1 changed files with 5 additions and 0 deletions
|
|
@ -911,6 +911,11 @@ func (s *sessionRpcServer) AddAutopilotSession(ctx context.Context,
|
|||
// Determine privacy flags to use for session registration.
|
||||
var privacyFlags session.PrivacyFlags
|
||||
if req.PrivacyFlagsSet {
|
||||
if !privacy {
|
||||
return nil, fmt.Errorf("privacy flags can only be " +
|
||||
"set when the privacy mapper is enabled")
|
||||
}
|
||||
|
||||
// We apply privacy flags from the session request in order to
|
||||
// to be able to set flags resulting from non-standard feature
|
||||
// configurations.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue