P6 done: personas can be quoted, under the owner's default of anyone, automatically
- Our public and unlisted posts state interactionPolicy.canQuote. The policy comes from the post, then the persona
(`source[quote_policy]`: public, followers or nobody; default public as the owner chose), and is always nobody for
followers-only posts and DMs.
- QuoteRequests are answered with Accept{result} naming a parrot-licence at /peasants/{name}/parrot-licences/{id}
(the route name the owner chose), or with Reject. Followers-only checks that the requester really follows.
- A licence is a QuoteAuthorization naming both posts; revoking it (POST /api/v1/statuses/:id/quotes/:quoting_id/revoke)
marks it 410, sends Delete{licence} to the quoter and the persona's followers, and revokes our own copy of the quote.
- A quote that arrives with one of our licences is accepted only if that licence is ours, unrevoked and names exactly
that quoting post. One persona quoting another gets a licence too.
- Mastodon API: quote_approval for our posts (automatic, followers, current_user), `quote_approval_policy` when posting,
PUT /api/v1/statuses/:id/interaction_policy, `source.quote_policy`.
Checked live: GoToSocial still accepts our posts with the policy stated, and leaves likes, replies and boosts open.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012CzABvBkbcFqoHdmi8b9WB
This commit is contained in:
1 parent
f9658a8e7a
commit
e6729c77e7
19 files changed
+372
-17
No files matched your search
@@ -0,0 +1,14 @@
|
||||
using MongoDB.Entities;
|
||||
|
||||
namespace PrivaPub.Models.Federation
|
||||
{
|
||||
public class QuoteLicence : Entity
|
||||
{
|
||||
public string PostId { get; set; }//the quoted local post
|
||||
public string AuthorAvatarId { get; set; }
|
||||
public string QuotingObjectURI { get; set; }
|
||||
public string QuoterActorURI { get; set; }
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
public DateTime? RevokedAt { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,8 @@ namespace PrivaPub.Models.Post
|
||||
public string QuotedPostId { get; set; }//our copy of the quoted post, once fetched
|
||||
public QuoteState QuoteState { get; set; }
|
||||
public string QuoteAuthorizationURI { get; set; }//FEP-044f: the quoted author's stamp
|
||||
public bool QuoteByConsent { get; set; }//our quote of a post whose server asks for consent (FEP-044f), so `quote` is sent
|
||||
public bool QuoteByConsent { get; set; }
|
||||
public string LocalQuotePolicy { get; set; }//who may quote this local post: QuotePolicies.Public, Followers or Nobody//our quote of a post whose server asks for consent (FEP-044f), so `quote` is sent
|
||||
public int QuotesCount { get; set; }
|
||||
[BsonIgnoreIfNull]
|
||||
public InteractionRule QuotePolicy { get; set; }//a remote post's interactionPolicy.canQuote; null when it states none
|
||||
|
||||
@@ -110,6 +110,16 @@ namespace PrivaPub.Models.User
|
||||
public string DefaultVisibility { get; set; } = "public";
|
||||
public bool DefaultSensitive { get; set; }
|
||||
public string DefaultLanguage { get; set; }
|
||||
public string QuotePolicy { get; set; } = QuotePolicies.Public;//owner decision: anyone may quote a public post, automatically
|
||||
}
|
||||
|
||||
public static class QuotePolicies
|
||||
{
|
||||
public const string Public = "public";
|
||||
public const string Followers = "followers";
|
||||
public const string Nobody = "nobody";
|
||||
|
||||
public static bool IsKnown(string value) => value is Public or Followers or Nobody;
|
||||
}
|
||||
|
||||
public enum AvatarServer
|
||||
|
||||
Reference in new issue
Block a user