- A public post that links to a page gets a preview card: from the post's own data first (FEP-8967 Link preview, the object's image, title and summary); otherwise the server reads the page once, 0-60 s after the post arrives, never when someone reads it. OpenGraph and Twitter tags give title, description and image; one LinkPreview per address is cached for 7 days and shared by the whole server, so a fetch never points at a persona. - Lemmy link posts, which carry no title or description, get them filled in. - The page fetch uses the guarded client (public addresses, three redirects, HTML only, first 512 KB). - Federation:FetchLinkPreviews switches page fetching off. - Local public posts get cards too. Checked live: a link to a GoToSocial profile page becomes a card with its title, description and proxied image. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012CzABvBkbcFqoHdmi8b9WB
40 lines
806 B
C#
40 lines
806 B
C#
using MongoDB.Entities;
|
|
|
|
namespace PrivaPub.Models.Jobs
|
|
{
|
|
public class Job : Entity
|
|
{
|
|
public JobKind Kind { get; set; }
|
|
public JobState State { get; set; }
|
|
public string Payload { get; set; }
|
|
public string Host { get; set; }
|
|
public string DedupeKey { get; set; }
|
|
public int Attempts { get; set; }
|
|
public DateTime RunAt { get; set; } = DateTime.UtcNow;
|
|
public DateTime? LeasedUntil { get; set; }
|
|
public string LeaseOwner { get; set; }
|
|
public string LastError { get; set; }
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
public DateTime? FinishedAt { get; set; }
|
|
}
|
|
|
|
public enum JobKind
|
|
{
|
|
Deliver,
|
|
ProcessInbox,
|
|
FetchAncestors,
|
|
DescribeInstance,
|
|
PollRefresh,
|
|
PollClose,
|
|
FetchPreview
|
|
}
|
|
|
|
public enum JobState
|
|
{
|
|
Pending,
|
|
Running,
|
|
Done,
|
|
Dead
|
|
}
|
|
}
|