diff options
| author | citrons <citrons@mondecitronne.com> | 2025-06-09 12:58:52 -0500 |
|---|---|---|
| committer | citrons <citrons@mondecitronne.com> | 2025-06-09 12:58:52 -0500 |
| commit | dc957f6bb77c9d89b52f22b605f79f7be110f546 (patch) | |
| tree | d8956645e2926e4e649d1c8949b36c01158dfecf /client/application.go | |
| parent | 51a671c2687b8f67768efd1de82acd33e0579e2b (diff) | |
replies
Diffstat (limited to 'client/application.go')
| -rw-r--r-- | client/application.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/client/application.go b/client/application.go index e45ed5a..6b88281 100644 --- a/client/application.go +++ b/client/application.go @@ -117,8 +117,14 @@ func (a *application) Unsub(id string) { a.Request(proto.NewCmd("u", id), nil) } -func (a *application) GetInfo(id string, callback func(proto.Command)) { - a.Request(proto.NewCmd("i", id), callback) +func (a *application) GetInfo(id string, callback func(*proto.Object)) { + a.Request(proto.NewCmd("i", id), func(cmd proto.Command) { + if cmd.Kind == "i" && len(cmd.Args) > 0 { + callback(&cmd.Args[0]) + } else { + callback(nil) + } + }) } func (a *application) auth(name string, authCallback func(success bool)) { |
