From dc957f6bb77c9d89b52f22b605f79f7be110f546 Mon Sep 17 00:00:00 2001 From: citrons Date: Mon, 9 Jun 2025 12:58:52 -0500 Subject: replies --- client/application.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'client/application.go') 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)) { -- cgit v1.2.3