Build / Build (push) Successful in 35s
- MongoDB.Entities 26, FFMpegCore 6, HtmlSanitizer 11, Serilog's MongoDB sink 8, OpenIddict 7.8, MailKit 4.18.2, Markdig 1.6, Swashbuckle 10.3, QRCoder 1.8.1 and the .NET 10.0.14 sign-in library; the build uses SDK 10.0.403. The two packages with known vulnerabilities in the old set are gone. - Stored records are read and written exactly as before: ids keep their form, personas and groups still get ids that carry their published day, and an older version can still read what this one writes. - Videos are probed, transcoded and given a poster frame as before. - Federated posts are cleaned exactly as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W4YtEJrgxG12Pc39Fai8Bd
70 lines
1.8 KiB
C#
70 lines
1.8 KiB
C#
using MongoDB.Entities;
|
|
|
|
using PrivaPub.Infrastructure.Data;
|
|
using PrivaPub.Infrastructure.Ids;
|
|
|
|
namespace PrivaPub.Models.Group
|
|
{
|
|
public class Group : Entity, IOwnId
|
|
{
|
|
public string UserName { get; set; }//preferredUsername
|
|
public string Name { get; set; }//name
|
|
public string Description { get; set; }//summary, Markdown
|
|
|
|
public string Url { get; set; }
|
|
public string Domain { get; set; }
|
|
public string InboxURL { get; set; }
|
|
public string OutboxURL { get; set; }
|
|
public string PictureURL { get; set; }//icon
|
|
public string ThumbnailURL { get; set; }//image
|
|
public string PrivateKey { get; set; }
|
|
public string PublicKey { get; set; }
|
|
|
|
public GroupKind Kind { get; set; }
|
|
public PostingPolicy PostingPolicy { get; set; }
|
|
public List<string> Rules { get; set; } = new();
|
|
public bool IsDiscoverable { get; set; } = true;
|
|
public bool ManuallyApprovesMembers { get; set; }
|
|
public string OwnerAvatarId { get; set; }
|
|
public List<GroupMember> Members { get; set; } = new();
|
|
|
|
public string InvitationCode { get; set; }
|
|
public string HashedInvitationPassword { get; set; }
|
|
|
|
public DateTime CreationDate { get; set; } = DateTime.UtcNow;
|
|
public DateTime PublishedOn { get; set; } = PrivacyIds.PublishedDay(DateTime.UtcNow);
|
|
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
|
public DateTime? DeletionAt { get; set; }
|
|
|
|
public string NewId() => PrivacyIds.ForDay(PublishedOn);
|
|
}
|
|
|
|
public class GroupMember
|
|
{
|
|
public string AvatarId { get; set; }//local Avatar.ID, or the actor URI when IsForeign
|
|
public bool IsForeign { get; set; }
|
|
public GroupRole Role { get; set; } = GroupRole.Member;
|
|
public DateTime JoinedAt { get; set; } = DateTime.UtcNow;
|
|
}
|
|
|
|
public enum GroupKind
|
|
{
|
|
Circle,
|
|
Community
|
|
}
|
|
|
|
public enum PostingPolicy
|
|
{
|
|
Followers,
|
|
Anyone,
|
|
Moderators
|
|
}
|
|
|
|
public enum GroupRole
|
|
{
|
|
Member,
|
|
Moderator,
|
|
Owner
|
|
}
|
|
}
|