Files
sendico/api/pkg/messaging/notifications/invitation/invitation.go
2026-01-31 00:26:42 +01:00

44 lines
1.1 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/v2/bson"
)
func InvitationCreated(
sender string,
actorAccountRef bson.ObjectID,
objectType mservice.Type,
objectRef bson.ObjectID,
) messaging.Envelope {
return on.ObjectCreated(sender, actorAccountRef, mservice.Invitations, objectRef)
}
func InvitationUpdated(
sender string,
actorAccountRef bson.ObjectID,
objectRef bson.ObjectID,
) messaging.Envelope {
return on.ObjectUpdated(sender, actorAccountRef, mservice.Invitations, objectRef)
}
func InvitationDeleted(
sender string,
actorAccountRef bson.ObjectID,
objectRef bson.ObjectID,
) messaging.Envelope {
return on.ObjectDeleted(sender, actorAccountRef, mservice.Invitations, objectRef)
}
func Invitation(
sender string,
actorAccountRef bson.ObjectID,
objectRef bson.ObjectID,
action nm.NotificationAction,
) messaging.Envelope {
return on.Object(sender, actorAccountRef, mservice.Invitations, objectRef, action)
}