45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
using PrivaPub.Models.ActivityPub.Extra;
|
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace PrivaPub.Models.ActivityPub
|
|
{
|
|
[JsonSerializable(typeof(ActivityPubActivity))]
|
|
public class ActivityPubActivity : ActivityPubObject
|
|
{
|
|
[JsonPropertyName("actor")]
|
|
public ActivityPubActor Actor { get; set; }
|
|
|
|
[JsonPropertyName("object")]
|
|
public ActivityPubObject Object { get; set; }
|
|
|
|
[JsonPropertyName("target")]
|
|
public ActivityPubObject Target { get; set; }
|
|
|
|
[JsonPropertyName("result")]
|
|
public ActivityPubResult Result { get; set; }
|
|
|
|
[JsonPropertyName("origin")]
|
|
public ActivityPubOrigin Origin { get; set; }
|
|
|
|
[JsonPropertyName("instrument")]
|
|
public ActivityPubInstrument Instrument { get; set; }
|
|
|
|
[JsonIgnore]
|
|
public bool NeedsObjectForInbox => Type is
|
|
ObjectType.Create or
|
|
ObjectType.Update or
|
|
ObjectType.Delete or
|
|
ObjectType.Follow or
|
|
ObjectType.Add or
|
|
ObjectType.Remove or
|
|
ObjectType.Like or
|
|
ObjectType.Block or
|
|
ObjectType.Undo;
|
|
[JsonIgnore]
|
|
public bool NeedsTargetForInbox => Type is
|
|
ObjectType.Add or
|
|
ObjectType.Remove;
|
|
}
|
|
}
|