From c5b277fe18803c871951b960485491527a2c0432 Mon Sep 17 00:00:00 2001 From: Masala Date: Tue, 12 Mar 2024 11:54:58 +0000 Subject: [PATCH] talekclient: parse read-only share fixes #108 --- cli/talekclient/main.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/cli/talekclient/main.go b/cli/talekclient/main.go index ddc32d4..27a013b 100644 --- a/cli/talekclient/main.go +++ b/cli/talekclient/main.go @@ -56,8 +56,18 @@ func main() { } topic = *nt } else { - if err = topic.UnmarshalText(topicdata); err != nil { - panic(err) + err = topic.UnmarshalText(topicdata) + if err != nil { + // if it is a read-only share, unmarshal only the Handle part + if *read { + topic.SigningPrivateKey = new([64]byte) + err = topic.Handle.UnmarshalText(topicdata) + if err != nil { + panic(err) + } + } else { + panic(err) + } } }