···1919 return fmt.Errorf("could not determine who to send the notification to: %w", err)
2020 }
21212222+ ll.Debug("Sending notification for %s on %s to %d users: %v", msg.Event, msg.ChurrosObjectId, len(users), users)
2323+2224 subs, err := subscriptionsOfUsers(users)
2325 if err != nil {
2426 return fmt.Errorf("could not determine which subscriptions to send the notification to: %w", err)
···55 "fmt"
6677 "git.inpt.fr/churros/notella/db"
88+ ll "github.com/gwennlbh/label-logger-go"
89)
9101011// AllUsers returns all the users in the database that have at least one notification subscription
···31323233// Receivers determines which users to send the notification to
3334func Receivers(message Message) ([]string, error) {
3535+ ll.Debug("Determining receivers for message %s on %s", message.Event, message.ChurrosObjectId)
3436 switch message.Event {
3537 case EventNewPost:
3638 return receiversForPost(message)