diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index a60f47a..b1e8088 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,10 +4,11 @@
-
+
-
-
+
+
+
@@ -154,7 +155,6 @@
-
@@ -179,7 +179,8 @@
-
+
+
true
diff --git a/go.mod b/go.mod
index 4a109f1..9940376 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.22
toolchain go1.22.5
require (
- git.solsynth.dev/hydrogen/dealer v0.0.0-20240919131945-00c52eba6827
+ git.solsynth.dev/hydrogen/dealer v0.0.0-20241015165700-60e4bbfd9782
github.com/dgraph-io/ristretto v0.1.1
github.com/eko/gocache/lib/v4 v4.1.6
github.com/eko/gocache/store/ristretto/v4 v4.2.2
diff --git a/go.sum b/go.sum
index fc33bc0..321b52e 100644
--- a/go.sum
+++ b/go.sum
@@ -33,6 +33,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
git.solsynth.dev/hydrogen/dealer v0.0.0-20240919131945-00c52eba6827 h1:1ACMPm2ArRpVNYrND/y/R6oPiuMfKe49fP+lG3mcNug=
git.solsynth.dev/hydrogen/dealer v0.0.0-20240919131945-00c52eba6827/go.mod h1:Q51JPkKnV0UoOT/IRmdBh5CyfSlp7s8BRGzgooYHqkI=
+git.solsynth.dev/hydrogen/dealer v0.0.0-20241015165700-60e4bbfd9782 h1:HUgt8RmDp5AKLlT/QGk4QXcO23OEMVpRYRjgLfOf45c=
+git.solsynth.dev/hydrogen/dealer v0.0.0-20241015165700-60e4bbfd9782/go.mod h1:Q51JPkKnV0UoOT/IRmdBh5CyfSlp7s8BRGzgooYHqkI=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
diff --git a/pkg/internal/grpc/notifier.go b/pkg/internal/grpc/notifier.go
index 7e076cb..541badb 100644
--- a/pkg/internal/grpc/notifier.go
+++ b/pkg/internal/grpc/notifier.go
@@ -3,10 +3,10 @@ package grpc
import (
"context"
"fmt"
+ "git.solsynth.dev/hydrogen/dealer/pkg/hyper"
"github.com/rs/zerolog/log"
"git.solsynth.dev/hydrogen/passport/pkg/internal/database"
- jsoniter "github.com/json-iterator/go"
"github.com/samber/lo"
"git.solsynth.dev/hydrogen/dealer/pkg/proto"
@@ -21,8 +21,7 @@ func (v *Server) NotifyUser(_ context.Context, in *proto.NotifyUserRequest) (*pr
return nil, fmt.Errorf("unable to get account: %v", err)
}
- var metadata map[string]any
- _ = jsoniter.Unmarshal(in.GetNotify().GetMetadata(), &metadata)
+ metadata := hyper.DecodeMap(in.GetNotify().GetMetadata())
notification := models.Notification{
Topic: in.GetNotify().GetTopic(),
@@ -64,8 +63,7 @@ func (v *Server) NotifyUserBatch(_ context.Context, in *proto.NotifyUserBatchReq
return nil, fmt.Errorf("unable to get account: %v", err)
}
- var metadata map[string]any
- _ = jsoniter.Unmarshal(in.GetNotify().GetMetadata(), &metadata)
+ metadata := hyper.DecodeMap(in.GetNotify().GetMetadata())
var checklist = make(map[uint]bool, len(users))
var notifications []models.Notification
@@ -113,8 +111,7 @@ func (v *Server) NotifyAllUser(_ context.Context, in *proto.NotifyRequest) (*pro
return nil, fmt.Errorf("unable to get account: %v", err)
}
- var metadata map[string]any
- _ = jsoniter.Unmarshal(in.GetMetadata(), &metadata)
+ metadata := hyper.DecodeMap(in.GetMetadata())
var checklist = make(map[uint]bool, len(users))
var notifications []models.Notification