[backend/federation] Fetch threads with user keypair as well
This commit is contained in:
parent
2c33f7aafc
commit
da63c26887
1 changed files with 4 additions and 4 deletions
|
@ -294,7 +294,7 @@ public class NoteService(
|
||||||
eventSvc.RaiseNoteDeleted(this, hit);
|
eventSvc.RaiseNoteDeleted(this, hit);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Note> ProcessNoteAsync(ASNote note, User actor)
|
public async Task<Note> ProcessNoteAsync(ASNote note, User actor, User? user = null)
|
||||||
{
|
{
|
||||||
var dbHit = await db.Notes.IncludeCommonProperties().FirstOrDefaultAsync(p => p.Uri == note.Id);
|
var dbHit = await db.Notes.IncludeCommonProperties().FirstOrDefaultAsync(p => p.Uri == note.Id);
|
||||||
|
|
||||||
|
@ -345,8 +345,8 @@ public class NoteService(
|
||||||
CreatedAt = createdAt,
|
CreatedAt = createdAt,
|
||||||
UserHost = actor.Host,
|
UserHost = actor.Host,
|
||||||
Visibility = note.GetVisibility(actor),
|
Visibility = note.GetVisibility(actor),
|
||||||
Reply = note.InReplyTo?.Id != null ? await ResolveNoteAsync(note.InReplyTo.Id) : null,
|
Reply = note.InReplyTo?.Id != null ? await ResolveNoteAsync(note.InReplyTo.Id, user: user) : null,
|
||||||
Renote = quoteUrl != null ? await ResolveNoteAsync(quoteUrl) : null
|
Renote = quoteUrl != null ? await ResolveNoteAsync(quoteUrl, user: user) : null
|
||||||
};
|
};
|
||||||
|
|
||||||
if (dbNote.Renote?.IsPureRenote ?? false)
|
if (dbNote.Renote?.IsPureRenote ?? false)
|
||||||
|
@ -626,7 +626,7 @@ public class NoteService(
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return await ProcessNoteAsync(fetchedNote, actor);
|
return await ProcessNoteAsync(fetchedNote, actor, user);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue