Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya committed Jan 24, 2024
1 parent 1e3d720 commit 3e8f41c
Show file tree
Hide file tree
Showing 2 changed files with 426 additions and 347 deletions.
4 changes: 2 additions & 2 deletions service.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (svc *Service) StartSubscription(ctx context.Context, sub *nostr.Subscripti
svc.Logger.Info("Received EOS")

for event := range sub.Events {
go svc.handleAndPublishEvent(ctx, sub, event)
go svc.HandleEvent(ctx, sub, event)
}
svc.Logger.Info("Subscription ended")
}()
Expand Down Expand Up @@ -137,7 +137,7 @@ func (svc *Service) PublishEvent(ctx context.Context, sub *nostr.Subscription, e
}
}

func (svc *Service) handleAndPublishEvent(ctx context.Context, sub *nostr.Subscription, event *nostr.Event) {
func (svc *Service) HandleEvent(ctx context.Context, sub *nostr.Subscription, event *nostr.Event) {
var resp *nostr.Event
svc.Logger.WithFields(logrus.Fields{
"eventId": event.ID,
Expand Down
Loading

0 comments on commit 3e8f41c

Please sign in to comment.