add conclusion

This commit is contained in:
2026-09-07 02:54:23 +07:00
parent 106d2830fa
commit 94fc85f074
18 changed files with 1112 additions and 520 deletions
+15
View File
@@ -49,11 +49,26 @@ func mapStory(o *storytelling.Story) *proto.Story {
return &proto.Story{
Background: o.Background,
Introduction: mapIntroduction(o.Introduction),
Conclusion: mapConclusion(o.Conclusion),
Places: mapPlaces(o.Places),
Questions: mapQuestions(o.Questions),
}
}
func mapConclusion(o *storytelling.Conclusion) *proto.Conclusion {
if o == nil {
return nil
}
return &proto.Conclusion{Text: o.Text, Video: o.Video}
}
func convertConclusion(o *proto.Conclusion) *storytelling.Conclusion {
if o == nil || (o.Text == "" && o.Video == "") {
return nil
}
return &storytelling.Conclusion{Text: textFormatter.FormatText(o.Text), Video: o.Video}
}
func mapIntroduction(o *storytelling.Introduction) *proto.Introduction {
if o == nil {
return nil