diff --git a/DysonNetwork.Shared/Models/Post.cs b/DysonNetwork.Shared/Models/Post.cs index 11199b3..391ae61 100644 --- a/DysonNetwork.Shared/Models/Post.cs +++ b/DysonNetwork.Shared/Models/Post.cs @@ -73,7 +73,7 @@ public class SnPost : ModelBase, IIdentifiedResource, IActivity public Guid PublisherId { get; set; } public SnPublisher Publisher { get; set; } = null!; - public List Awards { get; set; } = null!; + public List Awards { get; set; } = []; [JsonIgnore] public List Reactions { get; set; } = []; public List Tags { get; set; } = []; public List Categories { get; set; } = []; @@ -174,7 +174,7 @@ public class SnPost : ModelBase, IIdentifiedResource, IActivity } proto.Attachments.AddRange(Attachments.Select(a => a.ToProtoValue())); - proto.Awards.AddRange(Awards.Select(a => a.ToProto())); + proto.Awards.AddRange(Awards.Select(a => a.ToProtoValue())); proto.Reactions.AddRange(Reactions.Select(r => r.ToProtoValue())); proto.Tags.AddRange(Tags.Select(t => t.ToProtoValue())); proto.Categories.AddRange(Categories.Select(c => c.ToProtoValue())); @@ -382,7 +382,7 @@ public class SnPostAward : ModelBase [JsonIgnore] public SnPost Post { get; set; } = null!; public Guid AccountId { get; set; } - public PostAward ToProto() + public PostAward ToProtoValue() { var proto = new PostAward { @@ -395,9 +395,7 @@ public class SnPostAward : ModelBase UpdatedAt = Timestamp.FromDateTimeOffset(UpdatedAt.ToDateTimeOffset()) }; if (Message != null) - { proto.Message = Message; - } return proto; } } diff --git a/DysonNetwork.Sphere/Post/PostServiceGrpc.cs b/DysonNetwork.Sphere/Post/PostServiceGrpc.cs index f96e466..7e4c490 100644 --- a/DysonNetwork.Sphere/Post/PostServiceGrpc.cs +++ b/DysonNetwork.Sphere/Post/PostServiceGrpc.cs @@ -67,9 +67,7 @@ public class PostServiceGrpc(AppDatabase db, PostService ps) : Shared.Proto.Post .Include(p => p.Categories) .Include(p => p.RepliedPost) .Include(p => p.ForwardedPost) - .Include(p => p.Attachments) .Include(p => p.Awards) - .Include(p => p.Reactions) .Include(p => p.FeaturedRecords) .Where(p => p.DeletedAt == null) // Only active posts .AsQueryable();