Skip to content

Commit

Permalink
Merge pull request #87 from c-reeder/add-support-for-prompt-unlock-br…
Browse files Browse the repository at this point in the history
…oadcast

Added support for prompt unlock broadcast rather than just unicast
mikkeloscar authored May 15, 2023

Verified

This commit was signed with the committer’s verified signature.
2 parents 17db2e5 + 87398fb commit 0bcbb6d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions secret_service/secret_service.go
Original file line number Diff line number Diff line change
@@ -191,6 +191,17 @@ func (s *SecretService) handlePrompt(prompt dbus.ObjectPath) (bool, dbus.Variant
return false, dbus.MakeVariant(""), err
}

err = s.AddMatchSignal(dbus.WithMatchObjectPath(prompt),
dbus.WithMatchInterface(promptInterface),
)
if err != nil {
return false, dbus.MakeVariant(""), err
}

defer func(s *SecretService, options ...dbus.MatchOption) {
_ = s.RemoveMatchSignal(options...)
}(s, dbus.WithMatchObjectPath(prompt), dbus.WithMatchInterface(promptInterface))

promptSignal := make(chan *dbus.Signal, 1)
s.Signal(promptSignal)

0 comments on commit 0bcbb6d

Please sign in to comment.