2026-10-01 11:32:33 +02:00
using MongoDB.Entities ;
namespace PrivaPub.Models.Social
{
public class Following : Entity
{
2026-10-08 02:15:28 +02:00
public string AvatarId { get ; set ; } //the local follower: a persona, or the server's reader of feeds (FollowerKind)
public PrivaPub . Models . Federation . LocalActorKind ? FollowerKind { get ; set ; } //null for a persona
2026-10-01 11:32:33 +02:00
public string TargetActorURI { get ; set ; }
public string TargetAccountId { get ; set ; } //Avatar.ID, Group.ID or ForeignAvatar.ID
public bool TargetIsLocal { get ; set ; }
public string TargetInboxURL { get ; set ; }
public FollowState State { get ; set ; }
public string FollowActivityURI { get ; set ; }
public bool ShowReblogs { get ; set ; } = true ;
2026-10-18 08:38:11 +02:00
public bool Notify { get ; set ; } //Mastodon's notify (R8): a `status` notification for each new post of the account
2026-11-10 01:24:43 +01:00
[System.Diagnostics.CodeAnalysis.SuppressMessage("HouseRules", "HR0006", Justification = "Null follows every language, as on Mastodon; an empty list would follow none.")]
2026-10-18 08:38:11 +02:00
public List < string > Languages { get ; set ; } //Mastodon's languages (R8): only its posts in these reach the home; null, every language
2026-10-01 11:32:33 +02:00
public DateTime CreatedAt { get ; set ; } = DateTime . UtcNow ;
2026-10-05 07:32:15 +02:00
public int Resent { get ; set ; } //how many times a request still unanswered was sent again (FollowService.ResendPending)
public DateTime ? ResentAt { get ; set ; }
2026-10-01 11:32:33 +02:00
}
public enum FollowState
{
Requested ,
Accepted
}
}