A public reply names the author it answers in cc
A reply whose text had lost the @name of the author it answers (decePub prefills it, a reader may delete it) was addressed to nobody on the author's server. PrivaPub delivered it to the author's inbox anyway, but GoToSocial keeps only what is addressed to someone there, so the reply never appeared under the post. A public or unlisted reply to a remote post now names its parent's author in cc, as Pleroma does; the reply already says whom it answers, so nothing new is revealed. The parent author's actor id is kept on the reply (InReplyToActorURI). Found by decePub's end-to-end tests on the town. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
This commit is contained in:
1 parent
6b55b5c35c
commit
d6131af289
4 files changed
+25
No files matched your search
@@ -198,6 +198,7 @@ namespace PrivaPub.Domain.Statuses
|
||||
AnsweringToPostId = parent?.ID,
|
||||
InReplyToURI = parent?.ObjectURI ?? (IsRemoteUri(draft.InReplyTo) ? draft.InReplyTo : default),
|
||||
InReplyToAccountId = parent?.AuthorAccountId ?? parent?.GroupUserId,
|
||||
InReplyToActorURI = parent is { IsFederatedCopy: true } ? parent.ActorURI : default,
|
||||
IsLocalOnly = isLocalOnly,
|
||||
ActorURI = author.Uri,
|
||||
Poll = draft.Poll == default ? default : _polls.Create(draft.Poll),
|
||||
|
||||
@@ -146,6 +146,11 @@ namespace PrivaPub.Federation.Rendering
|
||||
};
|
||||
if (group is { IsCircle: false })
|
||||
cc.Add(group.Uri);
|
||||
// a public reply names the author it answers in cc even when the @name was deleted from its text, as Pleroma does:
|
||||
// GoToSocial keeps only what is addressed to someone there, and the reply already says whom it answers
|
||||
if (post.Visibility is PostVisibility.Public or PostVisibility.Unlisted && !string.IsNullOrEmpty(post.InReplyToActorURI)
|
||||
&& !mentions.Any(m => m.GetValue<string>() == post.InReplyToActorURI))
|
||||
cc.Add(post.InReplyToActorURI);
|
||||
|
||||
var note = NoteBody(post, author, to, cc, inReplyTo);
|
||||
if (group != default)
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace PrivaPub.Models.Post
|
||||
public string AnsweringToPostId { get; set; }//the parent's Post.ID when we hold it
|
||||
public string InReplyToURI { get; set; }
|
||||
public string InReplyToAccountId { get; set; }
|
||||
public string InReplyToActorURI { get; set; }//a local reply's remote parent author, named in its cc
|
||||
public string GroupId { get; set; }
|
||||
public string ConversationId { get; set; }//DmGroup.ID of a direct post
|
||||
public string AudienceURI { get; set; }//a remote community the post was made in
|
||||
|
||||
Reference in new issue
Block a user