zitadel/internal/api/grpc/text/custom_text.go

26 lines
618 B
Go
Raw Normal View History

package text
import (
"github.com/caos/zitadel/internal/api/grpc/object"
"github.com/caos/zitadel/internal/iam/model"
text_pb "github.com/caos/zitadel/pkg/grpc/text"
)
func ModelCustomMsgTextToPb(msg *model.MessageTextView) *text_pb.MessageCustomText {
return &text_pb.MessageCustomText{
Title: msg.Title,
PreHeader: msg.PreHeader,
Subject: msg.Subject,
Greeting: msg.Greeting,
Text: msg.Text,
ButtonText: msg.ButtonText,
FooterText: msg.FooterText,
Details: object.ToViewDetailsPb(
msg.Sequence,
msg.CreationDate,
msg.ChangeDate,
"", //TODO: resourceowner
),
}
}