From fa499d3bef3851f239e6554634d0370871440d6b Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 29 Sep 2023 21:52:59 +0200 Subject: [PATCH] feat: get correct type url if protov2 --- proto/properties.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proto/properties.go b/proto/properties.go index d7be55a2..d83f10c5 100644 --- a/proto/properties.go +++ b/proto/properties.go @@ -582,6 +582,10 @@ func RegisterMapType(x interface{}, name string) { // MessageName returns the fully-qualified proto name for the given message type. func MessageName(x Message) string { + if m, ok := x.(protov2.Message); ok { + return string(m.ProtoReflect().Descriptor().FullName()) + } + type xname interface { XXX_MessageName() string }