From aecfd97c96bef0ed18720c9db1dba360990f3ec5 Mon Sep 17 00:00:00 2001 From: Iris Lightshard Date: Fri, 16 Aug 2024 18:36:01 -0600 Subject: [PATCH] MisskeyAdapter, NostrAdapter: try to fix misskey client context timeout, fix type signatures --- adapter/misskey.go | 9 +++++---- adapter/nostr.go | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/adapter/misskey.go b/adapter/misskey.go index a8ccf98..a10aa50 100644 --- a/adapter/misskey.go +++ b/adapter/misskey.go @@ -89,8 +89,8 @@ func (self *MisskeyAdapter) poll() { var latest *time.Time - notesService := self.mk.Notes() - timelineService := notesService.Timeline() + var notesService *n.Service + var timelineService *tl.Service for { select { @@ -99,7 +99,8 @@ func (self *MisskeyAdapter) poll() { return } default: - + notesService = self.mk.Notes() + timelineService = notesService.Timeline() // TODO: we have to actually decode and pass our filter criteria // probe for new notes @@ -265,7 +266,7 @@ func (self *MisskeyAdapter) toAuthor(usr mkm.User) *Author { return &author } -func (self *MisskeyAdapter) Fetch(etype, ids []string) error { +func (self *MisskeyAdapter) Fetch(etype string, ids []string) error { for _, id := range ids { switch etype { case "message": diff --git a/adapter/nostr.go b/adapter/nostr.go index 7f13fdf..905520d 100644 --- a/adapter/nostr.go +++ b/adapter/nostr.go @@ -79,7 +79,7 @@ func (self *NostrAdapter) Subscribe(filter string) []error { return nil } -func (self *NostrAdapter) Fetch(etype, ids []string) error { +func (self *NostrAdapter) Fetch(etype string, ids []string) error { return nil }