From 0c7288d14ac3437ac1abb8dc9c395ca9095ae697 Mon Sep 17 00:00:00 2001 From: "Richard T. Carback III" <rick.carback@gmail.com> Date: Mon, 19 Jun 2023 19:27:26 +0000 Subject: [PATCH] Modify MuteUser worker func to print the data it's trying to decode on error --- indexedDb/impl/channels/callbacks.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indexedDb/impl/channels/callbacks.go b/indexedDb/impl/channels/callbacks.go index 7fe0a8a1..d6d188a7 100644 --- a/indexedDb/impl/channels/callbacks.go +++ b/indexedDb/impl/channels/callbacks.go @@ -332,12 +332,12 @@ func (m *manager) muteUserCB(data []byte) ([]byte, error) { "failed to JSON unmarshal %T from main thread: %+v", msg, err) } - channelID := id.ID{} + channelID := &id.ID{} err = channelID.UnmarshalJSON(msg.ChannelID) if err != nil { - return nil, err + return nil, errors.Wrapf(err, "ChannelID: %+v", msg.ChannelID) } - m.model.MuteUser(&channelID, msg.PubKey, msg.Unmute) + m.model.MuteUser(channelID, msg.PubKey, msg.Unmute) return nil, nil } -- GitLab