[backend/core] Set threadId on notes with replies
This commit is contained in:
parent
13f0f0e686
commit
fa7b98c366
1 changed files with 3 additions and 1 deletions
|
@ -91,7 +91,8 @@ public class NoteService(
|
||||||
AttachedFileTypes = attachments?.Select(p => p.Type).ToList() ?? [],
|
AttachedFileTypes = attachments?.Select(p => p.Type).ToList() ?? [],
|
||||||
Mentions = mentionedUserIds,
|
Mentions = mentionedUserIds,
|
||||||
VisibleUserIds = visibility == Note.NoteVisibility.Specified ? mentionedUserIds : [],
|
VisibleUserIds = visibility == Note.NoteVisibility.Specified ? mentionedUserIds : [],
|
||||||
MentionedRemoteUsers = remoteMentions
|
MentionedRemoteUsers = remoteMentions,
|
||||||
|
ThreadId = reply?.ThreadId ?? reply?.Id
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!note.IsPureRenote) user.NotesCount++;
|
if (!note.IsPureRenote) user.NotesCount++;
|
||||||
|
@ -358,6 +359,7 @@ public class NoteService(
|
||||||
{
|
{
|
||||||
dbNote.ReplyUserId = dbNote.Reply.UserId;
|
dbNote.ReplyUserId = dbNote.Reply.UserId;
|
||||||
dbNote.ReplyUserHost = dbNote.Reply.UserHost;
|
dbNote.ReplyUserHost = dbNote.Reply.UserHost;
|
||||||
|
dbNote.ThreadId = dbNote.Reply.ThreadId ?? dbNote.Reply.ThreadId;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dbNote.Renote != null)
|
if (dbNote.Renote != null)
|
||||||
|
|
Loading…
Add table
Reference in a new issue