Files
sendico/api/pkg/messaging/notifications/invitation/invitation.go
Stephan D 62a6631b9a
All checks were successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
service backend
2025-11-07 18:35:26 +01:00

44 lines
1.2 KiB
Go

package notifications
import (
messaging "github.com/tech/sendico/pkg/messaging/envelope"
on "github.com/tech/sendico/pkg/messaging/notifications/object"
nm "github.com/tech/sendico/pkg/model/notification"
"github.com/tech/sendico/pkg/mservice"
"go.mongodb.org/mongo-driver/bson/primitive"
)
func InvitationCreated(
sender string,
actorAccountRef primitive.ObjectID,
objectType mservice.Type,
objectRef primitive.ObjectID,
) messaging.Envelope {
return on.ObjectCreated(sender, actorAccountRef, mservice.Invitations, objectRef)
}
func InvitationUpdated(
sender string,
actorAccountRef primitive.ObjectID,
objectRef primitive.ObjectID,
) messaging.Envelope {
return on.ObjectUpdated(sender, actorAccountRef, mservice.Invitations, objectRef)
}
func InvitationDeleted(
sender string,
actorAccountRef primitive.ObjectID,
objectRef primitive.ObjectID,
) messaging.Envelope {
return on.ObjectDeleted(sender, actorAccountRef, mservice.Invitations, objectRef)
}
func Invitation(
sender string,
actorAccountRef primitive.ObjectID,
objectRef primitive.ObjectID,
action nm.NotificationAction,
) messaging.Envelope {
return on.Object(sender, actorAccountRef, mservice.Invitations, objectRef, action)
}