POST /api/v1/statuses with scheduled_at no longer posts at once: the post is kept as asked (at least five minutes ahead; 300 waiting, 25 a day, as Mastodon allows), its media kept from the janitor, and a PublishScheduled job publishes it at its time as the persona. scheduled_statuses lists, moves and drops them; a moved post's old job finds it not due. Idempotency-Key holds for scheduling too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
29 lines
854 B
C#
29 lines
854 B
C#
using MongoDB.Entities;
|
|
|
|
namespace PrivaPub.Models.Media
|
|
{
|
|
public class MediaAttachment : Entity
|
|
{
|
|
public string OwnerAvatarId { get; set; }
|
|
public string PostId { get; set; }
|
|
public string Kind { get; set; }
|
|
public string ContentType { get; set; }
|
|
public string FilePath { get; set; }
|
|
public string PreviewPath { get; set; }
|
|
public long Size { get; set; }
|
|
public string Description { get; set; }
|
|
public string Blurhash { get; set; }
|
|
public int? Width { get; set; }
|
|
public int? Height { get; set; }
|
|
public float[] Focus { get; set; }
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
public DateTime? AttachedAt { get; set; }
|
|
public string ScheduledStatusId { get; set; }//kept for a scheduled post until it is published or dropped
|
|
}
|
|
|
|
public class MediaSecret : Entity
|
|
{
|
|
public string Key { get; set; }
|
|
}
|
|
}
|