mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-08 02:55:58 +08:00
config path
This commit is contained in:
@@ -19,10 +19,10 @@ var Terminal = []int{constant.IOSPlatformID, constant.AndroidPlatformID, constan
|
||||
|
||||
type Fcm struct {
|
||||
fcmMsgCli *messaging.Client
|
||||
cache cache.MsgCache
|
||||
cache cache.Cache
|
||||
}
|
||||
|
||||
func NewClient(cache cache.MsgCache) *Fcm {
|
||||
func NewClient(cache cache.Cache) *Fcm {
|
||||
opt := option.WithCredentialsFile(filepath.Join(config.Root, "config", config.Config.Push.Fcm.ServiceAccount))
|
||||
fcmApp, err := firebase.NewApp(context.Background(), nil, opt)
|
||||
if err != nil {
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
func Test_Push(t *testing.T) {
|
||||
var redis cache.MsgCache
|
||||
var redis cache.Cache
|
||||
offlinePusher := NewClient(redis)
|
||||
err := offlinePusher.Push(context.Background(), []string{"userID1"}, "test", "test", &push.Opts{})
|
||||
assert.Nil(t, err)
|
||||
|
||||
Reference in New Issue
Block a user