44 lines
1.2 KiB
Go
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)
|
|
}
|