Skip to content

Commit

Permalink
chore: subscribe to notifications (23196)
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya committed May 28, 2024
1 parent 18ec7d9 commit e7c21b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func main() {

e.POST("/nip47/info", svc.InfoHandler)
e.POST("/nip47", svc.NIP47Handler)
e.POST("/nip47/subscriptions", svc.NIP47SubscriptionHandler)
e.POST("/nip47/notifications", svc.NIP47NotificationsHandler)
e.POST("/subscriptions", svc.SubscriptionHandler)
e.DELETE("/subscriptions/:id", svc.StopSubscriptionHandler)
e.Use(echologrus.Middleware())
Expand Down
4 changes: 2 additions & 2 deletions internal/nostr/nostr.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func (svc *Service) NIP47Handler(c echo.Context) error {
return c.JSON(http.StatusOK, event)
}

func (svc *Service) NIP47SubscriptionHandler(c echo.Context) error {
func (svc *Service) NIP47NotificationsHandler(c echo.Context) error {
var requestData NIP47SubscriptionRequest
// send in a pubkey and authenticate by signing
if err := c.Bind(&requestData); err != nil {
Expand Down Expand Up @@ -309,7 +309,7 @@ func (svc *Service) NIP47SubscriptionHandler(c echo.Context) error {
WebhookUrl: requestData.WebhookUrl,
Open: true,
Authors: &[]string{requestData.WalletPubkey},
Kinds: &[]int{23195},
Kinds: &[]int{23196},
}

tags := new(nostr.TagMap)
Expand Down

0 comments on commit e7c21b4

Please sign in to comment.