[backend/federation] Include fully rendered renote target in rendered activity when renote user matches

This commit is contained in:
Laura Hausmann 2024-05-07 01:11:08 +02:00
parent fe7d85fa91
commit 2519f382c5
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -274,8 +274,11 @@ public class NoteService(
var actor = userRenderer.RenderLite(user);
ASActivity activity = note is { IsPureRenote: true, Renote: not null }
? ActivityPub.ActivityRenderer.RenderAnnounce(noteRenderer.RenderLite(note.Renote),
note.GetPublicUri(config.Value), actor, note.Visibility,
? ActivityPub.ActivityRenderer.RenderAnnounce(note.Renote.User == note.User
? await noteRenderer.RenderAsync(note.Renote)
: noteRenderer.RenderLite(note.Renote),
note.GetPublicUri(config.Value), actor,
note.Visibility,
user.GetPublicUri(config.Value) + "/followers")
: ActivityPub.ActivityRenderer.RenderCreate(await noteRenderer.RenderAsync(note, mentions), actor);