Build / Build (push) Successful in 1m3s
A singleton ServerSettings (title, descriptions, contact, thumbnail, privacy policy, terms, rules, relays, media overrides, PublishActivity), cached by InstanceSettings and read by the instance API, NodeInfo, the instance actor, the web pages and the mailer; its defaults are the old literals, so nothing changes until an administrator edits. /clientapi/admin/settings (and /thumbnail), /announcements, /relays for administrators; /clientapi/moderator/log, the staff's log (AdminAction, written by domain blocks, backups, settings and the CLI; no IP, never a root paired with its personas). The Mastodon API's rules, extended description, privacy policy, terms of service, domain blocks (Published, Obfuscate), announcements (dismiss, reactions, streaming) and activity (only when published). Reports carry rule ids. Media overrides clamped to hard caps. Relays named by the settings reconcile next to the configured ones. Verified: interop.sh instance accounts relay with mastodon, relay, aoderelay and mailpit, 119 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WpVCoDeM1qUTRp4fXQdfof
39 lines
1.6 KiB
C#
39 lines
1.6 KiB
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 double? DurationSeconds { get; set; }
|
|
// audio and video sent to /api/v2/media are processed by a job: "pending" until then, "failed" (with why) if it can't be
|
|
public string ProcessingState { get; set; }
|
|
public string ProcessingError { 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 string ProfileOfAvatarId { get; set; }//a persona's avatar or header (Kind "avatar" or "header"), never a post's
|
|
public string ServerUse { get; set; }//the server's own picture ("thumbnail", ServerSettings.ThumbnailMediaId): held while it is set
|
|
// set once nothing holds it any more (its post deleted, edited out, replaced, its root removed, never posted): its
|
|
// files move out of what /media/files serves at once, and the janitor deletes them after a grace
|
|
public DateTime? TrashedAt { get; set; }
|
|
public string TrashReason { get; set; }
|
|
}
|
|
|
|
public class MediaSecret : Entity
|
|
{
|
|
public string Key { get; set; }
|
|
}
|
|
}
|