fix: marshal pubkey correctly

This commit is contained in:
Richard Ramos 2022-04-25 17:39:52 +04:00
parent fe50f12ac9
commit f66ad3d3dd
1 changed files with 6 additions and 1 deletions

View File

@ -548,7 +548,12 @@ func (p *PushNotificationServer) MarshalText() ([]byte, error) {
}
func (p *PushNotificationServer) UnmarshalText(data []byte) error {
pk, err := crypto.UnmarshalPubkey(data)
pubKeyBytes, err := hex.DecodeString(string(data))
if err != nil {
return err
}
pk, err := crypto.UnmarshalPubkey(pubKeyBytes)
if err != nil {
return err
}