diff --git a/ProjectLighthouse/Levels/Slot.cs b/ProjectLighthouse/Levels/Slot.cs index cf981518..5b6c96df 100644 --- a/ProjectLighthouse/Levels/Slot.cs +++ b/ProjectLighthouse/Levels/Slot.cs @@ -337,7 +337,7 @@ public class Slot LbpSerializer.StringElement("firstPublished", this.FirstUploaded) + LbpSerializer.StringElement("lastUpdated", this.LastUpdated) + (fullSerialization ? - yourReview?.Serialize() + + yourReview?.Serialize(null, "yourReview") + LbpSerializer.StringElement("reviewsEnabled", ServerConfiguration.Instance.UserGeneratedContentLimits.LevelReviewsEnabled) + LbpSerializer.StringElement("commentsEnabled", ServerConfiguration.Instance.UserGeneratedContentLimits.LevelCommentsEnabled && this.CommentsEnabled) : "") + diff --git a/ProjectLighthouse/PlayerData/Reviews/Review.cs b/ProjectLighthouse/PlayerData/Reviews/Review.cs index 1a9f3ab6..32690ebb 100644 --- a/ProjectLighthouse/PlayerData/Reviews/Review.cs +++ b/ProjectLighthouse/PlayerData/Reviews/Review.cs @@ -60,7 +60,7 @@ public class Review [XmlElement("thumbsdown")] public int ThumbsDown { get; set; } - public string Serialize(RatedReview? yourRatingStats = null) + public string Serialize(RatedReview? yourRatingStats = null, string rootElement = "review") { string deletedBy = this.DeletedBy switch { @@ -82,6 +82,6 @@ public class Review LbpSerializer.StringElement("thumbsdown", this.ThumbsDown) + LbpSerializer.StringElement("yourthumb", yourRatingStats?.Thumb ?? 0); - return LbpSerializer.TaggedStringElement("review", reviewData, "id", this.SlotId + "." + this.Reviewer?.Username); + return LbpSerializer.TaggedStringElement(rootElement, reviewData, "id", this.SlotId + "." + this.Reviewer?.Username); } } \ No newline at end of file