From 88bb37447950e7312135b7d8c283910822f9c161 Mon Sep 17 00:00:00 2001 From: AnastasiaShemyakinskaya Date: Thu, 3 Apr 2025 10:42:10 +0200 Subject: [PATCH] GO-5297: fix client and update any-sync Signed-off-by: AnastasiaShemyakinskaya --- .idea/vcs.xml | 2 +- core/anytype/bootstrap.go | 2 ++ core/pushnotifcation/client/client.go | 2 +- core/pushnotifcation/service.go | 2 +- go.mod | 2 +- go.sum | 6 ++---- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 94a25f7f4..35eb1ddfb 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/core/anytype/bootstrap.go b/core/anytype/bootstrap.go index 6204c8d7d..0bcad87e0 100644 --- a/core/anytype/bootstrap.go +++ b/core/anytype/bootstrap.go @@ -83,6 +83,7 @@ import ( "github.com/anyproto/anytype-heart/core/peerstatus" "github.com/anyproto/anytype-heart/core/publish" "github.com/anyproto/anytype-heart/core/pushnotifcation" + "github.com/anyproto/anytype-heart/core/pushnotifcation/client" "github.com/anyproto/anytype-heart/core/session" "github.com/anyproto/anytype-heart/core/spaceview" "github.com/anyproto/anytype-heart/core/subscription" @@ -323,6 +324,7 @@ func Bootstrap(a *app.App, components ...app.Component) { Register(peerstatus.New()). Register(spaceview.New()). Register(api.New()). + Register(client.NewPushClient()). Register(spacekeystore.New()). Register(pushnotifcation.New()) } diff --git a/core/pushnotifcation/client/client.go b/core/pushnotifcation/client/client.go index 31cf26432..3fccb4c2d 100644 --- a/core/pushnotifcation/client/client.go +++ b/core/pushnotifcation/client/client.go @@ -33,7 +33,7 @@ type client struct { peerIds []string } -func NewClient() Client { +func NewPushClient() Client { return &client{} } diff --git a/core/pushnotifcation/service.go b/core/pushnotifcation/service.go index 399ebe827..b2d1e1ad2 100644 --- a/core/pushnotifcation/service.go +++ b/core/pushnotifcation/service.go @@ -35,7 +35,7 @@ type service struct { } func (s *service) Init(a *app.App) (err error) { - s.pushClient = client.NewClient() + s.pushClient = app.MustComponent[client.Client](a) s.wallet = app.MustComponent[wallet.Wallet](a) s.spaceKeyStore = app.MustComponent[spacekeystore.Store](a) return diff --git a/go.mod b/go.mod index a42ece9bd..a2b468373 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/VividCortex/ewma v1.2.0 github.com/adrium/goheif v0.0.0-20230113233934-ca402e77a786 github.com/anyproto/any-store v0.1.12 - github.com/anyproto/any-sync v0.6.10-0.20250328101049-7b02c1945e6d + github.com/anyproto/any-sync v0.6.12-0.20250403083555-120f03409ea0 github.com/anyproto/anytype-publish-server/publishclient v0.0.0-20250131145601-de288583ff2a github.com/anyproto/anytype-push-server/pushclient v0.0.0-20250402124745-6451298047f7 github.com/anyproto/go-chash v0.1.0 diff --git a/go.sum b/go.sum index 317ff45c6..c1c4cd001 100644 --- a/go.sum +++ b/go.sum @@ -80,12 +80,10 @@ github.com/andybalholm/cascadia v1.3.3 h1:AG2YHrzJIm4BZ19iwJ/DAua6Btl3IwJX+VI4kk github.com/andybalholm/cascadia v1.3.3/go.mod h1:xNd9bqTn98Ln4DwST8/nG+H0yuB8Hmgu1YHNnWw0GeA= github.com/anyproto/any-store v0.1.12 h1:VgTyfxM4BvFnYMbwWxV9FQmXWNlwp9xriWFh6VOjcm0= github.com/anyproto/any-store v0.1.12/go.mod h1:T6WNuCHcuXIRiaZ+QAcBHdxIbPbgNCMIf1u3P9jvAyU= -github.com/anyproto/any-sync v0.6.10-0.20250328101049-7b02c1945e6d h1:AU7TEdUV4NZSNilcWfAhGVdZUsZutfDx3Q0cJ11S4A4= -github.com/anyproto/any-sync v0.6.10-0.20250328101049-7b02c1945e6d/go.mod h1:TSKgCoTV40Bt8AfCh3RxPUUAfYGrhc8Mzh8/AiVlvX4= +github.com/anyproto/any-sync v0.6.12-0.20250403083555-120f03409ea0 h1:wF1tT7uXmuZoWI/+yeH7pGo0S7AZF4WJzb/BWyec3cc= +github.com/anyproto/any-sync v0.6.12-0.20250403083555-120f03409ea0/go.mod h1:TSKgCoTV40Bt8AfCh3RxPUUAfYGrhc8Mzh8/AiVlvX4= github.com/anyproto/anytype-publish-server/publishclient v0.0.0-20250131145601-de288583ff2a h1:ZZM+0OUCQMWSLSflpkf0ZMVo3V76qEDDIXPpQOClNs0= github.com/anyproto/anytype-publish-server/publishclient v0.0.0-20250131145601-de288583ff2a/go.mod h1:4fkueCZcGniSMXkrwESO8zzERrh/L7WHimRNWecfGM0= -github.com/anyproto/anytype-push-server/pushclient v0.0.0-20250319134422-fd3f261ea023 h1:c7zj0NKKxFxqmK2PjNofpNB2yRCOzbA0gMLCiaEuLeY= -github.com/anyproto/anytype-push-server/pushclient v0.0.0-20250319134422-fd3f261ea023/go.mod h1:IjVnEyh6QiLsPPfZinTTnOtxe79uJUKZyC1z65b2Yuc= github.com/anyproto/anytype-push-server/pushclient v0.0.0-20250402124745-6451298047f7 h1:oKkEnxnN1jeB1Ty20CTMH3w4WkCrV8dOQy1Myetg7XA= github.com/anyproto/anytype-push-server/pushclient v0.0.0-20250402124745-6451298047f7/go.mod h1:IjVnEyh6QiLsPPfZinTTnOtxe79uJUKZyC1z65b2Yuc= github.com/anyproto/badger/v4 v4.2.1-0.20240110160636-80743fa3d580 h1:Ba80IlCCxkZ9H1GF+7vFu/TSpPvbpDCxXJ5ogc4euYc=